I was wondering if it is possible (in 1.2.x) to get the SIP response code back after doing Dial(). Dial() seems to treat most call-setup problems as dialstatus CONGESTION, and some are NOANSWER, but I want to know the SIP response code, so I could return the right tones to the user, not just a congestion tone for every fault. Anyone know a way to find out that information, so I want the "604" out of this lot: -- Called xxxxxxxxxxx@sipgw -- Got SIP response 604 "Does Not Exist Anywhere" back from x.x.x.x == No one is available to answer at this time (1:0/0/0) -- Executing NoOp("SIP/42105-d313f470", "-- DIALSTATUS is: NOANSWER") in new stack -- Executing Goto("SIP/42105-d313f470", "s-NOANSWER|1") in new stack -- Executing PlayTones("SIP/42105-d313f470", "Unobtainable") in new stack -- Executing Wait("SIP/42105-d313f470", "10") in new stack Or where do I need to look to find a SIP response code -> DIALSTATUS mapping? Are these configurable anywhere or are they hardcoded? If I push the response code back to the handset (Cisco 7960) then it is even more unhelpful as it uses the same error message for all SIP error type response codes: "Reorder" but does not tell you why the call failed to set up. If it actually put the SIP response error on the display, that would be good, but it doesn't. (at least SIP 8.6 and prior software versions) If it returns Congestion for, say, an invalid number destination, users hear what sounds like an engaged tone, when what I want them to hear is an unobtainable tone. Rob
On Wed, 2007-05-16 at 23:19 +0100, Robert Lister wrote:> I was wondering if it is possible (in 1.2.x) to get the SIP response code > back after doing Dial(). > > Dial() seems to treat most call-setup problems as dialstatus CONGESTION, and > some are NOANSWER, but I want to know the SIP response code, so I could > return the right tones to the user, not just a congestion tone for every > fault. > > Anyone know a way to find out that information, so I want the "604" out of this lot: > > -- Called xxxxxxxxxxx@sipgw > -- Got SIP response 604 "Does Not Exist Anywhere" back from x.x.x.x > == No one is available to answer at this time (1:0/0/0) > -- Executing NoOp("SIP/42105-d313f470", "-- DIALSTATUS is: NOANSWER") in new stack > -- Executing Goto("SIP/42105-d313f470", "s-NOANSWER|1") in new stack > -- Executing PlayTones("SIP/42105-d313f470", "Unobtainable") in new stack > -- Executing Wait("SIP/42105-d313f470", "10") in new stack > > Or where do I need to look to find a SIP response code -> DIALSTATUS mapping? > Are these configurable anywhere or are they hardcoded? > > If I push the response code back to the handset (Cisco 7960) then it is even > more unhelpful as it uses the same error message for all SIP error type > response codes: "Reorder" but does not tell you why the call failed to set > up. If it actually put the SIP response error on the display, that would be > good, but it doesn't. (at least SIP 8.6 and prior software versions)In order to display the response on the handset, Cisco phones require that you have privileges and CTI control over the phones. The only un-authenticated things you can display through the phones are through the services and directories keys. Unfortunately, they are keeping that locked up since they want you to use them with their system. Hopefully they will change their minds one day.
On 5/16/07, Robert Lister <robl@linx.net> wrote:> > I was wondering if it is possible (in 1.2.x) to get the SIP response code > back after doing Dial(). > > Dial() seems to treat most call-setup problems as dialstatus CONGESTION, and > some are NOANSWER, but I want to know the SIP response code, so I could > return the right tones to the user, not just a congestion tone for every > fault. > > Anyone know a way to find out that information, so I want the "604" out of this lot:vim chan_sip.c /Got SIP response (Hint: there are a few references, they start around line 10.000)> Or where do I need to look to find a SIP response code -> DIALSTATUS mapping? > Are these configurable anywhere or are they hardcoded?In app_dial.c all it does is: pbx_builtin_setvar_helper(chan, "DIALSTATUS", status); It shouldn't be too hard to add another variable for SIPDIALSTATUS or whatever name you fancy.> If I push the response code back to the handset (Cisco 7960) then it is even > more unhelpful as it uses the same error message for all SIP error type > response codes: "Reorder" but does not tell you why the call failed to set > up. If it actually put the SIP response error on the display, that would be > good, but it doesn't. (at least SIP 8.6 and prior software versions) >That seems like a bug you should address with the vendor.