Skip to content

VoiceML: <Reject>

The <Reject> action ends execution of the call by rejecting it.

This action can only be used if the call has not yet been answered. If this is the case, you will not be billed for the call. No further actions are executed after <Reject>.

Attributes

The <Reject> action supports the following attributes.

Attribute Allowed Values Default
Reason See below rejected
ErrorMessage Up to 64 characters None.

Reason

The Reason attribute specifies how the call should be rejected. The behavior of the rejection varies depending on whether you a rejecting a PSTN or a SIP call.

Reason PSTN Behavior SIP Behavior
not-found Returns an operator-specific not in service message. Returns SIP 404 with Q.850 code 1.
busy Returns a busy signal to the caller. Returns SIP 486 with Q.850 code 17.
rejected Same as not-found. Returns SIP 603 with Q.850 code 21.
no-answer Same as busy. Returns SIP 480 with Q.850 code 19.
subscriber-absent Same as busy. Returns SIP 480 with Q.850 code 20.
invalid-number-format Same as not-found. Returns SIP 484 with Q.850 code 28.
service-unavailable Same as busy. Returns SIP 503.

ErrorMessage

Sets the error_message field of the associated call resource. If specified, the error_code field will be populated with USER. This field can be up to 64 characters.

Body

This action must not contain a body.

Examples

Example 1: Reject a PSTN call

The following example rejects a call. This will result in an operator-specific not in service message to be played back to the caller.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Reject/>
</Response>

Example 2: Return a SIP 503 response and set a custom error

The following example will reject a SIP call with a 503 response, and set a custom message against the call resource.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Reject Reason="service-unavailable" ErrorMessage="Request could not be fulfilled" />
</Response>

Tips and Tricks

You can use <Reject> to block nuisance callers.