[asterisk-users] Get sip response code

Greg Oliver greg.oliver at cistera.com
Wed May 16 15:46:21 MST 2007


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 at 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.



More information about the asterisk-users mailing list