Eric Bishop
2007-Apr-08 07:11 UTC
[asterisk-users] Is there a variable for SIP response codes?
Hi all, I want to implement certain actions based on SIP response codes. Is there a similar variable such as ${DIALSTATUS} that comes back with the relevant SIP response code for a call? --- Thanks.... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070408/c5579801/attachment.htm
Eric "ManxPower" Wieling
2007-Apr-08 08:35 UTC
[asterisk-users] Is there a variable for SIP response codes?
Eric Bishop wrote:> Hi all, > > I want to implement certain actions based on SIP response codes. Is there a > similar variable such as ${DIALSTATUS} that comes back with the relevant > SIP > response code for a call?I believe there is SIPGetHeader, but Asterisk tries to translate whatever code it gets from the specific technology (PRI, SIP, IAS2, MGCP, SCCP, H323, etc) into an Asterisk HANGUPCAUSE which is mostly Q.931 codes. HANGUPCAUSE will not tell you the SIP response code, but it will tell you much more than DIALSTATUS will.
Eric Bishop
2007-Apr-08 08:45 UTC
[asterisk-users] Is there a variable for SIP response codes?
Once the call is hung up it is too late. I need to interpret the SIP response codes prior to hangup so I can play an appropriate recorded voice announcement. On 4/9/07, Eric ManxPower Wieling <eric@fnords.org> wrote:> > Eric Bishop wrote: > > Hi all, > > > > I want to implement certain actions based on SIP response codes. Is > there a > > similar variable such as ${DIALSTATUS} that comes back with the relevant > > SIP > > response code for a call? > > I believe there is SIPGetHeader, but Asterisk tries to translate > whatever code it gets from the specific technology (PRI, SIP, IAS2, > MGCP, SCCP, H323, etc) into an Asterisk HANGUPCAUSE which is mostly > Q.931 codes. HANGUPCAUSE will not tell you the SIP response code, but > it will tell you much more than DIALSTATUS will. > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > 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/20070408/0eab3a9f/attachment.htm
Eric "ManxPower" Wieling
2007-Apr-08 08:49 UTC
[asterisk-users] Is there a variable for SIP response codes?
I am assuming this: Call comes in, the Dial happens and for whatever reason the destination cannot be reached. You then want to play a message to the caller. Just put the "g" option on the end of Dial and then check the HANGUPCAUSE. The destination has already hungup, but the caller has not. The extensions.conf.sample has something similar in the (I think) [macro-stdexten] Eric Bishop wrote:> Once the call is hung up it is too late. I need to interpret the SIP > response codes prior to hangup so I can play an appropriate recorded voice > announcement. > > > On 4/9/07, Eric ManxPower Wieling <eric@fnords.org> wrote: >> >> Eric Bishop wrote: >> > Hi all, >> > >> > I want to implement certain actions based on SIP response codes. Is >> there a >> > similar variable such as ${DIALSTATUS} that comes back with the >> relevant >> > SIP >> > response code for a call? >> >> I believe there is SIPGetHeader, but Asterisk tries to translate >> whatever code it gets from the specific technology (PRI, SIP, IAS2, >> MGCP, SCCP, H323, etc) into an Asterisk HANGUPCAUSE which is mostly >> Q.931 codes. HANGUPCAUSE will not tell you the SIP response code, but >> it will tell you much more than DIALSTATUS will. >> _______________________________________________