Needing help on trunk pulling my hair out right about now

I’m going to try and make this as easy as possible but need a little help trying to make inbound and outbound phone calls i have attached my log file below please bare with me thank you i’m currently using gotrunk as my trunk provider

[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@func-apply-sipheaders:9] Return(“SIP/gotrunk-00000006”, “”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] app_stack.c: Spawn extension (from-trunk, 2120001234, 1) exited non-zero on ‘SIP/gotrunk-00000006’
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] app_stack.c: SIP/gotrunk-00000006 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] app_dial.c: Called SIP/gotrunk/2120001234
[2019-02-18 07:18:58] NOTICE[2139][C-0000000d] chan_sip.c: Failed to authenticate on INVITE to ‘“Chris Miguez” <sip:Unknown “”"ip address and port number “”>;tag=as3902c43e’
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] app_dial.c: SIP/gotrunk-00000006 is circuit-busy
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-dialout-trunk:32] NoOp(“PJSIP/251-0000000d”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 21”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-dialout-trunk:33] GotoIf(“PJSIP/251-0000000d”, “0?continue,1:s-CONGESTION,1”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx_builtins.c: Goto (macro-dialout-trunk,s-CONGESTION,1)
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“PJSIP/251-0000000d”, “RC=21”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“PJSIP/251-0000000d”, “21,1”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx_builtins.c: Goto (macro-dialout-trunk,21,1)
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [21@macro-dialout-trunk:1] Goto(“PJSIP/251-0000000d”, “continue,1”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp(“PJSIP/251-0000000d”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf(“PJSIP/251-0000000d”, “1?Set(CALLERID(number)=251)”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [2120001234@from-internal:8] Macro(“PJSIP/251-0000000d”, “outisbusy,”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-outisbusy:1] Progress(“PJSIP/251-0000000d”, “”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-outisbusy:2] GotoIf(“PJSIP/251-0000000d”, “0?emergency,1”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-outisbusy:3] GotoIf(“PJSIP/251-0000000d”, “0?intracompany,1”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-outisbusy:4] Playback(“PJSIP/251-0000000d”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
[2019-02-18 07:18:58] VERBOSE[9088][C-0000000d] file.c: <PJSIP/251-0000000d> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] file.c: <PJSIP/251-0000000d> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [h@from-internal:1] Macro(“PJSIP/251-0000000d”, “hangupcall”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/251-0000000d”, “1?theend”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/251-0000000d”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/251-0000000d”, " monior file= ") in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-hangupcall:5] AGI(“PJSIP/251-0000000d”, “attendedtransfer-rec-restart.php,”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] res_agi.c: <PJSIP/251-0000000d>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“PJSIP/251-0000000d”, “”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/251-0000000d’ in macro ‘hangupcall’
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000000d’
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] app_stack.c: PJSIP/251-0000000d Internal Gosub(crm-hangup,s,1) start
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/251-0000000d”, “Sending Hangup to CRM”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/251-0000000d”, “HANGUP CAUSE: 21”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/251-0000000d”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/251-0000000d”, “MASTER CHANNEL: 1550474338.19 = 1550474338.19”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/251-0000000d”, “0?return”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/251-0000000d”, “__CRM_HANGUP=1”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/251-0000000d”, “sangomacrm.agi”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] res_agi.c: <PJSIP/251-0000000d>AGI Script sangomacrm.agi completed, returning 0
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/251-0000000d”, “”) in new stack
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000000d’
[2019-02-18 07:18:59] VERBOSE[9088][C-0000000d] app_stack.c: PJSIP/251-0000000d Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

i have attached my dialing pattern and other info related to my trunk configuration and outgoing and incoming settings i have redacted a few bits of info but hope its not needed to fix the problem thanks

sorry the form is being stupid and not allowing me to upload all the photos and not allowing me to post a imgure link to show all photos

If you are using IP authentication with GoTrunk, check that your public IP address is correctly set on their portal.

If using SIP username/password, make sure that you have defaultuser and remotesecret configured properly in the Peer settings for the trunk.

Also check that both the outbound number and caller ID are being sent including the country code, e.g. 18004377950 for US.

If you still have trouble, at the Asterisk command line type:
sip set debug on
and attempt an outbound call. You should see the INVITE requests and the responses on the console and in the Asterisk log. Redact them appropriately and post them here.

here is the updated log file i will be putting it in debug mode i have also attached a screenshot of my sip endpoint settings in this reply

[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“PJSIP/251-00000019”, “RC=28”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“PJSIP/251-00000019”, “28,1”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx_builtins.c: Goto (macro-dialout-trunk,28,1)
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [28@macro-dialout-trunk:1] Goto(“PJSIP/251-00000019”, “s-INVALIDNMBR,1”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx_builtins.c: Goto (macro-dialout-trunk,s-INVALIDNMBR,1)
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [s-INVALIDNMBR@macro-dialout-trunk:1] NoOp(“PJSIP/251-00000019”, “Dial failed due to trunk reporting Address Incomplete - giving up”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [s-INVALIDNMBR@macro-dialout-trunk:2] Progress(“PJSIP/251-00000019”, “”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] pbx.c: Executing [s-INVALIDNMBR@macro-dialout-trunk:3] Playback(“PJSIP/251-00000019”, “ss-noservice,noanswer”) in new stack
[2019-02-18 18:04:36] VERBOSE[7727][C-0000001e] file.c: <PJSIP/251-00000019> Playing ‘ss-noservice.g722’ (language ‘en’)
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [h@from-internal:1] Macro(“PJSIP/251-00000019”, “hangupcall”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/251-00000019”, “1?theend”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/251-00000019”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/251-00000019”, " monior file= ") in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@macro-hangupcall:5] AGI(“PJSIP/251-00000019”, “attendedtransfer-rec-restart.php,”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] res_agi.c: <PJSIP/251-00000019>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“PJSIP/251-00000019”, “”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/251-00000019’ in macro ‘hangupcall’
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-00000019’
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] app_stack.c: PJSIP/251-00000019 Internal Gosub(crm-hangup,s,1) start
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/251-00000019”, “Sending Hangup to CRM”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/251-00000019”, “HANGUP CAUSE: 28”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/251-00000019”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/251-00000019”, “MASTER CHANNEL: 1550513076.93 = 1550513076.93”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/251-00000019”, “0?return”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/251-00000019”, “__CRM_HANGUP=1”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/251-00000019”, “sangomacrm.agi”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] res_agi.c: <PJSIP/251-00000019>AGI Script sangomacrm.agi completed, returning 0
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/251-00000019”, “”) in new stack
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-00000019’
[2019-02-18 18:04:37] VERBOSE[7727][C-0000001e] app_stack.c: PJSIP/251-00000019 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2019-02-18 18:04:42] VERBOSE[14507] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘144.202.70.211’
[2019-02-18 18:04:42] VERBOSE[14507] netsock2.c: Using SIP RTP Audio TOS bits 184
[2019-02-18 18:04:42] VERBOSE[14507] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
[2019-02-18 18:04:42] VERBOSE[14507] netsock2.c: Using SIP RTP Audio CoS mark 5
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:1] Macro(“PJSIP/251-0000001a”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:1] Set(“PJSIP/251-0000001a”, “TOUCH_MONITOR=1550513082.95”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:2] Set(“PJSIP/251-0000001a”, “AMPUSER=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:3] GotoIf(“PJSIP/251-0000001a”, “0?report”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:4] ExecIf(“PJSIP/251-0000001a”, “1?Set(REALCALLERIDNUM=251)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:5] Set(“PJSIP/251-0000001a”, “AMPUSER=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:6] GotoIf(“PJSIP/251-0000001a”, “0?limit”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:7] Set(“PJSIP/251-0000001a”, “AMPUSERCIDNAME=Chris Desk”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:8] ExecIf(“PJSIP/251-0000001a”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:9] GotoIf(“PJSIP/251-0000001a”, “0?report”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:10] Set(“PJSIP/251-0000001a”, “AMPUSERCID=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:11] Set(“PJSIP/251-0000001a”, “__DIAL_OPTIONS=HhTtr”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:12] Set(“PJSIP/251-0000001a”, “CALLERID(all)=“Chris Desk” <251>”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/251-0000001a”, “0?limit”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/251-0000001a”, “1?Set(GROUP(concurrency_limit)=251)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/251-0000001a”, “0?Set(CHANNEL(language)=)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:16] NoOp(“PJSIP/251-0000001a”, “Macro Depth is 1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/251-0000001a”, “1?report2:macroerror”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-user-callerid,s,18)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:18] GotoIf(“PJSIP/251-0000001a”, “1?continue”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-user-callerid,s,37)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:37] Set(“PJSIP/251-0000001a”, “CALLERID(number)=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:38] Set(“PJSIP/251-0000001a”, “CALLERID(name)=Chris Desk”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:39] GotoIf(“PJSIP/251-0000001a”, “0?cnum”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:40] Set(“PJSIP/251-0000001a”, “CDR(cnam)=Chris Desk”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:41] Set(“PJSIP/251-0000001a”, “CDR(cnum)=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-user-callerid:42] Set(“PJSIP/251-0000001a”, “CHANNEL(language)=en”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:2] Gosub(“PJSIP/251-0000001a”, “sub-record-check,s,1(out,92120001234,dontcare)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:1] GotoIf(“PJSIP/251-0000001a”, “0?initialized”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:2] Set(“PJSIP/251-0000001a”, “__REC_STATUS=INITIALIZED”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:3] Set(“PJSIP/251-0000001a”, “NOW=1550513082”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:4] Set(“PJSIP/251-0000001a”, “__DAY=18”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:5] Set(“PJSIP/251-0000001a”, “__MONTH=02”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:6] Set(“PJSIP/251-0000001a”, “__YEAR=2019”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:7] Set(“PJSIP/251-0000001a”, “__TIMESTR=20190218-180442”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:8] Set(“PJSIP/251-0000001a”, “__FROMEXTEN=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:9] Set(“PJSIP/251-0000001a”, “__MON_FMT=wav”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:10] NoOp(“PJSIP/251-0000001a”, “Recordings initialized”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:11] ExecIf(“PJSIP/251-0000001a”, “0?Set(ARG3=dontcare)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:12] Set(“PJSIP/251-0000001a”, “REC_POLICY_MODE_SAVE=”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:13] ExecIf(“PJSIP/251-0000001a”, “0?Set(REC_STATUS=NO)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:14] GotoIf(“PJSIP/251-0000001a”, “3?checkaction”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (sub-record-check,s,17)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@sub-record-check:17] GotoIf(“PJSIP/251-0000001a”, “1?sub-record-check,out,1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (sub-record-check,out,1)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [out@sub-record-check:1] NoOp(“PJSIP/251-0000001a”, “Outbound Recording Check from 251 to 92120001234”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [out@sub-record-check:2] Set(“PJSIP/251-0000001a”, “RECMODE=dontcare”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [out@sub-record-check:3] ExecIf(“PJSIP/251-0000001a”, “1?Goto(routewins)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (sub-record-check,out,7)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [out@sub-record-check:7] Gosub(“PJSIP/251-0000001a”, “recordcheck,1(dontcare,out,92120001234)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/251-0000001a”, “Starting recording check against dontcare”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/251-0000001a”, “dontcare”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [recordcheck@sub-record-check:3] Return(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [out@sub-record-check:8] Return(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:3] ExecIf(“PJSIP/251-0000001a”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:4] Set(“PJSIP/251-0000001a”, “MOHCLASS=default”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:5] ExecIf(“PJSIP/251-0000001a”, “0?Set(TRUNKCIDOVERRIDE=16822266684)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:6] Set(“PJSIP/251-0000001a”, “_NODEST=”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [92120001234@from-internal:7] Macro(“PJSIP/251-0000001a”, “dialout-trunk,1,992120001234,off”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:1] Set(“PJSIP/251-0000001a”, “DIAL_TRUNK=1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf(“PJSIP/251-0000001a”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf(“PJSIP/251-0000001a”, “0?sub-pincheck,s,1()”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERID(num)=251)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf(“PJSIP/251-0000001a”, “0?disabletrunk,1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:6] Set(“PJSIP/251-0000001a”, “DIAL_NUMBER=992120001234”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:7] Set(“PJSIP/251-0000001a”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:8] Set(“PJSIP/251-0000001a”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:9] Set(“PJSIP/251-0000001a”, “DIAL_TRUNK_OPTIONS=T”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf(“PJSIP/251-0000001a”, “1?nomax”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf(“PJSIP/251-0000001a”, “0?skipoutcid”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:13] Macro(“PJSIP/251-0000001a”, “outbound-callerid,1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/251-0000001a”, “251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/251-0000001a”, “off”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf(“PJSIP/251-0000001a”, “0?Set(REALCALLERIDNUM=251)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf(“PJSIP/251-0000001a”, “0?Set(AMPUSER=251)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf(“PJSIP/251-0000001a”, “1?normcid”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-outbound-callerid,s,12)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:12] Set(“PJSIP/251-0000001a”, “USEROUTCID=Chris Miguez”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:13] Set(“PJSIP/251-0000001a”, “EMERGENCYCID=”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:14] Set(“PJSIP/251-0000001a”, “TRUNKOUTCID=6822266684”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf(“PJSIP/251-0000001a”, “1?trunkcid”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:20] ExecIf(“PJSIP/251-0000001a”, “1?Set(CALLERID(all)=6822266684)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf(“PJSIP/251-0000001a”, “1?Set(CALLERID(all)=Chris Miguez)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERID(all)=)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf(“PJSIP/251-0000001a”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:25] Set(“PJSIP/251-0000001a”, “CDR(outbound_cnum)=”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-outbound-callerid:26] Set(“PJSIP/251-0000001a”, “CDR(outbound_cnam)=Chris Miguez”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf(“PJSIP/251-0000001a”, “0?sub-flp-1,s,1()”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:15] Set(“PJSIP/251-0000001a”, “OUTNUM=992120001234”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:16] Set(“PJSIP/251-0000001a”, “custom=SIP/gotrunk”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf(“PJSIP/251-0000001a”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf(“PJSIP/251-0000001a”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:19] Macro(“PJSIP/251-0000001a”, “dialout-trunk-predial-hook,”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf(“PJSIP/251-0000001a”, “0?skipcrm”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:21] Set(“PJSIP/251-0000001a”, “__CRM_DIRECTION=OUTBOUND”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:22] Set(“PJSIP/251-0000001a”, “__CRM_DESTINATION=992120001234”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:23] Set(“PJSIP/251-0000001a”, “__CRM_SOURCE=251”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:24] AGI(“PJSIP/251-0000001a”, “sangomacrm.agi”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] res_agi.c: <PJSIP/251-0000001a>AGI Script sangomacrm.agi completed, returning 0
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:25] Set(“PJSIP/251-0000001a”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp(“PJSIP/251-0000001a”, “CRM Finished”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf(“PJSIP/251-0000001a”, “0?bypass,1”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf(“PJSIP/251-0000001a”, “1?Set(CONNECTEDLINE(num,i)=992120001234)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf(“PJSIP/251-0000001a”, “1?Set(CONNECTEDLINE(name,i)=CID:)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf(“PJSIP/251-0000001a”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden))”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf(“PJSIP/251-0000001a”, “0?customtrunk”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:32] Dial(“PJSIP/251-0000001a”, “SIP/gotrunk/992120001234,300,Tb(func-apply-sipheaders^s^1,(1))”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] netsock2.c: Using SIP RTP TOS bits 184
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] netsock2.c: Using SIP RTP CoS mark 5
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] app_stack.c: SIP/gotrunk-00000009 Internal Gosub(func-apply-sipheaders,s,1(1)) start
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/gotrunk-00000009”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp(“SIP/gotrunk-00000009”, “Applying SIP Headers to channel SIP/gotrunk-00000009”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:3] Set(“SIP/gotrunk-00000009”, “TECH=SIP”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:4] Set(“SIP/gotrunk-00000009”, “SIPHEADERKEYS=”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:5] While(“SIP/gotrunk-00000009”, “0”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] app_while.c: Jumping to priority 12
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@func-apply-sipheaders:13] Return(“SIP/gotrunk-00000009”, “”) in new stack
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] app_stack.c: Spawn extension (from-trunk, 92120001234, 1) exited non-zero on ‘SIP/gotrunk-00000009’
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] app_stack.c: SIP/gotrunk-00000009 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
[2019-02-18 18:04:42] VERBOSE[7766][C-0000001f] app_dial.c: Called SIP/gotrunk/992120001234
[2019-02-18 18:04:49] VERBOSE[2113][C-0000001f] chan_sip.c: Got SIP response 603 “Declined” back from 69.164.221.134:5060
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] app_dial.c: SIP/gotrunk-00000009 is busy
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:33] NoOp(“PJSIP/251-0000001a”, “Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 21”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-dialout-trunk:34] GotoIf(“PJSIP/251-0000001a”, “0?continue,1:s-BUSY,1”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-dialout-trunk,s-BUSY,1)
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s-BUSY@macro-dialout-trunk:1] NoOp(“PJSIP/251-0000001a”, “Dial failed due to trunk reporting BUSY - giving up”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s-BUSY@macro-dialout-trunk:2] PlayTones(“PJSIP/251-0000001a”, “busy”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s-BUSY@macro-dialout-trunk:3] Busy(“PJSIP/251-0000001a”, “20”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] app_macro.c: Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on ‘PJSIP/251-0000001a’ in macro ‘dialout-trunk’
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Spawn extension (from-internal, 92120001234, 7) exited non-zero on ‘PJSIP/251-0000001a’
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [h@from-internal:1] Macro(“PJSIP/251-0000001a”, “hangupcall”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/251-0000001a”, “1?theend”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/251-0000001a”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/251-0000001a”, " monior file= ") in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-hangupcall:5] AGI(“PJSIP/251-0000001a”, “attendedtransfer-rec-restart.php,”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] res_agi.c: <PJSIP/251-0000001a>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/251-0000001a’ in macro ‘hangupcall’
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000001a’
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] app_stack.c: PJSIP/251-0000001a Internal Gosub(crm-hangup,s,1) start
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/251-0000001a”, “Sending Hangup to CRM”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/251-0000001a”, “HANGUP CAUSE: 17”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/251-0000001a”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/251-0000001a”, “MASTER CHANNEL: 1550513082.95 = 1550513082.95”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/251-0000001a”, “0?return”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/251-0000001a”, “__CRM_HANGUP=1”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/251-0000001a”, “sangomacrm.agi”) in new stack
[2019-02-18 18:04:49] VERBOSE[7766][C-0000001f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-18 18:04:50] VERBOSE[7766][C-0000001f] res_agi.c: <PJSIP/251-0000001a>AGI Script sangomacrm.agi completed, returning 0
[2019-02-18 18:04:50] VERBOSE[7766][C-0000001f] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/251-0000001a”, “”) in new stack
[2019-02-18 18:04:50] VERBOSE[7766][C-0000001f] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000001a’
[2019-02-18 18:04:50] VERBOSE[7766][C-0000001f] app_stack.c: PJSIP/251-0000001a Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

You need to provide both options and note which one to use when. This is why there was no SIP messaging output for the provided call. The OP is using PJSIP not Chan_SIP.

@aspieboy77 Please do the test call again and since you’re using PJSIP the proper command is going to be pjsip set logger on, then make the call again to provide the new output.

1 Like

Yes, but in the original post, he had pjsip extension and chan_sip trunk. GoTrunk has extensive documentation, all chan_sip. It seemed unlikely that he would jump ship.

Yeah, it’s a mess. It’s a 603 Decline from the provider. That indicates the trunk isn’t configured right.

so i need a Little bit of help if that is ok getting this running right i have tried to make sip extensions but my ip phones do not register with sip extensions please im all ears and wanting to get this to work thanks

just tell me what to do first and i will try it thanks

There is no problem whatsoever using pjsip extensions with chan_sip trunks (or any other combination).

Assuming that your extensions are working properly (you can call from one to another with no trouble), leave them alone.

Although I have a preference for pjsip, GoTrunk has detailed documentation for chan_sip and nothing for pjsip, so I suggest that you stick with chan_sip for GoTrunk.

Turn on SIP debug, make a (failing) test call and post the outgoing INVITEs and the resulting responses. When you redact this data, mask account or phone numbers with xxxx, preserving the format and keeping country codes and area codes intact. For example, redact 12123456789 to 1212xxxxxxx.

I second that recommendation - go with what the provider SAYS they will support - if GoTrunk documents and supports chan_sip, that is the way to go with them - you can still have all your extensions on PJSIP - just take the path of least resistance and set it up to their spec.

Speaking from direct experience, the provider doesn’t not care if you are using Chan_SIP, Chan_PJSIP, Sophia, SIP-B or whatever your SIP stack might be. They just don’t. They support SIP, plain and simple.

What you are equating “Chan_SIP” support with is the fact they have documentation on it. Let’s be honest here, just because they have some pretty screen caps of the GUI their config example is the barest bones config you can get. There’s nothing here showing DTMF support, codecs, etc, etc. There’s not even the proper setting to actually not auth incoming calls.

Just because a provider has a Chan_SIP config but not a PJSIP config doesn’t mean anything. It is a very rare case when a provider has current Chan_SIP configs. Most still have Asterisk 1.6/1.8 era configs with settings that have been replaced. Some have settings that don’t even exist.

Basically, just because the provider hasn’t updated their config examples for Asterisk in the last 10 years doesn’t mean they only support Chan_SIP.

Basically, just because the provider hasn’t updated their config examples for Asterisk in the last 10 years doesn’t mean they only support Chan_SIP .

Yeah, that line always works when you are calling Tech Support…:sunglasses:

Pick your fights - that’s all I am saying - yes, PJSIP and chan_sip are SIP - but their settings look very different in FreePBX and if you don’t know how to translate, support is NOT going to be very helpful.

We first started doing Asterisk in 2004 - at that time EVERYONE we called when we needed help said “Aster…what?” - fast forward to 2010 and they had heard of it but still didn’t have a clue - fast forward to today and we only occasionally get people that don’t know it - but still, when you are using a suppliers product, you have to follow their direction, or you are on your own.

Are you under the impression that providers/telecoms/ITSPs are sitting around learning every PBX/voice system out there? They will go through and select some to interop with their platform and provider basic setup guides on how to do things. Every PBX/voice system has their own names for settings and the way they do them.

The telecoms/providers/LECs/ITSPs aren’t sitting around to support your PBX. They will help you diagnose your issue, troubleshoot your issue and if they happen to know what your system is perhaps give you some pointers.

Again, from experience in the grand scheme of this industry many places have commercial PBX systems over OSS based systems. So support is generally more focused on Avaya, Nortels, Mitels, 3CX or the other commercial brands over Asterisk/FreeSWITCH. Those two are always the after thoughts. Also, most the major commercial brands have interop programs with platforms like Broadsoft that these providers can use and are also provided instructions they pass on.

They damn well better support my using Asterisk with them or I am using someone else:

Putting up with a provider that can’t at the bare minimum give me a working trunk config to use with their services means I am not going to use that provider - period.

Life’s too short…

[2019-02-19 16:47:14] VERBOSE[14574] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘144.202.70.211’
[2019-02-19 16:47:14] VERBOSE[14574] netsock2.c: Using SIP RTP Audio TOS bits 184
[2019-02-19 16:47:14] VERBOSE[14574] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
[2019-02-19 16:47:14] VERBOSE[14574] netsock2.c: Using SIP RTP Audio CoS mark 5
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:1] Macro(“PJSIP/251-0000002c”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:1] Set(“PJSIP/251-0000002c”, “TOUCH_MONITOR=1550594834.123”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:2] Set(“PJSIP/251-0000002c”, “AMPUSER=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:3] GotoIf(“PJSIP/251-0000002c”, “0?report”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:4] ExecIf(“PJSIP/251-0000002c”, “1?Set(REALCALLERIDNUM=251)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:5] Set(“PJSIP/251-0000002c”, “AMPUSER=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:6] GotoIf(“PJSIP/251-0000002c”, “0?limit”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:7] Set(“PJSIP/251-0000002c”, “AMPUSERCIDNAME=Chris Desk”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:8] ExecIf(“PJSIP/251-0000002c”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:9] GotoIf(“PJSIP/251-0000002c”, “0?report”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:10] Set(“PJSIP/251-0000002c”, “AMPUSERCID=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:11] Set(“PJSIP/251-0000002c”, “__DIAL_OPTIONS=HhTtr”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:12] Set(“PJSIP/251-0000002c”, “CALLERID(all)=“Chris Desk” <251>”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/251-0000002c”, “0?limit”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/251-0000002c”, “1?Set(GROUP(concurrency_limit)=251)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/251-0000002c”, “0?Set(CHANNEL(language)=)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:16] NoOp(“PJSIP/251-0000002c”, “Macro Depth is 1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/251-0000002c”, “1?report2:macroerror”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-user-callerid,s,18)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:18] GotoIf(“PJSIP/251-0000002c”, “1?continue”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-user-callerid,s,37)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:37] Set(“PJSIP/251-0000002c”, “CALLERID(number)=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:38] Set(“PJSIP/251-0000002c”, “CALLERID(name)=Chris Desk”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:39] GotoIf(“PJSIP/251-0000002c”, “0?cnum”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:40] Set(“PJSIP/251-0000002c”, “CDR(cnam)=Chris Desk”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:41] Set(“PJSIP/251-0000002c”, “CDR(cnum)=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-user-callerid:42] Set(“PJSIP/251-0000002c”, “CHANNEL(language)=en”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:2] Gosub(“PJSIP/251-0000002c”, “sub-record-check,s,1(out,92120001234,dontcare)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:1] GotoIf(“PJSIP/251-0000002c”, “0?initialized”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:2] Set(“PJSIP/251-0000002c”, “__REC_STATUS=INITIALIZED”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:3] Set(“PJSIP/251-0000002c”, “NOW=1550594834”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:4] Set(“PJSIP/251-0000002c”, “__DAY=19”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:5] Set(“PJSIP/251-0000002c”, “__MONTH=02”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:6] Set(“PJSIP/251-0000002c”, “__YEAR=2019”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:7] Set(“PJSIP/251-0000002c”, “__TIMESTR=20190219-164714”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:8] Set(“PJSIP/251-0000002c”, “__FROMEXTEN=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:9] Set(“PJSIP/251-0000002c”, “__MON_FMT=wav”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:10] NoOp(“PJSIP/251-0000002c”, “Recordings initialized”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:11] ExecIf(“PJSIP/251-0000002c”, “0?Set(ARG3=dontcare)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:12] Set(“PJSIP/251-0000002c”, “REC_POLICY_MODE_SAVE=”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:13] ExecIf(“PJSIP/251-0000002c”, “0?Set(REC_STATUS=NO)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:14] GotoIf(“PJSIP/251-0000002c”, “3?checkaction”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (sub-record-check,s,17)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@sub-record-check:17] GotoIf(“PJSIP/251-0000002c”, “1?sub-record-check,out,1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (sub-record-check,out,1)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [out@sub-record-check:1] NoOp(“PJSIP/251-0000002c”, “Outbound Recording Check from 251 to 92120001234”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [out@sub-record-check:2] Set(“PJSIP/251-0000002c”, “RECMODE=dontcare”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [out@sub-record-check:3] ExecIf(“PJSIP/251-0000002c”, “1?Goto(routewins)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (sub-record-check,out,7)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [out@sub-record-check:7] Gosub(“PJSIP/251-0000002c”, “recordcheck,1(dontcare,out,92120001234)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/251-0000002c”, “Starting recording check against dontcare”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/251-0000002c”, “dontcare”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:3] Return(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [out@sub-record-check:8] Return(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:3] ExecIf(“PJSIP/251-0000002c”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:4] Set(“PJSIP/251-0000002c”, “MOHCLASS=default”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:5] ExecIf(“PJSIP/251-0000002c”, “0?Set(TRUNKCIDOVERRIDE=16822266684)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:6] Set(“PJSIP/251-0000002c”, “_NODEST=”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [92120001234@from-internal:7] Macro(“PJSIP/251-0000002c”, “dialout-trunk,1,992120001234,off”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:1] Set(“PJSIP/251-0000002c”, “DIAL_TRUNK=1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf(“PJSIP/251-0000002c”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf(“PJSIP/251-0000002c”, “0?sub-pincheck,s,1()”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERID(num)=251)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf(“PJSIP/251-0000002c”, “0?disabletrunk,1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:6] Set(“PJSIP/251-0000002c”, “DIAL_NUMBER=992120001234”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:7] Set(“PJSIP/251-0000002c”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:8] Set(“PJSIP/251-0000002c”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:9] Set(“PJSIP/251-0000002c”, “DIAL_TRUNK_OPTIONS=T”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf(“PJSIP/251-0000002c”, “1?nomax”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-dialout-trunk,s,12)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf(“PJSIP/251-0000002c”, “0?skipoutcid”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:13] Macro(“PJSIP/251-0000002c”, “outbound-callerid,1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/251-0000002c”, “251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/251-0000002c”, “off”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:6] ExecIf(“PJSIP/251-0000002c”, “0?Set(REALCALLERIDNUM=251)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:7] ExecIf(“PJSIP/251-0000002c”, “0?Set(AMPUSER=251)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:8] GotoIf(“PJSIP/251-0000002c”, “1?normcid”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-outbound-callerid,s,12)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:12] Set(“PJSIP/251-0000002c”, “USEROUTCID=Chris Miguez”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:13] Set(“PJSIP/251-0000002c”, “EMERGENCYCID=”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:14] Set(“PJSIP/251-0000002c”, “TRUNKOUTCID=6822266684”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:15] GotoIf(“PJSIP/251-0000002c”, “1?trunkcid”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:20] ExecIf(“PJSIP/251-0000002c”, “1?Set(CALLERID(all)=6822266684)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:21] ExecIf(“PJSIP/251-0000002c”, “1?Set(CALLERID(all)=Chris Miguez)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERID(all)=)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:23] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:24] ExecIf(“PJSIP/251-0000002c”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:25] Set(“PJSIP/251-0000002c”, “CDR(outbound_cnum)=”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:26] Set(“PJSIP/251-0000002c”, “CDR(outbound_cnam)=Chris Miguez”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf(“PJSIP/251-0000002c”, “0?sub-flp-1,s,1()”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:15] Set(“PJSIP/251-0000002c”, “OUTNUM=992120001234”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:16] Set(“PJSIP/251-0000002c”, “custom=SIP/gotrunk”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf(“PJSIP/251-0000002c”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf(“PJSIP/251-0000002c”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:19] Macro(“PJSIP/251-0000002c”, “dialout-trunk-predial-hook,”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf(“PJSIP/251-0000002c”, “0?skipcrm”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:21] Set(“PJSIP/251-0000002c”, “__CRM_DIRECTION=OUTBOUND”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:22] Set(“PJSIP/251-0000002c”, “__CRM_DESTINATION=992120001234”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:23] Set(“PJSIP/251-0000002c”, “__CRM_SOURCE=251”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:24] AGI(“PJSIP/251-0000002c”, “sangomacrm.agi”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] res_agi.c: <PJSIP/251-0000002c>AGI Script sangomacrm.agi completed, returning 0
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:25] Set(“PJSIP/251-0000002c”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp(“PJSIP/251-0000002c”, “CRM Finished”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf(“PJSIP/251-0000002c”, “0?bypass,1”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf(“PJSIP/251-0000002c”, “1?Set(CONNECTEDLINE(num,i)=992120001234)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf(“PJSIP/251-0000002c”, “1?Set(CONNECTEDLINE(name,i)=CID:)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf(“PJSIP/251-0000002c”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden))”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf(“PJSIP/251-0000002c”, “0?customtrunk”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:32] Dial(“PJSIP/251-0000002c”, “SIP/gotrunk/992120001234,300,Tb(func-apply-sipheaders^s^1,(1))”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] netsock2.c: Using SIP RTP TOS bits 184
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] netsock2.c: Using SIP RTP CoS mark 5
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] app_stack.c: SIP/gotrunk-0000000b Internal Gosub(func-apply-sipheaders,s,1(1)) start
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf(“SIP/gotrunk-0000000b”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp(“SIP/gotrunk-0000000b”, “Applying SIP Headers to channel SIP/gotrunk-0000000b”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:3] Set(“SIP/gotrunk-0000000b”, “TECH=SIP”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:4] Set(“SIP/gotrunk-0000000b”, “SIPHEADERKEYS=”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:5] While(“SIP/gotrunk-0000000b”, “0”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] app_while.c: Jumping to priority 12
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@func-apply-sipheaders:13] Return(“SIP/gotrunk-0000000b”, “”) in new stack
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] app_stack.c: Spawn extension (from-trunk, 92120001234, 1) exited non-zero on ‘SIP/gotrunk-0000000b’
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] app_stack.c: SIP/gotrunk-0000000b Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
[2019-02-19 16:47:14] VERBOSE[20531][C-0000002a] app_dial.c: Called SIP/gotrunk/992120001234
[2019-02-19 16:47:22] VERBOSE[2113][C-0000002a] chan_sip.c: Got SIP response 603 “Declined” back from 69.164.221.134:5060
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_dial.c: SIP/gotrunk-0000000b is busy
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_dial.c: Everyone is busy/congested at this time (1:1/0/0)
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:33] NoOp(“PJSIP/251-0000002c”, “Dial failed for some reason with DIALSTATUS = BUSY and HANGUPCAUSE = 21”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:34] GotoIf(“PJSIP/251-0000002c”, “0?continue,1:s-BUSY,1”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-dialout-trunk,s-BUSY,1)
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:1] NoOp(“PJSIP/251-0000002c”, “Dial failed due to trunk reporting BUSY - giving up”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:2] PlayTones(“PJSIP/251-0000002c”, “busy”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s-BUSY@macro-dialout-trunk:3] Busy(“PJSIP/251-0000002c”, “20”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_macro.c: Spawn extension (macro-dialout-trunk, s-BUSY, 3) exited non-zero on ‘PJSIP/251-0000002c’ in macro ‘dialout-trunk’
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Spawn extension (from-internal, 92120001234, 7) exited non-zero on ‘PJSIP/251-0000002c’
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [h@from-internal:1] Macro(“PJSIP/251-0000002c”, “hangupcall”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/251-0000002c”, “1?theend”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/251-0000002c”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/251-0000002c”, " monior file= ") in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-hangupcall:5] AGI(“PJSIP/251-0000002c”, “attendedtransfer-rec-restart.php,”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] res_agi.c: <PJSIP/251-0000002c>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/251-0000002c’ in macro ‘hangupcall’
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000002c’
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_stack.c: PJSIP/251-0000002c Internal Gosub(crm-hangup,s,1) start
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/251-0000002c”, “Sending Hangup to CRM”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/251-0000002c”, “HANGUP CAUSE: 17”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/251-0000002c”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/251-0000002c”, “MASTER CHANNEL: 1550594834.123 = 1550594834.123”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/251-0000002c”, “0?return”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/251-0000002c”, “__CRM_HANGUP=1”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/251-0000002c”, “sangomacrm.agi”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] res_agi.c: <PJSIP/251-0000002c>AGI Script sangomacrm.agi completed, returning 0
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/251-0000002c”, “”) in new stack
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/251-0000002c’
[2019-02-19 16:47:22] VERBOSE[20531][C-0000002a] app_stack.c: PJSIP/251-0000002c Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

ok so im back i have uploaded my log file to the last comment im kinda new with the freepbx command line but did use putty to ssh into the box and do it i tried to do it on the physical vm but it said the command was not received that i typed in but it did not do anything in the putty terminal. so hoping it worked out. so from what im gathering you guys want me to keep my extensions the same (willing to change if need be) and you want me to setup my trunk diffrnetly is that right. if so i need to be walked threw the steps if possible thanks

You are sending an invalid number to GoTrunk. It looks like your system expects a 9 before a 10-digit US number but instead of removing it and prefixing a 1, you somehow added another 9.

For testing, set your outbound route with no prefix, no prepend and match pattern
X.
Set the trunk to not modify the number at all. Set the caller ID for your extension with 11 digits, starting with 1. Dial your call with 11 digits, starting with 1 (no initial 9). If the call still fails, turn on sip debug and post a new log.

OK so outbound routes are working with the x. for testing i just need inbound routes working now which im having a issue with thanks