[asterisk-users] evaluate SIP response codes in dialplan

Johansson Olle E oej at edvina.net
Thu Jan 15 06:55:25 CST 2009


15 jan 2009 kl. 13.02 skrev John covici:

> That is very nice, but where are the HANGUPCAUSE values documented?
That's the issue...

include/asterisk/causes.h is a good reference for now.

/O
>
>
> Thanks.
>
> on Thursday 01/15/2009 Johansson Olle E(oej at edvina.net) wrote
>>
>> 14 jan 2009 kl. 14.02 skrev Klaus Darilion:
>>
>>> Hi!
>>>
>>> Is it somehow possible to evaluate the SIP response code inside the
>>> dialplan?
>>>
>>> I have an Asterisk server which forwards requests to various PSTN
>>> gateways with SIP. If the Dial() attempt is not successful I want to
>>> differ at least these 3 options:
>>> - called destination is busy (486): e.g. activate auto-redial
>>> - called destination does not exist, unassigned number (404)
>>> - gateway is broken, error, circuit busy (e.g. 503)
>>>
>>> 486 is mapped to DIALSTATUS=BUSY
>>> but both 503 and 404 is mapped to DIALSTATUS=CONGESTION
>>>
>>> As when Asterisk forwards the response with SIP to the caller the  
>>> same
>>> response code is used, I suspect this information must be stored
>>> somewhere inside the channel variable. So, are there any means to
>>> access it?
>>
>> Check the HANGUPCAUSE, it's much more detailed than DIALSTATUS.
>>
>> We do map the SIP (and all other protocol errors in various channel
>> drivers) codes to ISDN hangup causes, which gives you much more
>> information about
>> why a call failed.
>>
>> The conversion we're using follows the RFC, and where that doesn't
>> cover it, Cisco's documentation.
>>
>> /Olle
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
> -- 
> Your life is like a penny.  You're going to lose it.  The question is:
> How do
> you spend it?
>
>         John Covici
>         covici at ccs.covici.com
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden






More information about the asterisk-users mailing list