[asterisk-r2] Disconnect causes
Moises Silva
moises.silva at gmail.com
Thu Nov 18 10:46:55 CST 2010
On Thu, Nov 18, 2010 at 11:20 AM, Arnaldo Giacomitti Junior <
arnaldo.junior at cits.br> wrote:
> There is a way to change the disconnect cause of a call in dialplan?
>
>
>
> /* Disconnect causes */
>
> typedef enum {
>
> OR2_CAUSE_BUSY_NUMBER,
>
> OR2_CAUSE_NETWORK_CONGESTION,
>
> OR2_CAUSE_UNALLOCATED_NUMBER,
>
> OR2_CAUSE_OUT_OF_ORDER,
>
> OR2_CAUSE_UNSPECIFIED,
>
> OR2_CAUSE_NO_ANSWER,
>
> OR2_CAUSE_NORMAL_CLEARING,
>
> OR2_CAUSE_COLLECT_CALL_REJECTED,
>
> OR2_CAUSE_FORCED_RELEASE,
>
> OR2_CAUSE_NUMBER_CHANGED
>
> } openr2_call_disconnect_cause_t;
>
>
By default the cause provided by Asterisk will be mapped to a valid R2
cause. If you want to override that behaviour you need to set MFCR2_CAUSE
variable in the dialplan. It is undocumented however the values for that
variable. The value must be an integer according to Asterisk causes (see
include/asterisk/causes.h):
For example:
MFCR2_CAUSE=17 is user busy
AST_CAUSE_USER_BUSY (integer value 17)
This work in latest Asterisk 1.6.2, not sure if I added that to previous
versions.
However the mapping will ultimately decide which openr2 cause will be used.
If you want to granularly control exactly which openr2 cause to use, we need
a new variable MFCR2_EXPLICIT_CAUSE=<openr2 cause string>
Moises Silva
Senior Software Engineer
Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON L3R 9R6
Canada
t. 1 905 474 1990 x128 | e. moy at sangoma.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-r2/attachments/20101118/257de9a8/attachment.htm
More information about the asterisk-r2
mailing list