Got SIP response 503 "Service Unavailable"

Please Help me

“SIP/trunk_1/201”) in new stack
– Called trunk_1/201
– SIP/trunk_1-08214240 is ringing
– Got SIP response 503 “Service Unavailable” back from 192.168.117.100
– SIP/trunk_1-08214240 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [1-dial@macro-trunkdial-failover-0.3:2] GotoIf(“SIP/891-08216d60”, “0 > 0 ?1-CONGESTION|1:1-out|1”) in new stack
– Goto (macro-trunkdial-failover-0.3,1-out,1)
– Executing [1-out@macro-trunkdial-failover-0.3:1] Hangup(“SIP/891-08216d60”, “”) in new stack

We can’t help you unless you tell us what is at the other end of the trunk and even then we may refer you to the support channels for that device.

On Cisco, 503 can have a similar meaning to Permission Denied.

Call connect for 10 second then drop
Other End is a avaya PBX they give me a trunk
Every thing was fine this problem came since few days

in users.conf ; Sip Trunk Define

[trunk_1]
host = 192.168.117.100
type = peer
username =
secret =
trunkname = SipTrunk
context = DID_trunk_1
group = null
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = yes
trunkstyle = voip
insecure = port,invite
nat = yes
disallow = all
allow = ulaw,alaw,g729,g723,g726

In extensions.conf

exten = _2.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:0},trunk_1,)

It is not possible to get 503 once the call is connected.

I am facing this problem why

Because you have done something wrong.

Firstly, your description doesn’t describe a possible sequence of events, so you need to work out what the symptoms really are.

Secondly, there is not enough information to debug this anyway. At the very least, you will need to provide a full trace of the SIP dialogue that is encountering the 503. Even then, 503 often results from trying to do something not allowed by the downstream system, and you would need to provide full details of its configuration to be able to debug that.

Here is my full confuguration

SIP.CONF

[general]
context = default
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes
localnet = 172.16.0.0/255.255.0.0
nat = yes
canreinvite = no
ignoreregexpire = yes ; Enabling this setting has two functions:
allowexternaldomains = yes
allowguest = yes
allowsubscribe = yes
allowtransfer = yes
alwaysauthreject = no
autodomain = no
callevents = no
checkmwi = 10
compactheaders = no
defaultexpiry = 120
domain =
dtmfmode =
dumphistory = no
externrefresh = 10
fromdomain =
g726nonstandard = no
jbenable = no
jbforce = no
jbimpl = fixed
jblog = no
jbmaxsize = 150
jbresyncthreshold =
language =
maxcallbitrate = 384
maxexpiry = 3600
minexpiry = 60
mohinterpret = default
mohsuggest =
mwi_from =
notifyringing = yes
pedantic = no
progressinband = never
promiscredir = no
realm = asterisk
recordhistory = no
registerattempts = 0
registertimeout = 20
relaxdtmf = no
rtpholdtimeout =
rtptimeout =
sendrpid = no
sipdebug = no
subscribecontext =
t1min = 100
t38pt_udptl = no
tos_audio = none
tos_sip = none
tos_video = none
trustrpid = no
useragent = Asterisk PBX
usereqphone = no
videosupport = no
disallow = all
allow = adpcm,ulaw,alaw,gsm,g726,g729,g723

EXTENSIONS.CONF

[general]
static = yes
writeprotect = no
autofallthrough = yes
clearglobalvars = no

[globals]
CONSOLE = Console/dsp ; Console interface for demo
IAXINFO = guest ; IAXtel username/password
TRUNK = Zap/g1 ; Trunk interface
TRUNKMSD = 1 ; MSD digits to strip (usually 1 or 0)
FEATURES =
DIALOPTIONS =
RINGTIME = 20
FOLLOWMEOPTIONS =
PAGING_HEADER = Intercom
GLOBAL_OUTBOUNDCID =
GLOBAL_OUTBOUNDCIDNAME =
CID_800 = 800
.
.
.
CID_820 = 820

CID_trunk_2 =
trunk_2 = ZAP/g1
trunk_1 = SIP/trunk_1

[dundi-e164-canonical]
[dundi-e164-customers]
[dundi-e164-via-pstn]
[dundi-e164-local]
include => dundi-e164-canonical
include => dundi-e164-customers
include => dundi-e164-via-pstn

[dundi-e164-switch]
switch => DUNDi/e164

[dundi-e164-lookup]
include => dundi-e164-local
include => dundi-e164-switch

[macro-dundi-e164]
exten => s,1,Goto(${ARG1},1)
include => dundi-e164-lookup
[iaxtel700]
exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iax$

[iaxprovider]

[trunkint]
exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunkld]
exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})
exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunklocal]
exten => _9NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[trunktollfree]
exten => _91800NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91888NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91877NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})
exten => _91866NXXXXXX,1,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})

[international]
ignorepat => 9
include => longdistance
include => trunkint

[longdistance]
ignorepat => 9
include => local
include => trunkld

[local]
ignorepat => 9
include => default
include => trunklocal
include => iaxtel700
include => trunktollfree
include => iaxprovider
include => parkedcalls

[macro-trunkdial]
exten => s,1,Dial(${ARG1})
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-BUSY,1,Hangup
exten => _s-.,1,NoOp

[macro-stdPrivacyexten];
exten => s,1,Dial(${ARG2},20|p) ; Ring the interface, 20 seconds maximum, call$
exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHA$
exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail$
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start
exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy an$
exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start
exten => s-DONTCALL,1,Goto(${ARG3},s,1) ; Callee chose to send this call to a $
exten => s-TORTURE,1,Goto(${ARG4},s,1) ; Callee chose to send this call to a t$
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer
exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into Voic$

[macro-page];
exten => s,1,ChanIsAvail(${ARG1}|js) ; j is for Jump and s is for ANY call
exten => s,n,GoToIf([${AVAILSTATUS} = “1”]?autoanswer:fail)
exten => s,n(autoanswer),Set(_ALERT_INFO=“RA”) ; This is for the PolyComs
exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandst$
exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!
exten => s,n,Dial(${ARG1}||)
exten => s,n(fail),Hangup

[demo]
exten => s,1,Wait(1) ; Wait a second, just for fun
exten => s,n,Answer ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
exten => s,n,WaitExten ; Wait for an extension to be dialed.
exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
exten => 2,n,Goto(s,instruct)
exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
exten => 3,n,Goto(s,restart) ; Start with the congratulations
exten => 1000,1,Goto(default,s,1)
exten => 1234,1,Playback(transfer,skip) ; "Please hold while…"
exten => 1234,n,Macro(stdexten,1234,${GLOBAL(CONSOLE)})
exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
exten => 1236,1,Dial(Console/dsp) ; Ring forever
exten => 1236,n,Voicemail(1234,b) ; Unless busy
exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
exten => #,n,Hangup ; Hang them up.
exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; "That’s not valid, try again"
exten => 500,1,Playback(demo-abouttotry) ; Let them know what’s going on
exten => 500,n,Dial(IAX2/guest@misery.digium.com/s@default) ; Call the Asteris$
exten => 500,n,Playback(demo-nogo) ; Couldn’t connect to the demo site
exten => 500,n,Goto(s,6) ; Return to the start over message.
exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,n,Echo ; Do the echo test
exten => 600,n,Playback(demo-echodone) ; Let them know it’s over
exten => 600,n,Goto(s,6) ; Start over
exten => 76245,1,Macro(page,SIP/Grandstream1)
exten => _7XXX,1,Macro(page,SIP/${EXTEN})
exten => 7999,1,Set(TIMEOUT(absolute)=60)
exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/$
exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)

[page]
exten => _X.,1,Macro(page,SIP/${EXTEN})

[default]
exten = o,1,

[macro-stdexten]
exten = s,1,Set(_DYNAMIC_FEATURES=${FEATURES})
exten = s,2,Set(ORIG_ARG1=${ARG1})
exten = s,3,GotoIf($["${FOLLOWME
${ARG1}}" = “1”]?6:4)
exten = s,4,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,5,Goto(s-${DIALSTATUS},1)
exten = s,6,Macro(stdexten-followme,${ARG1},${ARG2})
exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
exten = s-NOANSWER,2,Goto(default,s,1)
exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ORIG_ARG1})

[macro-stdexten-followme]
exten = s,1,Answer
exten = s,2,Set(ORIG_ARG1=${ARG1})
exten = s,3,Dial(${ARG2},${RINGTIME},${DIALOPTIONS})
exten = s,4,Set(__FMCIDNUM=${CALLERID(num)})
exten = s,5,Set(__FMCIDNAME=${CALLERID(name)})
exten = s,6,Followme(${ORIG_ARG1},${FOLLOWMEOPTIONS})
exten = s,7,Voicemail(${ORIG_ARG1},u)
exten = s-NOANSWER,1,Voicemail(${ORIG_ARG1},u)
exten = s-BUSY,1,Voicemail(${ORIG_ARG1},b)
exten = s-BUSY,2,Goto(default,s,1)
exten = _s-.,1,Goto(s-NOANSWER,1)
exten = a,1,VoicemailMain(${ORIG_ARG1})

[macro-pagingintercom]
exten = s,1,SIPAddHeader(Alert-Info: ${PAGING_HEADER})
exten = s,2,Page(${ARG1},${ARG2})
exten = s,3,Hangup

[conferences]

[ringgroups]

[queues]

[voicemenus]

[voicemailgroups]

[directory]

[page_an_extension]

[pagegroups]
[asterisk_guitools]
exten = executecommand,1,System(${command})
exten = executecommand,n,Hangup()
exten = record_vmenu,1,Answer
exten = record_vmenu,n,Playback(vm-intro)
exten = record_vmenu,n,Record(${var1})
exten = record_vmenu,n,Playback(vm-saved)
exten = record_vmenu,n,Playback(vm-goodbye)
exten = record_vmenu,n,Hangup
exten = play_file,1,Answer
exten = play_file,n,Playback(${var1})
exten = play_file,n,Hangup

[macro-trunkdial-failover-0.3]
exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)
exten = s,2,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1)
exten = s,3,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID$
exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}$
exten = s,n,Goto(1-dial,1)
exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})
exten = 1-setgbobname,n,Goto(s,3)
exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})
exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})
exten = 1-fmsetcid,n,Goto(1-dial,1)
exten = 1-dial,1,Dial(${ARG1})
exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
exten = 1-CHANUNAVAIL,n,Hangup()
exten = 1-CONGESTION,1,Dial(${ARG2})
exten = 1-CONGESTION,n,Hangup()
exten = 1-out,1,Hangup()

[DID_trunk_2]
include = DID_trunk_2_default
[CallingRule_1]
exten = _1.,1,Macro(trunkdial-failover-0.3,${trunk_2}/${EXTEN:0},trunk_2,)

[CallingRule_2]
exten = _2.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${EXTEN:0},trunk_1,)

[DID_trunk_1]
include = DID_trunk_1_default

[DID_trunk_1_default]
exten = _800,1,Goto(default,800,1)
.
.
exten = _820,1,Goto(default,820,1)

[DLPN_DialPlan1]
include = CallingRule_1
include = CallingRule_2
include = default

USER.CONF

[general]
fullname = New User
userbase = 6000
hasvoicemail = yes
vmsecret = 1234
hassip = yes
hasiax = yes
;hash323 = yes
hasmanager = no
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1

[800]
username = 800
transfer = yes
mailbox = 800
call-limit = 100
type = peer
fullname = abc
registersip = no
host = dynamic
callgroup = 1
type = peer
context = DLPN_DialPlan1
cid_number = 800
hasvoicemail = no
vmsecret =
email =
threewaycalling = no
hasdirectory = no
callwaiting = no
hasmanager = no
hasagent = no
hassip = yes
hasiax = no
secret = abc
nat = yes
canreinvite = no
dtmfmode = auto
insecure = no
pickupgroup = 1
autoprov = no
label =
macaddress =
linenumber = 1
LINEKEYS = 1
disallow = all
allow = ulaw,gsm[trunk_2]
zapchan = 1,2,3,4
trunkname = Local_1
busydetect = yes
busycount = 3
busypattern = 500,500
ringtimeout = 8000
answeronpolarityswitch = no
hanguponpolarityswitch = no
callprogress = no
progzone = us
usecallerid = yes
cidstart = ring
pulsedial = no
cidsignalling = bell
flash = 750
rxflash = 1250
mailbox =
callerid = asreceived
context = DID_trunk_2
group = 1
hasexten = no
hasiax = no
hassip = no
registeriax = no
registersip = no
trunkstyle = analog
disallow = all
allow = all
gui_volume = 3 ; GUI metadata
signalling = fxs_ks
gui_fxooffset = 0 ; GUI metadata
rxgain = 2
txgain = 0.0
channel = 1
gui_volume = 3 ; GUI metadata
signalling = fxs_ks
gui_fxooffset = 0 ; GUI metadata
rxgain = 2txgain = 0.0
channel = 3
gui_volume = 3 ; GUI metadata
signalling = fxs_ks
gui_fxooffset = 0 ; GUI metadata
rxgain = 2
txgain = 0.0
channel = 4

[trunk_1]
host = 192.168.117.100
type = peer
username =
secret =
trunkname = EXTERNAL1 ; GUI metadata
context = DID_trunk_1
group = null
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = yes
trunkstyle = voip
insecure = port,invite
nat = yes
qualify = yes
fromdomain =
fromuser =
authuser =
disallow = all
allow = ulaw,alaw,g729,g723,g726

A post was split to a new topic: Receiving sporadic 503 Service Unavailable