[asterisk-users] How to get SIP Response Code and use it to change destination.

Logan Bibby logan at keobi.com
Sun Sep 23 17:24:20 CDT 2012


If you're using below 1.8, there isn't a way. The DIALSTATUS channel
variable can give you a little, but not with those response codes.

However, if you're using 1.8, there's some hope: you can use
${HASH(SIP_CAUSE,<channel>)} (where <channel> is the destination channel,
not source) to read the SIP response code.

For my setup, I have an OpenSIPS sever that handles the lower level logic
such as failure routes. I find it a lot amiable to deal with than Asterisk
for that sort of thing.

- Logan
On Sep 23, 2012 5:17 PM, "Jarek Jarzebowski" <jarek.jarzebowski at gmail.com>
wrote:

> Hello,
>
> I need to do such a simple thing:
>
> 1. Dial SIP/123
> 2. If I get for example "503" - jump to Dial SIP/789
> 3. If I get for example "403" - jump to Playback(...)
>
> The real question is:
> how can I get SIP Responses and use it in dialplan?
>
> Regards,
> Jarek
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120923/fbc233e1/attachment.htm>


More information about the asterisk-users mailing list