[asterisk-users] evaluate SIP response codes in dialplan

Joshua Colp jcolp at digium.com
Wed Jan 14 10:42:42 CST 2009


----- "Klaus Darilion" <klaus.mailinglists at pernau.at> wrote:

> Philipp Kempgen schrieb:
> > Klaus Darilion schrieb:
> >> Is it somehow possible to evaluate the SIP response code inside the
> 
> >> dialplan?
> > 
> > No.
> > Part of the reasoning is that Asterisk is meant to be a multi-
> > protocol PBX, not a SIP softswitch.
> 
> This is IMO a stupid limitation. There are dozens of ISDN cause codes,
> 
> dozens of SIP response codes and similar in other protocols, but
> Dial() 
> only exports BUSY or CONGESTION ......
> 

Right, app_dial condenses down the information it gets into some basic string representations. You can also access a more specific Q.931 representation by using the ${HANGUPCAUSE} dialplan variable. While this is not the SIP response code this gives you more information. You can also control the SIP response code by passing a Q.931 value to the Hangup() application itself. Unfortunately the mappings of SIP response code <-> Q.931 are hard coded in chan_sip though so that is where you can find what maps to what.

-- 
Joshua Colp
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org



More information about the asterisk-users mailing list