[Home]

Summary:ASTERISK-02912: SIP response code handling
Reporter:nording (nording)Labels:
Date Opened:2004-12-01 09:48:43.000-0600Date Closed:2011-06-07 14:11:57
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:SIP response 503 "Service Unavailable" from PSTN gateway usualy (at least from cisco 53xx/54xx) indicates "congestion" or "no chanel/circuit available" situation, while current chan_sip interprets 503 as "user busy", which is totally wrong and makes * to give up instead of trying alternative trunks.
Comments:By: Olle Johansson (oej) 2004-12-01 14:53:08.000-0600

From chan_sip:
----------------------------
case 503: /* Service Unavailable */
if (owner)                                                ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
----------------------------
Are you sure that you are getting a busy or is it your dial plan?

By: nording (nording) 2004-12-01 18:05:38.000-0600

Yes, i am pretty sure i am getting busy.

Here is debug transcript:
   -- Goto (fulllist_intcode,70951372674,1)
   -- Called 70951372674@xxx.xxx.xxx.66
   -- Got SIP response 503 "Service Unavailable" back from xxx.xxx.xxx.66
   -- SIP/xxx.xxx.xxx.66-8645 is circuit-busy
 == Everyone is busy/congested at this time
   -- Executing Busy("SIP/192.168.1.217-f5c38098", "") in new stack
 == Spawn extension (fulllist_intcode, 70951372674, 102) exited non-zero on 'SIP/192.168.1.217-f5c38098'                                                                                          

And here is my dialplan:
[fulllist_intcode]
include => to_local_users
include => out

[out]
----cut----
exten => _7XXXXXXXXXX,1,Dial,SIP/${EXTEN:0}@xxx.xxx.xxx.66
exten => _7XXXXXXXXXX,2,Dial,SIP/5000#${EXTEN:0}@xxx.xxx.xxx.102 ;fallback trunk
exten => _7XXXXXXXXXX,3,Congestion
exten => _7XXXXXXXXXX,102,Busy
exten => _7XXXXXXXXXX,103,Busy
----cut----

Version is stable-1.0.0

By: Olle Johansson (oej) 2004-12-03 15:44:48.000-0600

What is in the DIALSTATUS variable?

By: Mark Spencer (markster) 2004-12-03 18:38:22.000-0600

Busy and congested both skip to n+101, you will need to use ${DIALSTATUS} like in the example config.