Douglas Garstang
2007-Oct-25 17:04 UTC
[asterisk-users] Getting SIP Response Code from HANGUPCAUSE
I'd like to grab the SIP response code that comes back from an INVITE. The HANGUPCAUSE gives the converted ISDN cause code. Anyone know of a way to get the SIP response code instead? Doug. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071025/e2fb9a5d/attachment.htm
Rizwan Hisham
2007-Oct-26 13:18 UTC
[asterisk-users] Getting SIP Response Code from HANGUPCAUSE
I think you can use the 'ngrep' command to see the sip packets coming in using the sip listening port. I dont know the exact command though, you will have to lookit up urself. you will see the sip packets coming into ur system and in those packets you can see the response code. On 10/25/07, Douglas Garstang <dougmig33 at yahoo.com> wrote:> > I'd like to grab the SIP response code that comes back from an INVITE. The > HANGUPCAUSE gives the converted ISDN cause code. Anyone know of a way to get > the SIP response code instead? > > Doug. > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.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 >-- Best Regards Rizwan Hisham Software Engineer Axvoice Inc. www.axvoice.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071026/243e017d/attachment-0001.htm
Douglas Garstang
2007-Oct-26 21:13 UTC
[asterisk-users] Getting SIP Response Code from HANGUPCAUSE
Thanks. I am quite familiar with ngrep. I was asking how I could get the SIP response code from the dial plan. Doug. ----- Original Message ---- From: Rizwan Hisham <rizwanhasham at gmail.com> To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Friday, October 26, 2007 6:18:50 AM Subject: Re: [asterisk-users] Getting SIP Response Code from HANGUPCAUSE I think you can use the 'ngrep' command to see the sip packets coming in using the sip listening port. I dont know the exact command though, you will have to lookit up urself. you will see the sip packets coming into ur system and in those packets you can see the response code. On 10/25/07, Douglas Garstang <dougmig33 at yahoo.com> wrote: I'd like to grab the SIP response code that comes back from an INVITE. The HANGUPCAUSE gives the converted ISDN cause code. Anyone know of a way to get the SIP response code instead? Doug. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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 -- Best Regards Rizwan Hisham Software Engineer Axvoice Inc. www.axvoice.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071026/3b8f965c/attachment-0001.htm
Douglas Garstang
2007-Oct-28 18:15 UTC
[asterisk-users] Getting SIP Response Code from HANGUPCAUSE
Ah jeez. All I wanted to do was connect to a carrier and then perform fail over logic based on their SIP response. Not supposed to be difficult. This is what Asterisk is supposed to be good at. We have a SIP module, why not have SIP responses available to the module. Now, I have to look at the lossy HANGUPCAUSE variable and make a best guess. Not an ideal situation. We're trying to improve the ASR's we get from providers. They are low, and often they fail calls for no particular reason. They all do it, even the big ones like Verizon. Checking their responses for purpose of trying another carrier on the fly, and reporting is pretty critical. Doug. ----- Original Message ---- From: Raj Jain <rj2807 at gmail.com> To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Saturday, October 27, 2007 11:29:21 AM Subject: Re: [asterisk-users] Getting SIP Response Code from HANGUPCAUSE> > The only place where it is reasonable to customize is in the > > specification of the channel in the configuration file. > That is where > > you would customize, for example, whether DTMF is inband, > SIP INFO, or > > RFC 2833, as well as what codecs will be negotiated for that > > particular user/peer. > > > > But you already have the SIP_HEADER function, which is quite > contradictory to what you say. This allows users who know > what they are doing to examine headers directly. We use this > a lot. What would be the harm in having a SIP_RESPONSE > function or something alike?I'd agree that SIP response code should be accessible from the dial plan. Knowing the exact SIP response code could be critical for making call processing decisions. The conversion of SIP response codes to Q.931 codes (HANGUPCAUSE) is just too lossy. Building a truly protocol agnostic dial plan API is a worthy goal. But, I think it is somewhat of an unsolvable problem. The signaling protocols are very different and for various reasons people have always wanted access to native information elements carried in the protocol. Perhaps, a very simple solution for this problem could be to support a keyword such as "TOPLINE" in the SIP_HEADER function to fetch the topmost line in a SIP message. This will not only get the caller the response code for SIP response messages, but will also have the nice byproduct of making the Request-URI available if the message in question is a SIP request. - Raj _______________________________________________ --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 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071028/0b6ca123/attachment.htm