[asterisk-users] Using Calls Rejection Reasons
Philipp von Klitzing
klitzing at pool.informatik.rwth-aachen.de
Wed Oct 20 10:09:38 CDT 2010
Hi!
> To complicate it a bit, is there a way to extract the rejection reason (in
> this case 486) without using the DIALSTATUS and to use it? It can be
> useful for rejections that are not handled by DIALSTATUS.
If the other side is also an Asterisk system: When call is hang up that
involves a SIP channel, Asterisk sends the extra SIP headers "X-Asterisk-
HangupCause" and "X-Asterisk-HangupCauseCode" in in the BYE message.
You can read this using the SIP_HEADER() function in the h extension.
Asterisk 1.8 will allow to read SIP response codes in the dialplan via
{HASH(SIP_CAUSE,<channel-name>)}.
Asterisk 1.8 also comes with a 'use_q850_reason' configuration option for
generating and parsing, if available, "Reason: Q.850;cause=<cause code>".
See:
http://www.voip-
info.org/wiki/index.php?page=Asterisk+variable+hangupcause
Apart from the two approaches outlined above the answer is to your
question is "no": You would need a real SIP proxy to do that.
Philipp
More information about the asterisk-users
mailing list