Fresh PBX install with regular (non trunk) sip account. Inbound calls work. Cant get outbound working

As title says, I’m not sure if I configured my trunk or outbound route correctly, or if I need changes for the type of sip account I’m using as I’m new to voip in general.

I’m using my ISP provided voip account as that is what I have access to. Protocol is PJSIP. Inbound calls work and end up at the ivr and end up at correct destinations depending on user choice.

Outbound calls end up with “the dialed number does not exist or has not been allocated” over audio. Im not sure if this is a message generated on my Freepbx box or at my sip/voip service provider’s side

This line in my log suggests to me the correct trunk has been selected:

Dial("PJSIP/02185512340-00000006", "PJSIP/0606712345@0218551234

My Log at the time of making a call:

2[08:17:08] VERBOSE[13789] pbx_variables.c: Setting global variable 'SIPDOMAIN' to '192.168.0.79'
3[08:17:08] VERBOSE[13789] netsock2.c: Using SIP RTP Audio TOS bits 184
4[08:17:08] VERBOSE[13789] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
5[08:17:08] VERBOSE[13789] netsock2.c: Using SIP RTP Audio CoS mark 5
6[08:17:08]  pbx.c: Executing [0606712345@from-internal:1] Macro("PJSIP/02185512340-00000006", "user-callerid,LIMIT,EXTERNAL,") in new stack
7[08:17:08]  pbx.c: Executing [s@macro-user-callerid:1] Set("PJSIP/02185512340-00000006", "TOUCH_MONITOR=1606378628.6") in new stack
8[08:17:08]  pbx.c: Executing [s@macro-user-callerid:2] Set("PJSIP/02185512340-00000006", "AMPUSER=02185512340") in new stack
9[08:17:08]  pbx.c: Executing [s@macro-user-callerid:3] Set("PJSIP/02185512340-00000006", "HOTDESCKCHAN=02185512340-00000006") in new stack
10[08:17:08]  pbx.c: Executing [s@macro-user-callerid:4] Set("PJSIP/02185512340-00000006", "HOTDESKEXTEN=02185512340") in new stack
11[08:17:08]  pbx.c: Executing [s@macro-user-callerid:5] Set("PJSIP/02185512340-00000006", "HOTDESKCALL=0") in new stack
12[08:17:08]  pbx.c: Executing [s@macro-user-callerid:6] ExecIf("PJSIP/02185512340-00000006", "0?Set(HOTDESKCALL=1)") in new stack
13[08:17:08]  pbx.c: Executing [s@macro-user-callerid:7] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERID(name)=)") in new stack
14[08:17:08]  pbx.c: Executing [s@macro-user-callerid:8] GotoIf("PJSIP/02185512340-00000006", "0?report") in new stack
15[08:17:08]  pbx.c: Executing [s@macro-user-callerid:9] ExecIf("PJSIP/02185512340-00000006", "1?Set(REALCALLERIDNUM=02185512340)") in new stack
16[08:17:08]  pbx.c: Executing [s@macro-user-callerid:10] Set("PJSIP/02185512340-00000006", "AMPUSER=02185512340") in new stack
17[08:17:08]  pbx.c: Executing [s@macro-user-callerid:11] GotoIf("PJSIP/02185512340-00000006", "0?limit") in new stack
18[08:17:08]  pbx.c: Executing [s@macro-user-callerid:12] Set("PJSIP/02185512340-00000006", "AMPUSERCIDNAME=Reception") in new stack
19[08:17:08]  pbx.c: Executing [s@macro-user-callerid:13] ExecIf("PJSIP/02185512340-00000006", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
20[08:17:08]  pbx.c: Executing [s@macro-user-callerid:14] GotoIf("PJSIP/02185512340-00000006", "0?report") in new stack
21[08:17:08]  pbx.c: Executing [s@macro-user-callerid:15] Set("PJSIP/02185512340-00000006", "AMPUSERCID=02185512340") in new stack
22[08:17:08]  pbx.c: Executing [s@macro-user-callerid:16] Set("PJSIP/02185512340-00000006", "__DIAL_OPTIONS=HhTtr") in new stack
23[08:17:08]  pbx.c: Executing [s@macro-user-callerid:17] Set("PJSIP/02185512340-00000006", "CALLERID(all)="Reception" <02185512340>") in new stack
24[08:17:08]  pbx.c: Executing [s@macro-user-callerid:18] ExecIf("PJSIP/02185512340-00000006", "0?Set(CUSDIAL=)") in new stack
25[08:17:08]  pbx.c: Executing [s@macro-user-callerid:19] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERID(all)="Reception" <02185512340>)") in new stack
26[08:17:08]  pbx.c: Executing [s@macro-user-callerid:20] GotoIf("PJSIP/02185512340-00000006", "0?limit") in new stack
27[08:17:08]  pbx.c: Executing [s@macro-user-callerid:21] ExecIf("PJSIP/02185512340-00000006", "1?Set(GROUP(concurrency_limit)=02185512340)") in new stack
28[08:17:08]  pbx.c: Executing [s@macro-user-callerid:22] ExecIf("PJSIP/02185512340-00000006", "0?Set(CHANNEL(language)=)") in new stack
29[08:17:08]  pbx.c: Executing [s@macro-user-callerid:23] NoOp("PJSIP/02185512340-00000006", "Macro Depth is 1") in new stack
30[08:17:08]  pbx.c: Executing [s@macro-user-callerid:24] GotoIf("PJSIP/02185512340-00000006", "1?report2:macroerror") in new stack
31[08:17:08]  pbx_builtins.c: Goto (macro-user-callerid,s,25)
32[08:17:08]  pbx.c: Executing [s@macro-user-callerid:25] GotoIf("PJSIP/02185512340-00000006", "1?continue") in new stack
33[08:17:08]  pbx_builtins.c: Goto (macro-user-callerid,s,44)
34[08:17:08]  pbx.c: Executing [s@macro-user-callerid:44] Set("PJSIP/02185512340-00000006", "CALLERID(number)=02185512340") in new stack
35[08:17:08]  pbx.c: Executing [s@macro-user-callerid:45] Set("PJSIP/02185512340-00000006", "CALLERID(name)=Reception") in new stack
36[08:17:08]  pbx.c: Executing [s@macro-user-callerid:46] GotoIf("PJSIP/02185512340-00000006", "0?cnum") in new stack
37[08:17:08]  pbx.c: Executing [s@macro-user-callerid:47] Set("PJSIP/02185512340-00000006", "CDR(cnam)=Reception") in new stack
38[08:17:08]  pbx.c: Executing [s@macro-user-callerid:48] Set("PJSIP/02185512340-00000006", "CDR(cnum)=02185512340") in new stack
39[08:17:08]  pbx.c: Executing [s@macro-user-callerid:49] Set("PJSIP/02185512340-00000006", "CHANNEL(language)=en") in new stack
40[08:17:08]  pbx.c: Executing [0606712345@from-internal:2] Gosub("PJSIP/02185512340-00000006", "sub-record-check,s,1(out,0606712345,no)") in new stack
41[08:17:08]  pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/02185512340-00000006", "0?initialized") in new stack
42[08:17:08]  pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/02185512340-00000006", "__REC_STATUS=INITIALIZED") in new stack
43[08:17:08]  pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/02185512340-00000006", "NOW=1606378628") in new stack
44[08:17:08]  pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/02185512340-00000006", "__DAY=26") in new stack
45[08:17:08]  pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/02185512340-00000006", "__MONTH=11") in new stack
46[08:17:08]  pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/02185512340-00000006", "__YEAR=2020") in new stack
47[08:17:08]  pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/02185512340-00000006", "__TIMESTR=20201126-081708") in new stack
48[08:17:08]  pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/02185512340-00000006", "__FROMEXTEN=02185512340") in new stack
49[08:17:08]  pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/02185512340-00000006", "__MON_FMT=wav") in new stack
50[08:17:08]  pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/02185512340-00000006", "Recordings initialized") in new stack
51[08:17:08]  pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/02185512340-00000006", "0?Set(ARG3=dontcare)") in new stack
52[08:17:08]  pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/02185512340-00000006", "REC_POLICY_MODE_SAVE=") in new stack
53[08:17:08]  pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/02185512340-00000006", "0?Set(REC_STATUS=NO)") in new stack
54[08:17:08]  pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/02185512340-00000006", "3?checkaction") in new stack
55[08:17:08]  pbx_builtins.c: Goto (sub-record-check,s,17)
56[08:17:08]  pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/02185512340-00000006", "1?sub-record-check,out,1") in new stack
57[08:17:08]  pbx_builtins.c: Goto (sub-record-check,out,1)
58[08:17:08]  pbx.c: Executing [out@sub-record-check:1] NoOp("PJSIP/02185512340-00000006", "Outbound Recording Check from 02185512340 to 0606712345") in new stack
59[08:17:08]  pbx.c: Executing [out@sub-record-check:2] Set("PJSIP/02185512340-00000006", "RECMODE=dontcare") in new stack
60[08:17:08]  pbx.c: Executing [out@sub-record-check:3] ExecIf("PJSIP/02185512340-00000006", "1?Goto(routewins)") in new stack
61[08:17:08]  pbx_builtins.c: Goto (sub-record-check,out,7)
62[08:17:08]  pbx.c: Executing [out@sub-record-check:7] Gosub("PJSIP/02185512340-00000006", "recordcheck,1(no,out,0606712345)") in new stack
63[08:17:08]  pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/02185512340-00000006", "Starting recording check against no") in new stack
64[08:17:08]  pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/02185512340-00000006", "no") in new stack
65[08:17:08]  pbx_builtins.c: Goto (sub-record-check,recordcheck,12)
66[08:17:08]  pbx.c: Executing [recordcheck@sub-record-check:12] Set("PJSIP/02185512340-00000006", "__REC_POLICY_MODE=NO") in new stack
67[08:17:08]  pbx.c: Executing [recordcheck@sub-record-check:13] Return("PJSIP/02185512340-00000006", "") in new stack
68[08:17:08]  pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/02185512340-00000006", "") in new stack
69[08:17:08]  pbx.c: Executing [0606712345@from-internal:3] ExecIf("PJSIP/02185512340-00000006", "0 ?Set(CDR(accountcode)=)") in new stack
70[08:17:08]  pbx.c: Executing [0606712345@from-internal:4] Set("PJSIP/02185512340-00000006", "_ROUTEID=2") in new stack
71[08:17:08]  pbx.c: Executing [0606712345@from-internal:5] Set("PJSIP/02185512340-00000006", "_ROUTENAME=0218551234 Outbound") in new stack
72[08:17:08]  pbx.c: Executing [0606712345@from-internal:6] Set("PJSIP/02185512340-00000006", "MOHCLASS=none") in new stack
73[08:17:08]  pbx.c: Executing [0606712345@from-internal:7] Set("PJSIP/02185512340-00000006", "_CALLERIDNAMEINTERNAL=Reception") in new stack
74[08:17:08]  pbx.c: Executing [0606712345@from-internal:8] Set("PJSIP/02185512340-00000006", "_CALLERIDNUMINTERNAL=02185512340") in new stack
75[08:17:08]  pbx.c: Executing [0606712345@from-internal:9] Set("PJSIP/02185512340-00000006", "_EMAILNOTIFICATION=FALSE") in new stack
76[08:17:08]  pbx.c: Executing [0606712345@from-internal:10] Set("PJSIP/02185512340-00000006", "_NODEST=") in new stack
77[08:17:08]  pbx.c: Executing [0606712345@from-internal:11] Macro("PJSIP/02185512340-00000006", "dialout-trunk,1,0606712345,,off") in new stack
78[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/02185512340-00000006", "DIAL_TRUNK=1") in new stack
79[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/02185512340-00000006", "0?Set(DIAL_OPTIONS=Hhtr)") in new stack
80[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:3] GosubIf("PJSIP/02185512340-00000006", "0?sub-pincheck,s,1()") in new stack
81[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERID(num)=02185512340)") in new stack
82[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:5] GotoIf("PJSIP/02185512340-00000006", "0?disabletrunk,1") in new stack
83[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/02185512340-00000006", "DIAL_NUMBER=0606712345") in new stack
84[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:7] Set("PJSIP/02185512340-00000006", "DIAL_TRUNK_OPTIONS=HhTtr") in new stack
85[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:8] Set("PJSIP/02185512340-00000006", "OUTBOUND_GROUP=OUT_1") in new stack
86[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:9] Set("PJSIP/02185512340-00000006", "DIAL_TRUNK_OPTIONS=T") in new stack
87[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:10] GotoIf("PJSIP/02185512340-00000006", "0?nomax") in new stack
88[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:11] GotoIf("PJSIP/02185512340-00000006", "0?chanfull") in new stack
89[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:12] GotoIf("PJSIP/02185512340-00000006", "0?skipoutcid") in new stack
90[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:13] Macro("PJSIP/02185512340-00000006", "outbound-callerid,1") in new stack
91[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/02185512340-00000006", "02185512340") in new stack
92[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/02185512340-00000006", "") in new stack
93[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/02185512340-00000006", "all") in new stack
94[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(name-pres)=)") in new stack
95[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(num-pres)=)") in new stack
96[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:6] Set("PJSIP/02185512340-00000006", "HOTDESCKCHAN=02185512340-00000006") in new stack
97[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:7] Set("PJSIP/02185512340-00000006", "HOTDESKEXTEN=02185512340") in new stack
98[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:8] Set("PJSIP/02185512340-00000006", "HOTDESKCALL=0") in new stack
99[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/02185512340-00000006", "0?Set(HOTDESKCALL=1)") in new stack
100[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERID(name)=)") in new stack
101[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:11] Set("PJSIP/02185512340-00000006", "ALLOWTHISROUTE=NO") in new stack
102[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/02185512340-00000006", "0?Set(ALLOWTHISROUTE=YES)") in new stack
103[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/02185512340-00000006", "0?Hangup()") in new stack
104[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/02185512340-00000006", "0?Set(REALCALLERIDNUM=02185512340)") in new stack
105[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/02185512340-00000006", "0?Set(AMPUSER=02185512340)") in new stack
106[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/02185512340-00000006", "1?normcid") in new stack
107[08:17:08]  pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
108[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:20] Set("PJSIP/02185512340-00000006", "USEROUTCID=<0218551234>") in new stack
109[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:21] Set("PJSIP/02185512340-00000006", "EMERGENCYCID=") in new stack
110[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/02185512340-00000006", "0?Set(EMERGENCYCID=)") in new stack
111[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:23] Set("PJSIP/02185512340-00000006", "TRUNKOUTCID=0218551234") in new stack
112[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:24] GotoIf("PJSIP/02185512340-00000006", "1?trunkcid") in new stack
113[08:17:08]  pbx_builtins.c: Goto (macro-outbound-callerid,s,30)
114[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:30] ExecIf("PJSIP/02185512340-00000006", "1?Set(CALLERID(all)=0218551234)") in new stack
115[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:31] ExecIf("PJSIP/02185512340-00000006", "1?Set(CALLERID(all)=<0218551234>)") in new stack
116[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:32] ExecIf("PJSIP/02185512340-00000006", "1?Set(CALLERID(all)=0218551234)") in new stack
117[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERID(all)=02185512340)") in new stack
118[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:34] Set("PJSIP/02185512340-00000006", "TIOHIDE=no") in new stack
119[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:35] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
120[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
121[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
122[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:38] ExecIf("PJSIP/02185512340-00000006", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
123[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:39] Set("PJSIP/02185512340-00000006", "CDR(outbound_cnum)=0218551234") in new stack
124[08:17:08]  pbx.c: Executing [s@macro-outbound-callerid:40] Set("PJSIP/02185512340-00000006", "CDR(outbound_cnam)=") in new stack
125[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/02185512340-00000006", "0?sub-flp-1,s,1()") in new stack
126[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/02185512340-00000006", "OUTNUM=0606712345") in new stack
127[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/02185512340-00000006", "custom=PJSIP") in new stack
128[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/02185512340-00000006", "1?Set(DIAL_TRUNK_OPTIONS=M(setmusic^none)T)") in new stack
129[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/02185512340-00000006", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^none)TM(confirm))") in new stack
130[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:19] Macro("PJSIP/02185512340-00000006", "dialout-trunk-predial-hook,") in new stack
131[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/02185512340-00000006", "") in new stack
132[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/02185512340-00000006", "0?bypass,1") in new stack
133[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/02185512340-00000006", "1?Set(CONNECTEDLINE(num,i)=0606712345)") in new stack
134[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:22] ExecIf("PJSIP/02185512340-00000006", "1?Set(CONNECTEDLINE(name,i)=CID:0218551234)") in new stack
135[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:23] ExecIf("PJSIP/02185512340-00000006", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)0218551234)") in new stack
136[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:24] GotoIf("PJSIP/02185512340-00000006", "0?customtrunk") in new stack
137[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:25] ExecIf("PJSIP/02185512340-00000006", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^none))") in new stack
138[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:26] Set("PJSIP/02185512340-00000006", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
139[08:17:08]  pbx.c: Executing [s@macro-dialout-trunk:27] Dial("PJSIP/02185512340-00000006", "PJSIP/0606712345@0218551234,300,M(setmusic^none)Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^0606712345^0606712345^1^1606378628^^0218551234)") in new stack
140[08:17:08]  app_stack.c: PJSIP/0218551234-00000007 Internal Gosub(func-apply-sipheaders,s,1(1)) start
141[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/0218551234-00000007", "Applying SIP Headers to channel PJSIP/0218551234-00000007") in new stack
142[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:2] Set("PJSIP/0218551234-00000007", "TECH=PJSIP") in new stack
143[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/0218551234-00000007", "SIPHEADERKEYS=Alert-Info") in new stack
144[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/0218551234-00000007", "1") in new stack
145[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:5] Set("PJSIP/0218551234-00000007", "sipheader=unset") in new stack
146[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/0218551234-00000007", "0?SIPRemoveHeader(Alert-Info:)") in new stack
147[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/0218551234-00000007", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
148[08:17:08] ERROR[13789] res_pjsip_header_funcs.c: No headers had been previously added to this session.
149[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/0218551234-00000007", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
150[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/0218551234-00000007", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
151[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/0218551234-00000007", "0?SIPAddHeader(Alert-Info:unset)") in new stack
152[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:11] ExecIf("PJSIP/0218551234-00000007", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
153[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:12] EndWhile("PJSIP/0218551234-00000007", "") in new stack
154[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/0218551234-00000007", "0") in new stack
155[08:17:08]  pbx.c: Executing [s@func-apply-sipheaders:13] Return("PJSIP/0218551234-00000007", "") in new stack
156[08:17:08]  app_stack.c: Spawn extension (from-pstn, 0606712345, 1) exited non-zero on 'PJSIP/0218551234-00000007'
157[08:17:08]  app_stack.c: PJSIP/0218551234-00000007 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
158[08:17:08]  app_dial.c: Called PJSIP/0606712345@0218551234
159[08:17:09]  app_dial.c: PJSIP/0218551234-00000007 is making progress passing it to PJSIP/02185512340-00000006
160[08:17:09]  app_dial.c: PJSIP/0218551234-00000007 is making progress passing it to PJSIP/02185512340-00000006
161[08:17:17]  app_macro.c: Spawn extension (macro-dialout-trunk, s, 27) exited non-zero on 'PJSIP/02185512340-00000006' in macro 'dialout-trunk'
162[08:17:17]  pbx.c: Spawn extension (from-internal, 0606712345, 11) exited non-zero on 'PJSIP/02185512340-00000006'
163[08:17:17]  pbx.c: Executing [h@from-internal:1] Macro("PJSIP/02185512340-00000006", "hangupcall") in new stack
164[08:17:17]  pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/02185512340-00000006", "1?theend") in new stack
165[08:17:17]  pbx_builtins.c: Goto (macro-hangupcall,s,3)
166[08:17:17]  pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/02185512340-00000006", "0?Set(CDR(recordingfile)=)") in new stack
167[08:17:17]  pbx.c: Executing [s@macro-hangupcall:4] NoOp("PJSIP/02185512340-00000006", "PJSIP/0218551234-00000007 montior file= ") in new stack
168[08:17:17]  pbx.c: Executing [s@macro-hangupcall:5] GotoIf("PJSIP/02185512340-00000006", "1?skipagi") in new stack
169[08:17:17]  pbx_builtins.c: Goto (macro-hangupcall,s,7)
170[08:17:17]  pbx.c: Executing [s@macro-hangupcall:7] Hangup("PJSIP/02185512340-00000006", "") in new stack
171[08:17:17]  app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'PJSIP/02185512340-00000006' in macro 'hangupcall'
172[08:17:17]  pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/02185512340-00000006'

The provider played an eight second message and then disconnected. I’m guessing that the outbound number and/or the caller ID was not in the format they require. Another possibility is they require their domain name in the From header (From Domain in pjsip trunk configuration).

Usually, providers will accept numbers in the same format that they send them on an incoming call.
At the Asterisk command prompt, type
pjsip set logger on
which will include SIP trace information in the Asterisk log (and on the console).
Make a test incoming call and note the From and To headers of the incoming INVITE.
Now make an outgoing call and compare.

What country are you in? Using France as an example, you might be required to send the outgoing number as +33606712345 or 33606712345 and the caller ID as +33218551234 or 33218551234.

If you still have trouble, paste the logs (with pjsip logger on) for both incoming an outgoing calls at pastebin.freepbx.org and post the links here.

Hi Stewart, thank you for your reply.

I think as you said, how I’m presenting to my provider is likely the problem - when I set up I was basically unsure of all the config options and may have (mis)configured something somewhere.

I’m in South Africa (+27), we can dial numbers without the international code, thus we can dial 0218501234 or 27218501234 all the same.

Pasted log with logger on as you suggested: https://pastebin.com/g9cBtedt

I seem to have gotten it working! As per your suggestion I added the sip.internet.co.za domain in the From Domain in pjsip trunk configuration and calls are suddenly going through to test numbers!

Thank you so much.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.