FreePBX | Register | Issues | Wiki | Portal | Support

Trouble Dialing Out

configuration
Tags: #<Tag:0x00007fdf9a9f57c8>

(Gcameron) #1

I have recently installed an SPA3000 as a gateway to my analog outside lines. Everytime I try to make an outbound call I receive the all circuits are busy message. First FreePBX install, below are the logs when making a call. If someone could point me in the right direction I would appreciate it. Thanks

== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio TOS bits 184 in TCLASS field.
== Using SIP RTP Audio CoS mark 5
– Executing [3092992828@from-internal:1] Macro(“PJSIP/500-00000044”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“PJSIP/500-00000044”, “TOUCH_MONITOR=1539258325.104”) in new stack
– Executing [s@macro-user-callerid:2] Set(“PJSIP/500-00000044”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“PJSIP/500-00000044”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“PJSIP/500-00000044”, “1?Set(REALCALLERIDNUM=500)”) in new stack
– Executing [s@macro-user-callerid:5] Set(“PJSIP/500-00000044”, “AMPUSER=500”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“PJSIP/500-00000044”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:7] Set(“PJSIP/500-00000044”, “AMPUSERCIDNAME=Gary Softphone”) in new stack
– Executing [s@macro-user-callerid:8] ExecIf(“PJSIP/500-00000044”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“PJSIP/500-00000044”, “0?report”) in new stack
– Executing [s@macro-user-callerid:10] Set(“PJSIP/500-00000044”, “AMPUSERCID=500”) in new stack
– Executing [s@macro-user-callerid:11] Set(“PJSIP/500-00000044”, “__DIAL_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-user-callerid:12] Set(“PJSIP/500-00000044”, “CALLERID(all)=“Gary Softphone” <500>”) in new stack
[2018-10-11 06:45:26] WARNING[27543][C-0000003a]: ast_expr2.fl:470 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected ‘>’, expecting ‘-’ or ‘!’ or ‘(’ or ‘’; Input:
“LIMIT”=“LIMIT” & 3 & 1 & >0 & 0>=
^
[2018-10-11 06:45:26] WARNING[27543][C-0000003a]: ast_expr2.fl:474 ast_yyerror: If you have questions, please refer to
– Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/500-00000044”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/500-00000044”, “1?Set(GROUP(concurrency_limit)=500)”) in new stack
– Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/500-00000044”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:16] NoOp(“PJSIP/500-00000044”, “Macro Depth is 1”) in new stack
– Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/500-00000044”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] GotoIf(“PJSIP/500-00000044”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,37)
– Executing [s@macro-user-callerid:37] Set(“PJSIP/500-00000044”, “CALLERID(number)=500”) in new stack
– Executing [s@macro-user-callerid:38] Set(“PJSIP/500-00000044”, “CALLERID(name)=Gary Softphone”) in new stack
– Executing [s@macro-user-callerid:39] GotoIf(“PJSIP/500-00000044”, “0?cnum”) in new stack
– Executing [s@macro-user-callerid:40] Set(“PJSIP/500-00000044”, “CDR(cnam)=Gary Softphone”) in new stack
– Executing [s@macro-user-callerid:41] Set(“PJSIP/500-00000044”, “CDR(cnum)=500”) in new stack
– Executing [s@macro-user-callerid:42] Set(“PJSIP/500-00000044”, “CHANNEL(language)=en”) in new stack
– Executing [3092992828@from-internal:2] Gosub(“PJSIP/500-00000044”, “sub-record-check,s,1(out,3092992828,dontcare)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“PJSIP/500-00000044”, “0?initialized”) in new stack
– Executing [s@sub-record-check:2] Set(“PJSIP/500-00000044”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:3] Set(“PJSIP/500-00000044”, “NOW=1539258326”) in new stack
– Executing [s@sub-record-check:4] Set(“PJSIP/500-00000044”, “__DAY=11”) in new stack
– Executing [s@sub-record-check:5] Set(“PJSIP/500-00000044”, “__MONTH=10”) in new stack
– Executing [s@sub-record-check:6] Set(“PJSIP/500-00000044”, “__YEAR=2018”) in new stack
– Executing [s@sub-record-check:7] Set(“PJSIP/500-00000044”, “__TIMESTR=20181011-064526”) in new stack
– Executing [s@sub-record-check:8] Set(“PJSIP/500-00000044”, “__FROMEXTEN=500”) in new stack
– Executing [s@sub-record-check:9] Set(“PJSIP/500-00000044”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:10] NoOp(“PJSIP/500-00000044”, “Recordings initialized”) in new stack
– Executing [s@sub-record-check:11] ExecIf(“PJSIP/500-00000044”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [s@sub-record-check:12] Set(“PJSIP/500-00000044”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“PJSIP/500-00000044”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [s@sub-record-check:14] GotoIf(“PJSIP/500-00000044”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [s@sub-record-check:17] GotoIf(“PJSIP/500-00000044”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] NoOp(“PJSIP/500-00000044”, “Outbound Recording Check from 500 to 3092992828”) in new stack
– Executing [out@sub-record-check:2] Set(“PJSIP/500-00000044”, “RECMODE=dontcare”) in new stack
– Executing [out@sub-record-check:3] ExecIf(“PJSIP/500-00000044”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [out@sub-record-check:7] Gosub(“PJSIP/500-00000044”, “recordcheck,1(dontcare,out,3092992828)”) in new stack
– Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/500-00000044”, “Starting recording check against dontcare”) in new stack
– Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/500-00000044”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [recordcheck@sub-record-check:3] Return(“PJSIP/500-00000044”, “”) in new stack
– Executing [out@sub-record-check:8] Return(“PJSIP/500-00000044”, “”) in new stack
– Executing [3092992828@from-internal:3] ExecIf(“PJSIP/500-00000044”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [3092992828@from-internal:4] Set(“PJSIP/500-00000044”, “MOHCLASS=default”) in new stack
– Executing [3092992828@from-internal:5] Set(“PJSIP/500-00000044”, “_NODEST=”) in new stack
– Executing [3092992828@from-internal:6] Macro(“PJSIP/500-00000044”, “dialout-trunk,1,3092992828,off”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“PJSIP/500-00000044”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“PJSIP/500-00000044”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] ExecIf(“PJSIP/500-00000044”, “0?Set(CALLERID(num)=500)”) in new stack
– Executing [s@macro-dialout-trunk:4] GotoIf(“PJSIP/500-00000044”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“PJSIP/500-00000044”, “DIAL_NUMBER=3092992828”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“PJSIP/500-00000044”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
– Executing [s@macro-dialout-trunk:7] Set(“PJSIP/500-00000044”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:8] Set(“PJSIP/500-00000044”, “DIAL_TRUNK_OPTIONS=T”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“PJSIP/500-00000044”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:10] GotoIf(“PJSIP/500-00000044”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:11] GotoIf(“PJSIP/500-00000044”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:12] Macro(“PJSIP/500-00000044”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/500-00000044”, “500”) in new stack
– Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/500-00000044”, “”) in new stack
– Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/500-00000044”, “off”) in new stack
– Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/500-00000044”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/500-00000044”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
– Executing [s@macro-outbound-callerid:6] ExecIf(“PJSIP/500-00000044”, “0?Set(REALCALLERIDNUM=500)”) in new stack
– Executing [s@macro-outbound-callerid:7] GotoIf(“PJSIP/500-00000044”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,11)
– Executing [s@macro-outbound-callerid:11] Set(“PJSIP/500-00000044”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:12] Set(“PJSIP/500-00000044”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] Set(“PJSIP/500-00000044”, “TRUNKOUTCID=hidden”) in new stack
– Executing [s@macro-outbound-callerid:14] GotoIf(“PJSIP/500-00000044”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,19)
– Executing [s@macro-outbound-callerid:19] ExecIf(“PJSIP/500-00000044”, “1?Set(CALLERID(all)=hidden)”) in new stack
– Executing [s@macro-outbound-callerid:20] ExecIf(“PJSIP/500-00000044”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:21] ExecIf(“PJSIP/500-00000044”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/500-00000044”, “1?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:23] ExecIf(“PJSIP/500-00000044”, “1?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
– Executing [s@macro-outbound-callerid:24] Set(“PJSIP/500-00000044”, “CDR(outbound_cnum)=”) in new stack
– Executing [s@macro-outbound-callerid:25] Set(“PJSIP/500-00000044”, “CDR(outbound_cnam)=hidden”) in new stack
– Executing [s@macro-dialout-trunk:13] GosubIf(“PJSIP/500-00000044”, “0?sub-flp-1,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“PJSIP/500-00000044”, “OUTNUM=3092992828”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“PJSIP/500-00000044”, “custom=SIP/pstn1”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“PJSIP/500-00000044”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:17] ExecIf(“PJSIP/500-00000044”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:18] Macro(“PJSIP/500-00000044”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/500-00000044”, “”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“PJSIP/500-00000044”, “0?skipcrm”) in new stack
– Executing [s@macro-dialout-trunk:20] Set(“PJSIP/500-00000044”, “__CRM_DIRECTION=OUTBOUND”) in new stack
– Executing [s@macro-dialout-trunk:21] Set(“PJSIP/500-00000044”, “__CRM_DESTINATION=3092992828”) in new stack
– Executing [s@macro-dialout-trunk:22] Set(“PJSIP/500-00000044”, “__CRM_SOURCE=500”) in new stack
– Executing [s@macro-dialout-trunk:23] AGI(“PJSIP/500-00000044”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <PJSIP/500-00000044>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@macro-dialout-trunk:24] Set(“PJSIP/500-00000044”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
– Executing [s@macro-dialout-trunk:25] NoOp(“PJSIP/500-00000044”, “CRM Finished”) in new stack
– Executing [s@macro-dialout-trunk:26] GotoIf(“PJSIP/500-00000044”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:27] ExecIf(“PJSIP/500-00000044”, “1?Set(CONNECTEDLINE(num,i)=3092992828)”) in new stack
– Executing [s@macro-dialout-trunk:28] ExecIf(“PJSIP/500-00000044”, “0?Set(CONNECTEDLINE(name,i)=CID:)”) in new stack
– Executing [s@macro-dialout-trunk:29] ExecIf(“PJSIP/500-00000044”, “1?Set(CONNECTEDLINE(name,i)=CID:(Hidden))”) in new stack
– Executing [s@macro-dialout-trunk:30] GotoIf(“PJSIP/500-00000044”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:31] Dial(“PJSIP/500-00000044”, “SIP/pstn1/3092992828,300,Tb(func-apply-sipheaders^s^1)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– SIP/pstn1-00000024 Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/pstn1-00000024”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
– Executing [s@func-apply-sipheaders:2] NoOp(“SIP/pstn1-00000024”, “Applying SIP Headers to channel”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“SIP/pstn1-00000024”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:4] While(“SIP/pstn1-00000024”, “0”) in new stack
– Jumping to priority 8
– Executing [s@func-apply-sipheaders:9] Return(“SIP/pstn1-00000024”, “”) in new stack
== Spawn extension (from-pstn, 3092992828, 1) exited non-zero on ‘SIP/pstn1-00000024’
– SIP/pstn1-00000024 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– Called SIP/pstn1/3092992828
– Got SIP response 504 “Service Unavailable” back from 172.16.48.141:5061
– SIP/pstn1-00000024 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:32] NoOp(“PJSIP/500-00000044”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 102”) in new stack
– Executing [s@macro-dialout-trunk:33] GotoIf(“PJSIP/500-00000044”, “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/500-00000044”, “RC=102”) in new stack
– Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“PJSIP/500-00000044”, “102,1”) in new stack
– Goto (macro-dialout-trunk,102,1)
– Executing [102@macro-dialout-trunk:1] Goto(“PJSIP/500-00000044”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] NoOp(“PJSIP/500-00000044”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 102 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:2] ExecIf(“PJSIP/500-00000044”, “1?Set(CALLERID(number)=500)”) in new stack
– Executing [3092992828@from-internal:7] Macro(“PJSIP/500-00000044”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“PJSIP/500-00000044”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“PJSIP/500-00000044”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“PJSIP/500-00000044”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“PJSIP/500-00000044”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
– <PJSIP/500-00000044> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <PJSIP/500-00000044> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
– Executing [h@from-internal:1] Macro(“PJSIP/500-00000044”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/500-00000044”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/500-00000044”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] NoOp(“PJSIP/500-00000044”, " monior file= ") in new stack
– Executing [s@macro-hangupcall:5] AGI(“PJSIP/500-00000044”, “attendedtransfer-rec-restart.php,”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
– <PJSIP/500-00000044>AGI Script attendedtransfer-rec-restart.php completed, returning 0
– Executing [s@macro-hangupcall:6] Hangup(“PJSIP/500-00000044”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/500-00000044’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/500-00000044’
– PJSIP/500-00000044 Internal Gosub(crm-hangup,s,1) start
– Executing [s@crm-hangup:1] NoOp(“PJSIP/500-00000044”, “Sending Hangup to CRM”) in new stack
– Executing [s@crm-hangup:2] NoOp(“PJSIP/500-00000044”, “HANGUP CAUSE: 102”) in new stack
– Executing [s@crm-hangup:3] ExecIf(“PJSIP/500-00000044”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
– Executing [s@crm-hangup:4] NoOp(“PJSIP/500-00000044”, “MASTER CHANNEL: 1539258325.104 = 1539258325.104”) in new stack
– Executing [s@crm-hangup:5] GotoIf(“PJSIP/500-00000044”, “0?return”) in new stack
– Executing [s@crm-hangup:6] Set(“PJSIP/500-00000044”, “__CRM_HANGUP=1”) in new stack
– Executing [s@crm-hangup:7] AGI(“PJSIP/500-00000044”, “sangomacrm.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
– <PJSIP/500-00000044>AGI Script sangomacrm.agi completed, returning 0
– Executing [s@crm-hangup:8] Return(“PJSIP/500-00000044”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/500-00000044’
– PJSIP/500-00000044 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
CUSD276-PBX*CLI>


(Tom Ray) #2

Your SPA3000 is rejecting the call. How is this setup on the PBX and the SPA?


(Gcameron) #3

These are the settings for the pstn line in the SPA300:


(Gcameron) #4


(Gcameron) #5


(Gcameron) #6

These are the sip settings in the trunk:
image
The asterisk log shows I have 1 peer connected and it is in ok staus


#7

Do incoming calls work ok? If not, check the SPA Info page for PSTN Line Voltage (should be about 48 V). If near 0, something is wired wrong. If you are using the FXS port (Line 1) of the SPA, the cord should be two conductors; on some units the FXO port appears on pins 2 and 5 of the Phone jack.

Other strange things which are probably not your present problem:

You have Register: yes, but your trunk is configured statically.

Does your landline accept the 10-digit format you are dialing (in most areas, you must dial 1 + areacode + number)?

Though it wouldn’t be accessed on an outbound call, the number shown in Dial Plan 2 appears to have been ported from Citizens / Frontier to Mediacom. If the SPA is connected to a Mediacom MTA, it’s possible that there is an incompatibility requiring adjusting one of the FXO settings.


(Tom Ray) #8

I guess I should have been more specific based on the SIP code that I posted originally from the log. The SPA is rejecting the call because it is timing out in some fashion. A 504 error means the server Asterisk is talking to isn’t responding to their INVITE with a 1XX reply within the proper amount of time.


(Gcameron) #9

Incoming calls do not work, It is connected to a mediacom MTA. I had a bad cable from Mediacom MTA to the SPA. I can now make outgoing calls, incoming still do not pick up. Also I can hear the person on the other line but they cannot hear me


(Gcameron) #10

When making an incoming call the line rings once and the i get a dial tone


#11

Try changing Dial Plan 2 to
(<:3094623499>S0)

Possibly a codec issue; try setting Use Pref Codec Only in SPA and allowing only ulaw for trunk.

If no luck, do
sip set debug on
at Asterisk command prompt, make a failing call and post the log.