Start a new topic

FreePBX/Asterisk "All circuits are busy now. Please try again later." (Server Internal Error 500)

So, I've just decided to setup a Asterisk server to get my Cisco IP phone working, but when I try to dial out from a softphone, or any other phone for that matter, I get the "All circuits busy" message. I'm sure that this is just a stupid error in my configurations, but I was hoping someone on here could help me spot the error.


Incoming is working perfectly.


image

image

.


 Here is the text from the Asterisk CLI in Verbose 3 mode while trying to place a call

[root@freepbx ~]# asterisk -r
Asterisk 14.5.0, Copyright (C) 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 14.5.0 currently running on freepbx (pid = 14286)
freepbx*CLI> core set verbose 3
Console verbose was OFF and is now 3.
  == Setting global variable 'SIPDOMAIN' to '192.168.2.139'
    -- Executing [7742813957@from-internal:1] Macro("PJSIP/1000-00000006", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/1000-00000006", "TOUCH_MONITOR=1499457184.10") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/1000-00000006", "AMPUSER=1000") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/1000-00000006", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/1000-00000006", "1?Set(__REALCALLERIDNUM=1000)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/1000-00000006", "AMPUSER=1000") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/1000-00000006", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/1000-00000006", "AMPUSERCIDNAME=1000") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/1000-00000006", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/1000-00000006", "AMPUSERCID=1000") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/1000-00000006", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/1000-00000006", "CALLERID(all)="1000" <1000>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/1000-00000006", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/1000-00000006", "1?Set(GROUP(concurrency_limit)=1000)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/1000-00000006", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/1000-00000006", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/1000-00000006", "CALLERID(number)=1000") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/1000-00000006", "CALLERID(name)=1000") in new stack
    -- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/1000-00000006", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/1000-00000006", "CDR(cnam)=1000") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/1000-00000006", "CDR(cnum)=1000") in new stack
    -- Executing [s@macro-user-callerid:34] Set("PJSIP/1000-00000006", "CHANNEL(language)=en") in new stack
    -- Executing [7742813957@from-internal:2] Gosub("PJSIP/1000-00000006", "sub-record-check,s,1(out,7742813957,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/1000-00000006", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/1000-00000006", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/1000-00000006", "NOW=1499457184") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/1000-00000006", "__DAY=07") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/1000-00000006", "__MONTH=07") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/1000-00000006", "__YEAR=2017") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/1000-00000006", "__TIMESTR=20170707-195304") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/1000-00000006", "__FROMEXTEN=1000") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/1000-00000006", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/1000-00000006", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/1000-00000006", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/1000-00000006", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/1000-00000006", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/1000-00000006", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/1000-00000006", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/1000-00000006", "Outbound Recording Check from 1000 to 7742813957") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/1000-00000006", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/1000-00000006", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/1000-00000006", "recordcheck,1(dontcare,out,7742813957)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/1000-00000006", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/1000-00000006", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/1000-00000006", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/1000-00000006", "") in new stack
    -- Executing [7742813957@from-internal:3] ExecIf("PJSIP/1000-00000006", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [7742813957@from-internal:4] Set("PJSIP/1000-00000006", "MOHCLASS=default") in new stack
    -- Executing [7742813957@from-internal:5] Set("PJSIP/1000-00000006", "_NODEST=") in new stack
    -- Executing [7742813957@from-internal:6] Macro("PJSIP/1000-00000006", "dialout-trunk,1,7742813957,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/1000-00000006", "DIAL_TRUNK=1") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/1000-00000006", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/1000-00000006", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/1000-00000006", "DIAL_NUMBER=7742813957") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/1000-00000006", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/1000-00000006", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/1000-00000006", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/1000-00000006", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/1000-00000006", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/1000-00000006", "outbound-callerid,1") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/1000-00000006", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/1000-00000006", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/1000-00000006", "0?Set(REALCALLERIDNUM=1000)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/1000-00000006", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/1000-00000006", "USEROUTCID=1000") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/1000-00000006", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/1000-00000006", "TRUNKOUTCID=Mount Gilead OH") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/1000-00000006", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/1000-00000006", "1?Set(CALLERID(all)=Mount Gilead OH)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/1000-00000006", "1?Set(CALLERID(all)=1000)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/1000-00000006", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/1000-00000006", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/1000-00000006", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/1000-00000006", "CDR(outbound_cnum)=1000") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/1000-00000006", "CDR(outbound_cnam)=") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/1000-00000006", "0?sub-flp-1,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/1000-00000006", "OUTNUM=7742813957") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/1000-00000006", "custom=SIP/GV15672315008") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/1000-00000006", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/1000-00000006", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/1000-00000006", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/1000-00000006", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/1000-00000006", "0?skipcrm") in new stack
    -- Executing [s@macro-dialout-trunk:19] Set("PJSIP/1000-00000006", "__CRM_DIRECTION=OUTBOUND") in new stack
    -- Executing [s@macro-dialout-trunk:20] Set("PJSIP/1000-00000006", "__CRM_DESTINATION=7742813957") in new stack
    -- Executing [s@macro-dialout-trunk:21] Set("PJSIP/1000-00000006", "__CRM_SOURCE=1000") in new stack
    -- Executing [s@macro-dialout-trunk:22] AGI("PJSIP/1000-00000006", "sangomacrm.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
    -- <PJSIP/1000-00000006>AGI Script sangomacrm.agi completed, returning 0
    -- Executing [s@macro-dialout-trunk:23] Set("PJSIP/1000-00000006", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:24] NoOp("PJSIP/1000-00000006", "CRM Finished") in new stack
    -- Executing [s@macro-dialout-trunk:25] GotoIf("PJSIP/1000-00000006", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:26] ExecIf("PJSIP/1000-00000006", "1?Set(CONNECTEDLINE(num,i)=7742813957)") in new stack
    -- Executing [s@macro-dialout-trunk:27] ExecIf("PJSIP/1000-00000006", "1?Set(CONNECTEDLINE(name,i)=CID:1000)") in new stack
    -- Executing [s@macro-dialout-trunk:28] ExecIf("PJSIP/1000-00000006", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)1000)") in new stack
    -- Executing [s@macro-dialout-trunk:29] GotoIf("PJSIP/1000-00000006", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:30] Dial("PJSIP/1000-00000006", "SIP/GV15672315008/7742813957@GV15672315008,300,T") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/GV15672315008/7742813957@GV15672315008
    -- Got SIP response 500 "Server Internal Error" back from 198.199.84.66:5060
    -- SIP/GV15672315008-00000004 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dialout-trunk:31] NoOp("PJSIP/1000-00000006", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 38") in new stack
    -- Executing [s@macro-dialout-trunk:32] GotoIf("PJSIP/1000-00000006", "0?continue,1:s-CONGESTION,1") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("PJSIP/1000-00000006", "RC=38") in new stack
    -- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("PJSIP/1000-00000006", "38,1") in new stack
    -- Goto (macro-dialout-trunk,38,1)
    -- Executing [38@macro-dialout-trunk:1] Goto("PJSIP/1000-00000006", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] NoOp("PJSIP/1000-00000006", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 38 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:2] ExecIf("PJSIP/1000-00000006", "1?Set(CALLERID(number)=1000)") in new stack
    -- Executing [7742813957@from-internal:7] Macro("PJSIP/1000-00000006", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("PJSIP/1000-00000006", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("PJSIP/1000-00000006", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("PJSIP/1000-00000006", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("PJSIP/1000-00000006", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack
    -- <PJSIP/1000-00000006> Playing 'all-circuits-busy-now.ulaw' (language 'en')
    -- <PJSIP/1000-00000006> Playing 'please-try-call-later.ulaw' (language 'en')
    -- Executing [h@from-internal:1] Macro("PJSIP/1000-00000006", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/1000-00000006", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/1000-00000006", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/1000-00000006", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/1000-00000006' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/1000-00000006'
    -- PJSIP/1000-00000006 Internal Gosub(crm-hangup,s,1) start
    -- Executing [s@crm-hangup:1] NoOp("PJSIP/1000-00000006", "Sending Hangup to CRM") in new stack
    -- Executing [s@crm-hangup:2] NoOp("PJSIP/1000-00000006", "HANGUP CAUSE: 38") in new stack
    -- Executing [s@crm-hangup:3] ExecIf("PJSIP/1000-00000006", "0?Set(__CRM_VOICEMAIL=)") in new stack
    -- Executing [s@crm-hangup:4] NoOp("PJSIP/1000-00000006", "MASTER CHANNEL: 1499457184.10 = 1499457184.10") in new stack
    -- Executing [s@crm-hangup:5] GotoIf("PJSIP/1000-00000006", "0?return") in new stack
    -- Executing [s@crm-hangup:6] Set("PJSIP/1000-00000006", "__CRM_HANGUP=1") in new stack
    -- Executing [s@crm-hangup:7] AGI("PJSIP/1000-00000006", "sangomacrm.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
    -- <PJSIP/1000-00000006>AGI Script sangomacrm.agi completed, returning 0
    -- Executing [s@crm-hangup:8] Return("PJSIP/1000-00000006", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/1000-00000006'
    -- PJSIP/1000-00000006 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
    -- Added contact 'sip:1000@192.168.2.119:63911;ob' to AOR '1000' with expiration of 300 seconds
  == Contact 1000/sip:1000@192.168.2.119:63911;ob has been created
    -- Added contact 'sip:1000@192.168.2.119:63918;ob' to AOR '1000' with expiration of 300 seconds
  == Contact 1000/sip:1000@192.168.2.119:63918;ob has been deleted
  == Contact 1000/sip:1000@192.168.2.119:63918;ob has been created
  == Contact 1000/sip:1000@192.168.2.119:63911;ob has been deleted
    -- Contact 1000/sip:1000@192.168.2.119:63911;ob is now Reachable.  RTT: 0.000 msec
    -- Contact 1000/sip:1000@192.168.2.119:63918;ob is now Reachable.  RTT: 4.183 msec
    -- Added contact 'sip:1000@192.168.2.119:63911;ob' to AOR '1000' with expiration of 300 seconds
  == Contact 1000/sip:1000@192.168.2.119:63911;ob has been created
    -- Added contact 'sip:1000@192.168.2.119:63918;ob' to AOR '1000' with expiration of 300 seconds
  == Contact 1000/sip:1000@192.168.2.119:63918;ob has been deleted
  == Contact 1000/sip:1000@192.168.2.119:63918;ob has been created
  == Contact 1000/sip:1000@192.168.2.119:63911;ob has been deleted
    -- Contact 1000/sip:1000@192.168.2.119:63911;ob is now Reachable.  RTT: 0.000 msec
    -- Contact 1000/sip:1000@192.168.2.119:63918;ob is now Reachable.  RTT: 2.437 msec

 My Outbound Route is simply:

-The GVGW trunk is selected

-My dialing patterns are: "XXXXXXXXXX" and "1 XXXXXXXXXX"


My Inbound Route:

-The extension I created selected for destination

-My DID is "10"


I did follow the tutorial on how to configure it on the Solutions section, and it got me this far.


Thank You All very much for the help, let me know if you need any more information.


PS: If anyone else has any experience using Cisco 7941 IP phones (Or any Cisco Unified IP phones) with Asterisk, please let me know, I'm also having an issue getting it to register.

1 Comment

Well for starters you called 7742813957 instead of 17742813957...and that's not gonna work...;-)

Login or Signup to post a comment