Calls not conecting

Hi, I really need some help, my setup is a Freepbx (IP address 192.168.178.116) conected to a Vega 60G using a SIP chan trunk. The Vega is on 192.168.178.129.

Incoming calls get a recorded ammouncement - “The number youu have dialed in not in service” outgoing calls also fail. Please see log hile below;
[2025-04-04 14:05:24] VERBOSE[2702][C-0000002f] netsock2.c: Using SIP RTP TOS bits 184
[2025-04-04 14:05:24] VERBOSE[2702][C-0000002f] netsock2.c: Using SIP RTP CoS mark 5
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [01474871213@from-sip-external:1] NoOp(“SIP/192.168.178.116-00000023”, “Received incoming SIP connection from unknown peer to 01474871213”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [01474871213@from-sip-external:2] Set(“SIP/192.168.178.116-00000023”, “DID=01474871213”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [01474871213@from-sip-external:3] Goto(“SIP/192.168.178.116-00000023”, “s,1”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx_builtins.c: Goto (from-sip-external,s,1)
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:1] GotoIf(“SIP/192.168.178.116-00000023”, “1?setlanguage:checkanon”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx_builtins.c: Goto (from-sip-external,s,2)
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:2] Set(“SIP/192.168.178.116-00000023”, “CHANNEL(language)=en”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:3] GotoIf(“SIP/192.168.178.116-00000023”, “1?noanonymous”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx_builtins.c: Goto (from-sip-external,s,5)
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:5] Set(“SIP/192.168.178.116-00000023”, “TIMEOUT(absolute)=15”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] func_timeout.c: Channel will hangup at 2025-04-04 14:05:39.056 BST.
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:6] Set(“SIP/192.168.178.116-00000023”, “receveip=recvip”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:7] Log(“SIP/192.168.178.116-00000023”, "WARNING,“Rejecting unknown SIP connection from 192.168.178.129"”) in new stack
[2025-04-04 14:05:24] WARNING[28352][C-0000002f] Ext. s: “Rejecting unknown SIP connection from 192.168.178.129”
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:8] Answer(“SIP/192.168.178.116-00000023”, “”) in new stack
[2025-04-04 14:05:24] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:9] Wait(“SIP/192.168.178.116-00000023”, “2”) in new stack
[2025-04-04 14:05:26] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:10] Playback(“SIP/192.168.178.116-00000023”, “ss-noservice”) in new stack
[2025-04-04 14:05:26] VERBOSE[28352][C-0000002f] file.c: <SIP/192.168.178.116-00000023> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2025-04-04 14:05:30] WARNING[2702] chan_sip.c: Retransmission timeout reached on transmission [email protected]:5160 for seqno 102 (Critical Request) – See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 31999ms with no response
[2025-04-04 14:05:31] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:11] PlayTones(“SIP/192.168.178.116-00000023”, “congestion”) in new stack
[2025-04-04 14:05:31] VERBOSE[28352][C-0000002f] pbx.c: Executing [s@from-sip-external:12] Congestion(“SIP/192.168.178.116-00000023”, “5”) in new stack
[2025-04-04 14:05:36] VERBOSE[28352][C-0000002f] pbx.c: Spawn extension (from-sip-external, s, 12) exited non-zero on ‘SIP/192.168.178.116-00000023’
[2025-04-04 14:05:36] VERBOSE[28352][C-0000002f] pbx.c: Executing [h@from-sip-external:1] Hangup(“SIP/192.168.178.116-00000023”, “”) in new stack
[2025-04-04 14:05:36] VERBOSE[28352][C-0000002f] pbx.c: Spawn extension (from-sip-external, h, 1) exited non-zero on ‘SIP/192.168.178.116-00000023’

Out Going SIP settings are ;
host=192.168.178.129
username=admin
secret=XXXXXXXXXXXX
type=peer

Incoming SIP settings have been left blank

MAny thanks

Peter

Please, do not share your trunk passwords here.
About the trunk, you should be using a PJSIP trunk, inside pjsip settings > advanced > you can add your vega ip in the “Match” section.
Also, how did you configure your inbound route ? Do you have one for 01474871213 ?

Create a pjsip trunk and put your vega ip in the “Match (permit)” option and try again.

Tried this and now the FreePbx log is showing;

[2025-04-04 21:42:06] WARNING[11392] res_pjsip_outbound_registration.c: ‘501’ fatal response received from ‘sip:192.168.178.129:5160’ on registration attempt to ‘sip:[email protected]:5160’, retrying in ‘30’ seconds

Thanks

In the trunk, set Registration None.

It was set set to SEND, now set to NONE.

Thanks

Thanks Stewart, Unfortunately outgoing calls still fail. Here is the FreePbx log file - part 1,

[2025-04-05 08:25:46] VERBOSE[24134] netsock2.c: Using SIP RTP Audio TOS bits 184
[2025-04-05 08:25:46] VERBOSE[24134] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.
[2025-04-05 08:25:46] VERBOSE[24134] netsock2.c: Using SIP RTP Audio CoS mark 5
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:1] Macro(“PJSIP/300-00000000”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2025-04-05 08:25:46] WARNING[22302][C-00000001] app_macro.c: Macro() is deprecated and will be removed from a future version of Asterisk.
[2025-04-05 08:25:46] WARNING[22302][C-00000001] app_macro.c: Dialplan should be updated to use Gosub instead.
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:1] Set(“PJSIP/300-00000000”, “TOUCH_MONITOR=1743837946.0”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:2] Set(“PJSIP/300-00000000”, “CHANCONTEXT=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:3] Set(“PJSIP/300-00000000”, “CHANCONTEXT=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:4] Set(“PJSIP/300-00000000”, “CHANEXTENCONTEXT=300-00000000”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:5] Set(“PJSIP/300-00000000”, “CHANEXTEN=300-00000000”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:6] Set(“PJSIP/300-00000000”, “CALLERID(number)=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:7] Set(“PJSIP/300-00000000”, “AMPUSER=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:8] Set(“PJSIP/300-00000000”, “HOTDESCKCHAN=300-00000000”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:9] Set(“PJSIP/300-00000000”, “HOTDESKEXTEN=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:10] Set(“PJSIP/300-00000000”, “HOTDESKCALL=0”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:11] ExecIf(“PJSIP/300-00000000”, “0?Set(HOTDESKCALL=1)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:12] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(name)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:13] GotoIf(“PJSIP/300-00000000”, “0?report”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:14] ExecIf(“PJSIP/300-00000000”, “1?Set(REALCALLERIDNUM=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:15] Set(“PJSIP/300-00000000”, “AMPUSER=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:16] GotoIf(“PJSIP/300-00000000”, “0?limit”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:17] Set(“PJSIP/300-00000000”, “AMPUSERCIDNAME=Office Phone”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:18] ExecIf(“PJSIP/300-00000000”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:19] GotoIf(“PJSIP/300-00000000”, “0?report”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:20] Set(“PJSIP/300-00000000”, “AMPUSERCID=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:21] Set(“PJSIP/300-00000000”, “__DIAL_OPTIONS=HhTtr”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:22] Set(“PJSIP/300-00000000”, “CALLERID(all)=“Office Phone” <300>”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:23] ExecIf(“PJSIP/300-00000000”, “0?Set(CUSDIAL=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:24] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(all)=“Office Phone” <300>)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:25] GotoIf(“PJSIP/300-00000000”, “0?limit”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:26] ExecIf(“PJSIP/300-00000000”, “1?Set(GROUP(concurrency_limit)=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:27] ExecIf(“PJSIP/300-00000000”, “0?Set(CHANNEL(language)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:28] NoOp(“PJSIP/300-00000000”, “Macro Depth is 1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:29] GotoIf(“PJSIP/300-00000000”, “1?report2:macroerror”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-user-callerid,s,30)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:30] GotoIf(“PJSIP/300-00000000”, “1?continue”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-user-callerid,s,49)

Part 2;

2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:49] Set(“PJSIP/300-00000000”, “CALLERID(number)=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:50] Set(“PJSIP/300-00000000”, “CALLERID(name)=Office Phone”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:51] GotoIf(“PJSIP/300-00000000”, “0?cnum”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:52] Set(“PJSIP/300-00000000”, “__MCNUM=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:53] Set(“PJSIP/300-00000000”, “__MCNAME=Office Phone”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:54] Set(“PJSIP/300-00000000”, “__MCEXTEN=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:55] Set(“PJSIP/300-00000000”, “__MCORGCHAN=PJSIP/300-00000000”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:56] Set(“PJSIP/300-00000000”, “CDR(cnam)=Office Phone”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:57] Set(“PJSIP/300-00000000”, “CDR(cnum)=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-user-callerid:58] Set(“PJSIP/300-00000000”, “CHANNEL(language)=en”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:2] Gosub(“PJSIP/300-00000000”, “sub-record-check,s,1(out,07860352075,dontcare)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:1] GotoIf(“PJSIP/300-00000000”, “0?initialized”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:2] Set(“PJSIP/300-00000000”, “__REC_STATUS=INITIALIZED”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:3] Set(“PJSIP/300-00000000”, “NOW=1743837946”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:4] Set(“PJSIP/300-00000000”, “__DAY=05”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:5] Set(“PJSIP/300-00000000”, “__MONTH=04”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:6] Set(“PJSIP/300-00000000”, “__YEAR=2025”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:7] Set(“PJSIP/300-00000000”, “__TIMESTR=20250405-082546”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:8] Set(“PJSIP/300-00000000”, “__FROMEXTEN=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:9] Set(“PJSIP/300-00000000”, “__MON_FMT=wav”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:10] NoOp(“PJSIP/300-00000000”, “Recordings initialized”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:11] ExecIf(“PJSIP/300-00000000”, “0?Set(ARG3=dontcare)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:12] Set(“PJSIP/300-00000000”, “REC_POLICY_MODE_SAVE=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:13] ExecIf(“PJSIP/300-00000000”, “0?Set(REC_STATUS=NO)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:14] GotoIf(“PJSIP/300-00000000”, “3?checkaction”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (sub-record-check,s,17)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@sub-record-check:17] GotoIf(“PJSIP/300-00000000”, “1?sub-record-check,out,1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (sub-record-check,out,1)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [out@sub-record-check:1] NoOp(“PJSIP/300-00000000”, “Outbound Recording Check from 300 to 07860352075”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [out@sub-record-check:2] Set(“PJSIP/300-00000000”, “RECMODE=dontcare”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [out@sub-record-check:3] ExecIf(“PJSIP/300-00000000”, “1?Goto(routewins)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (sub-record-check,out,7)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [out@sub-record-check:7] Gosub(“PJSIP/300-00000000”, “recordcheck,1(dontcare,out,07860352075)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/300-00000000”, “Starting recording check against dontcare”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/300-00000000”, “dontcare”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [recordcheck@sub-record-check:3] Return(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [out@sub-record-check:8] Return(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:3] ExecIf(“PJSIP/300-00000000”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:4] Set(“PJSIP/300-00000000”, “_ROUTEID=1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:5] Set(“PJSIP/300-00000000”, “_ROUTENAME=outbound”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:6] Set(“PJSIP/300-00000000”, “MOHCLASS=default”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:7] ExecIf(“PJSIP/300-00000000”, “0?Set(TRUNKCIDOVERRIDE=01474871213)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:8] Set(“PJSIP/300-00000000”, “_CALLERIDNAMEINTERNAL=Office Phone”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:9] Set(“PJSIP/300-00000000”, “_CALLERIDNUMINTERNAL=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:10] Set(“PJSIP/300-00000000”, “_EMAILNOTIFICATION=FALSE”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:11] Set(“PJSIP/300-00000000”, “_NODEST=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:12] Macro(“PJSIP/300-00000000”, “dialout-trunk,2,07860352075,off”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:1] Set(“PJSIP/300-00000000”, “DIAL_TRUNK=2”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:2] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:3] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_OPTIONS=HhTr)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:4] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:5] GosubIf(“PJSIP/300-00000000”, “0?sub-pincheck,s,1()”) in new stack

Part 3;
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:6] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(num)=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:7] GotoIf(“PJSIP/300-00000000”, “0?disabletrunk,1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:8] Set(“PJSIP/300-00000000”, “DIAL_NUMBER=07860352075”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:9] Set(“PJSIP/300-00000000”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:10] Set(“PJSIP/300-00000000”, “OUTBOUND_GROUP=OUT_2”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:11] Set(“PJSIP/300-00000000”, “DIAL_TRUNK_OPTIONS=T”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:12] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_TRUNK_OPTIONS=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:13] GotoIf(“PJSIP/300-00000000”, “1?nomax”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-dialout-trunk,s,15)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:15] GotoIf(“PJSIP/300-00000000”, “0?skipoutcid”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:16] Macro(“PJSIP/300-00000000”, “outbound-callerid,2”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:1] NoOp(“PJSIP/300-00000000”, “300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:2] NoOp(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:3] NoOp(“PJSIP/300-00000000”, “off”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:4] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:5] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:6] Set(“PJSIP/300-00000000”, “HOTDESCKCHAN=300-00000000”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:7] Set(“PJSIP/300-00000000”, “HOTDESKEXTEN=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:8] Set(“PJSIP/300-00000000”, “HOTDESKCALL=0”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:9] ExecIf(“PJSIP/300-00000000”, “0?Set(HOTDESKCALL=1)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:10] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(name)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:11] Set(“PJSIP/300-00000000”, “ALLOWTHISROUTE=NO”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:12] ExecIf(“PJSIP/300-00000000”, “0?Set(ALLOWTHISROUTE=YES)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:13] ExecIf(“PJSIP/300-00000000”, “0?Hangup()”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:14] ExecIf(“PJSIP/300-00000000”, “0?Set(REALCALLERIDNUM=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf(“PJSIP/300-00000000”, “0?Set(AMPUSER=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:16] GotoIf(“PJSIP/300-00000000”, “1?normcid”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:20] Set(“PJSIP/300-00000000”, “USEROUTCID=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:21] Set(“PJSIP/300-00000000”, “EMERGENCYCID=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf(“PJSIP/300-00000000”, “0?Set(EMERGENCYCID=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:23] Set(“PJSIP/300-00000000”, “TRUNKOUTCID=01474871213”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:24] GotoIf(“PJSIP/300-00000000”, “1?trunkcid”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-outbound-callerid,s,30)
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:30] ExecIf(“PJSIP/300-00000000”, “1?Set(CALLERID(all)=01474871213)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:31] ExecIf(“PJSIP/300-00000000”, “1?Set(CALLERID(all)=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:32] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(all)=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:33] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(all)=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:34] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERID(all)=300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:35] Set(“PJSIP/300-00000000”, “TIOHIDE=no”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:36] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:37] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:38] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:39] ExecIf(“PJSIP/300-00000000”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:40] Set(“PJSIP/300-00000000”, “CDR(outbound_cnum)=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outbound-callerid:41] Set(“PJSIP/300-00000000”, “CDR(outbound_cnam)=”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:17] GosubIf(“PJSIP/300-00000000”, “0?sub-flp-2,s,1()”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:18] Set(“PJSIP/300-00000000”, “OUTNUM=07860352075”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:19] Set(“PJSIP/300-00000000”, “custom=PJSIP”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:20] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:22] ExecIf(“PJSIP/300-00000000”, “0?AGI(allowlist-autoadd.agi,)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:23] Macro(“PJSIP/300-00000000”, “dialout-trunk-predial-hook,”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:24] GotoIf(“PJSIP/300-00000000”, “0?skipcrm”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:25] Set(“PJSIP/300-00000000”, “__CRM_DIRECTION=OUTBOUND”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:26] Set(“PJSIP/300-00000000”, “__CRM_DESTINATION=07860352075”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:27] Set(“PJSIP/300-00000000”, “__CRM_SOURCE=300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:28] AGI(“PJSIP/300-00000000”, “sangomacrm.agi”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] res_agi.c: <PJSIP/300-00000000>AGI Script sangomacrm.agi completed, returning 0
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:29] Set(“PJSIP/300-00000000”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:30] NoOp(“PJSIP/300-00000000”, “CRM Finished”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf(“PJSIP/300-00000000”, “0?bypass,1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:32] ExecIf(“PJSIP/300-00000000”, “1?Set(CONNECTEDLINE(num,i)=07860352075)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:33] ExecIf(“PJSIP/300-00000000”, “1?Set(CONNECTEDLINE(name,i)=CID:300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:34] ExecIf(“PJSIP/300-00000000”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:35] GotoIf(“PJSIP/300-00000000”, “0?customtrunk”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:36] ExecIf(“PJSIP/300-00000000”, “0?Set(DIAL_TRUNK_OPTIONS=)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:37] Set(“PJSIP/300-00000000”, “HASH(__SIPHEADERS,Alert-Info)=unset”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:38] Dial(“PJSIP/300-00000000”, “PJSIP/07860352075@Vega_Trunk,300,Tb(func-apply-sipheaders^s^1,(2))U(sub-send-obroute-email^07860352075^07860352075^2^1743837946^^300)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/Vega_Trunk-00000001 Internal Gosub(func-apply-sipheaders,s,1(2)) start
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp(“PJSIP/Vega_Trunk-00000001”, “Applying SIP Headers to channel PJSIP/Vega_Trunk-00000001”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:3] Set(“PJSIP/Vega_Trunk-00000001”, “localchan=Vega_Trunk-00000001”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:4] Set(“PJSIP/Vega_Trunk-00000001”, “DialMCEXT=Vega_Trunk”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:5] Set(“PJSIP/Vega_Trunk-00000001”, “CHANNEL(hangup_handler_push)=app-missedcall-hangup,Vega_Trunk,1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:6] Set(“PJSIP/Vega_Trunk-00000001”, “TECH=PJSIP”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:7] Set(“PJSIP/Vega_Trunk-00000001”, “SIPHEADERKEYS=Alert-Info”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:8] While(“PJSIP/Vega_Trunk-00000001”, “1”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:9] Set(“PJSIP/Vega_Trunk-00000001”, “sipheader=unset”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:11] ExecIf(“PJSIP/Vega_Trunk-00000001”, “1?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
[2025-04-05 08:25:46] ERROR[24134] res_pjsip_header_funcs.c: No headers had been previously added to this session.
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:12] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?Set(sipheader=http://127.0.0.1;info=unset)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:13] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?Set(sipheader=http://127.0.0.1unset)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:14] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?SIPAddHeader(Alert-Info:unset)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:15] ExecIf(“PJSIP/Vega_Trunk-00000001”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:16] EndWhile(“PJSIP/Vega_Trunk-00000001”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:8] While(“PJSIP/Vega_Trunk-00000001”, “0”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [s@func-apply-sipheaders:17] Return(“PJSIP/Vega_Trunk-00000001”, “”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] app_stack.c: Spawn extension (from-pstn, 07860352075, 1) exited non-zero on ‘PJSIP/Vega_Trunk-00000001’
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/Vega_Trunk-00000001 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] app_dial.c: Called PJSIP/07860352075@Vega_Trunk
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/Vega_Trunk-00000001 Internal Gosub(app-missedcall-hangup,Vega_Trunk,1) start
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:1] NoOp(“PJSIP/Vega_Trunk-00000001”, “Dialed: Vega_Trunk”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:2] NoOp(“PJSIP/Vega_Trunk-00000001”, “Caller: 300”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:3] GotoIf(“PJSIP/Vega_Trunk-00000001”, “0?exit”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:4] Set(“PJSIP/Vega_Trunk-00000001”, “EXTENNUM=Vega_Trunk”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:5] Set(“PJSIP/Vega_Trunk-00000001”, “FEXTENNUM=Vega_Trunk”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:6] GotoIf(“PJSIP/Vega_Trunk-00000001”, “0?exit”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:7] AGI(“PJSIP/Vega_Trunk-00000001”, “missedcallnotify.php,Vega_Trunk,Vega_Trunk,0,PJSIP/Vega_Trunk-00000001,”) in new stack
[2025-04-05 08:25:46] VERBOSE[22302][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/missedcallnotify.php
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] res_agi.c: <PJSIP/Vega_Trunk-00000001>AGI Script missedcallnotify.php completed, returning 0
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [Vega_Trunk@app-missedcall-hangup:8] Return(“PJSIP/Vega_Trunk-00000001”, “”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_stack.c: Spawn extension (from-pstn, 07860352075, 1) exited non-zero on ‘PJSIP/Vega_Trunk-00000001’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/Vega_Trunk-00000001 Internal Gosub(app-missedcall-hangup,Vega_Trunk,1) complete GOSUB_RETVAL=
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:39] NoOp(“PJSIP/300-00000000”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 27”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-dialout-trunk:40] GotoIf(“PJSIP/300-00000000”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“PJSIP/300-00000000”, “RC=27”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“PJSIP/300-00000000”, “27,1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-dialout-trunk,27,1)
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [27@macro-dialout-trunk:1] Goto(“PJSIP/300-00000000”, “continue,1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp(“PJSIP/300-00000000”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 27 - failing through to other trunks”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf(“PJSIP/300-00000000”, “1?Set(CALLERID(number)=300)”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [07860352075@from-internal:13] Macro(“PJSIP/300-00000000”, “outisbusy,”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outisbusy:1] Progress(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outisbusy:2] GotoIf(“PJSIP/300-00000000”, “0?emergency,1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outisbusy:3] GotoIf(“PJSIP/300-00000000”, “0?intracompany,1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outisbusy:4] PlayTones(“PJSIP/300-00000000”, “congestion”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-outisbusy:5] Congestion(“PJSIP/300-00000000”, “20”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_macro.c: Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘PJSIP/300-00000000’ in macro ‘outisbusy’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Spawn extension (from-internal, 07860352075, 13) exited non-zero on ‘PJSIP/300-00000000’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [h@from-internal:1] Macro(“PJSIP/300-00000000”, “hangupcall”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-hangupcall:1] Set(“PJSIP/300-00000000”, “__MCVMSTATUS=”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-hangupcall:2] Gosub(“PJSIP/300-00000000”, “app-missedcall-hangup,s,1()”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:1] NoOp(“PJSIP/300-00000000”, “Dialed: s”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:2] NoOp(“PJSIP/300-00000000”, “Caller: 300”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:3] GotoIf(“PJSIP/300-00000000”, “0?exit”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:4] Set(“PJSIP/300-00000000”, “EXTENNUM=s”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:5] Set(“PJSIP/300-00000000”, “FEXTENNUM=s”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:6] GotoIf(“PJSIP/300-00000000”, “0?exit”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:7] AGI(“PJSIP/300-00000000”, “missedcallnotify.php,s,s,0,PJSIP/300-00000000,CHANUNAVAIL,”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/missedcallnotify.php
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] res_agi.c: <PJSIP/300-00000000>AGI Script missedcallnotify.php completed, returning 0
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:8] Return(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-hangupcall:3] GotoIf(“PJSIP/300-00000000”, “1?theend”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx_builtins.c: Goto (macro-hangupcall,s,5)
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-hangupcall:5] ExecIf(“PJSIP/300-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@macro-hangupcall:6] Hangup(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/300-00000000’ in macro ‘hangupcall’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/300-00000000’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/300-00000000 Internal Gosub(crm-hangup,s,1) start
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:1] NoOp(“PJSIP/300-00000000”, “Sending Hangup to CRM”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:2] NoOp(“PJSIP/300-00000000”, “HANGUP CAUSE: 34”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:3] ExecIf(“PJSIP/300-00000000”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:4] NoOp(“PJSIP/300-00000000”, “MASTER CHANNEL: 1743837946.0 = 1743837946.0”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:5] GotoIf(“PJSIP/300-00000000”, “0?return”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:6] Set(“PJSIP/300-00000000”, “__CRM_HANGUP=1”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:7] AGI(“PJSIP/300-00000000”, “sangomacrm.agi”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] res_agi.c: <PJSIP/300-00000000>AGI Script sangomacrm.agi completed, returning 0
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] pbx.c: Executing [s@crm-hangup:8] Return(“PJSIP/300-00000000”, “”) in new stack
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/300-00000000’
[2025-04-05 08:25:47] VERBOSE[22302][C-00000001] app_stack.c: PJSIP/300-00000000 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Here is the event log on the Vega 60G;

LOG: 05/04/2025 08:25:46.345 ROUTER (I)R0bC00 FINDROUTE profile:23(To_FXO) plan:3
call ref=[01af001f] ← SIP [2,1] dest=NAME:07860352075,TEL:07860352075
→ POTS [3,1] dest=TEL:07860352075

LOG: 05/04/2025 08:25:46.345 ROUTER (I)R0bC00 call proceeding
call ref=[01af001f]

LOG: 05/04/2025 08:25:46.345 POTS (I)R1eC00 FXO port 3 line voltage too low
call ref=[00000000]

LOG: 05/04/2025 08:25:46.345 POTS (I)R05C1f disconnect call cause 27
call ref=[01af001f]

LOG: 05/04/2025 08:25:46.345 ROUTER (I)R0bC00 FINDROUTE profile:23(To_FXO) plan:2
call ref=[01af001f] ← SIP [2,1] dest=NAME:07860352075,TEL:07860352075
→ POTS [2,1] dest=TEL:07860352075

LOG: 05/04/2025 08:25:46.345 POTS (I)R1eC00 FXO port 2 line voltage too low
call ref=[00000000]

LOG: 05/04/2025 08:25:46.345 POTS (I)R05C1f disconnect call cause 27
call ref=[01af001f]

LOG: 05/04/2025 08:25:46.345 ROUTER (I)R07C00 no route to destination
call ref=[01af001f]

You are calling something which is not an exchange line, or there is an electrical fault on the exchange line.

So I thought I would try and crack this one bit at a time. Scenario - Incoming call from the PSTN. Inbound route expects my PSTN number 01474****** and should route this to a Ringgroup which rinks all freepbx extensions (there are 3). The caller hears “The Number You Have Dialled Is Not In Service, Please Check The Number and Try Again”. The FreePbx log looks like this;

[2025-04-05 18:58:42] VERBOSE[2904][C-0000000b] netsock2.c: Using SIP RTP TOS bits 184
[2025-04-05 18:58:42] VERBOSE[2904][C-0000000b] netsock2.c: Using SIP RTP CoS mark 5
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [01474871213@from-sip-external:1] NoOp(“SIP/192.168.178.116-00000006”, “Received incoming SIP connection from unknown peer to 01474871213”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [01474871213@from-sip-external:2] Set(“SIP/192.168.178.116-00000006”, “DID=01474871213”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [01474871213@from-sip-external:3] Goto(“SIP/192.168.178.116-00000006”, “s,1”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx_builtins.c: Goto (from-sip-external,s,1)
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:1] GotoIf(“SIP/192.168.178.116-00000006”, “1?setlanguage:checkanon”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx_builtins.c: Goto (from-sip-external,s,2)
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:2] Set(“SIP/192.168.178.116-00000006”, “CHANNEL(language)=en”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:3] GotoIf(“SIP/192.168.178.116-00000006”, “1?noanonymous”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx_builtins.c: Goto (from-sip-external,s,5)
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:5] Set(“SIP/192.168.178.116-00000006”, “TIMEOUT(absolute)=15”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] func_timeout.c: Channel will hangup at 2025-04-05 18:58:57.632 BST.
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:6] Set(“SIP/192.168.178.116-00000006”, “receveip=recvip”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:7] Log(“SIP/192.168.178.116-00000006”, "WARNING,“Rejecting unknown SIP connection from 192.168.178.129"”) in new stack
[2025-04-05 18:58:42] WARNING[9568][C-0000000b] Ext. s: “Rejecting unknown SIP connection from 192.168.178.129”
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:8] Answer(“SIP/192.168.178.116-00000006”, “”) in new stack
[2025-04-05 18:58:42] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:9] Wait(“SIP/192.168.178.116-00000006”, “2”) in new stack
[2025-04-05 18:58:44] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:10] Playback(“SIP/192.168.178.116-00000006”, “ss-noservice”) in new stack
[2025-04-05 18:58:44] VERBOSE[9568][C-0000000b] file.c: <SIP/192.168.178.116-00000006> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2025-04-05 18:58:49] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:11] PlayTones(“SIP/192.168.178.116-00000006”, “congestion”) in new stack
[2025-04-05 18:58:49] VERBOSE[9568][C-0000000b] pbx.c: Executing [s@from-sip-external:12] Congestion(“SIP/192.168.178.116-00000006”, “5”) in new stack

The recorded announcement obviolsy come from the FreePbx.

Thanks

Peter

You’ve reverted to using chan_sip, and there is no peer matching the address from which the INVITE is being sent.

Yep, pjsip would not work properly, I just need to get the phone system working again. We use this system at home and at the moment we are not able to call emergency services if needed. Can you advise how I fix the peer issue. Thanks

Provide the address that it is actually using. User “sip set debug on” to find out what that is. If it isn’t the same as the one you use outgoing, try to understand why and fix it (outside Asterisk) to match. If you can’t do that, preferably use chan_psip with a match/permit for that address, or define a second peer, in chan_sip, that matches the address.

Because this is often necessary, FreePBX allows you do define two peers, for chan_sip. (Many people make the “incoming” one a friend, but, in most cases, that is wrong.

There was no point in reverting to chan_sip without understanding the underlying problem, and very few regulars here will use chan_sip, so you will find it more difficult to get help for that.

[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [01474871213@from-sip-external:1] NoOp(“SIP/192.168.178.116-00000000”, “Received incoming SIP connection from unknown peer to 01474871213”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [01474871213@from-sip-external:2] Set(“SIP/192.168.178.116-00000000”, “DID=01474871213”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [01474871213@from-sip-external:3] Goto(“SIP/192.168.178.116-00000000”, “s,1”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,1)
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:1] GotoIf(“SIP/192.168.178.116-00000000”, “1?setlanguage:checkanon”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,2)
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:2] Set(“SIP/192.168.178.116-00000000”, “CHANNEL(language)=en”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:3] GotoIf(“SIP/192.168.178.116-00000000”, “1?noanonymous”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,5)
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:5] Set(“SIP/192.168.178.116-00000000”, “TIMEOUT(absolute)=15”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] func_timeout.c: Channel will hangup at 2025-04-05 22:42:57.819 BST.
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:6] Set(“SIP/192.168.178.116-00000000”, “receveip=recvip”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:7] Log(“SIP/192.168.178.116-00000000”, "WARNING,“Rejecting unknown SIP connection from 192.168.178.129"”) in new stack
[2025-04-05 22:42:42] WARNING[12646][C-00000001] Ext. s: “Rejecting unknown SIP connection from 192.168.178.129”
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] pbx.c: Executing [s@from-sip-external:8] Answer(“SIP/192.168.178.116-00000000”, “”) in new stack
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] chan_sip.c: Audio is at 15978
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] chan_sip.c: Adding codec ulaw to SDP
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] chan_sip.c: Adding codec alaw to SDP
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2025-04-05 22:42:42] VERBOSE[12646][C-00000001] chan_sip.c:
<— Reliably Transmitting (NAT) to 192.168.178.129:5160 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.178.129:5160;branch=z9hG4bK-vega1-630E8F117336-000A-0001-0C18-3F90965F;received=192.168.178.129;rport=5160
From: sip:[email protected];tag=00F6-062A-BE0CB19A
To: sip:[email protected];tag=as06cb4ba1
Call-ID: 00F0-0881-EA0C02C8-00000063@EF3E9AD56860C895A
CSeq: 5870235 INVITE
Server: FPBX-16.0.40.11(16.30.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: sip:[email protected]:5160
Content-Type: application/sdp
Content-Length: 280

v=0
o=root 168498966 168498966 IN IP4 192.168.178.116
s=Asterisk PBX 16.30.0
c=IN IP4 192.168.178.116
t=0 0
m=audio 15978 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<------------>

I think your problem may be that you haven’t set a context, for the trunk. Typically the context would be from-pstn.

However note that you didn’t provide a complete log; you’ve only included the response, not the request.

For everyone involved in this, including @slobera, this is a classic indicator of the trunk not having the proper setup. It is thrown when a incoming call comes in and there’s no matching peers.

This right here below shows that the host of the peer is no way matches the IP of the peer when it sends a call to the PBX. It’s going to be rejected unless Allow Guest or Anonymous are enabled. So from the first two posts, there is clear the peer on the PBX is not matching the IP of the Vega, cause of the problems right there for inbound.

So it would see the Vega is 192.168.178.129 and the PBX is 192.168.178.116 and all the incoming calls are not matching a chan_sip peer or a chan_pjsip peer because they aren’t setup right.

@ttquattroman We need to see the full configuration of the peers from the PBX and the Vega. All your debugs are pointing to bad configurations.