@Stewart1 I upload the PJSIP debug in pastebin https://pastebin.com/hHzWhY74
I hope this has some useful information.
And thanks for the answer @dorbe. You’re right, we have only one outbound route with one trunk. In the case of PJSIP/MyCompany is the name of the trunk. I’m talking with my provider to see if the problem is on their side.
I got the log of the full file. Here are some lines:
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:30] ExecIf("PJSIP/223-000000a5", "1?Set(CALLERID(all)=55115585xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:31] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERID(all)=)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:32] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERID(all)=)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERID(all)=223)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:34] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERID(all)=223)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:35] Set("PJSIP/223-000000a5", "TIOHIDE=no") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:38] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:39] ExecIf("PJSIP/223-000000a5", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:40] Set("PJSIP/223-000000a5", "CDR(outbound_cnum)=55115585xxxx") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outbound-callerid:41] Set("PJSIP/223-000000a5", "CDR(outbound_cnam)=") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/223-000000a5", "1?sub-flp-1,s,1()") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:1] ExecIf("PJSIP/223-000000a5", "0?Set(TARGET_FLP_1=0110113624xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:2] GotoIf("PJSIP/223-000000a5", "0?match") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:3] ExecIf("PJSIP/223-000000a5", "0?Set(TARGET_FLP_1=00113624xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:4] GotoIf("PJSIP/223-000000a5", "0?match") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:5] ExecIf("PJSIP/223-000000a5", "0?Set(TARGET_FLP_1=00113624xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:6] GotoIf("PJSIP/223-000000a5", "0?match") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:7] ExecIf("PJSIP/223-000000a5", "0?Set(TARGET_FLP_1=00113624xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:8] GotoIf("PJSIP/223-000000a5", "0?match") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:9] Return("PJSIP/223-000000a5", "") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/223-000000a5", "OUTNUM=0113624xxxx") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/223-000000a5", "custom=PJSIP") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/223-000000a5", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/223-000000a5", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/223-000000a5", "0?AGI(allowlist-autoadd.agi,)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:20] Macro("PJSIP/223-000000a5", "dialout-trunk-predial-hook,") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/223-000000a5", "") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:21] GotoIf("PJSIP/223-000000a5", "0?bypass,1") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:22] ExecIf("PJSIP/223-000000a5", "1?Set(CONNECTEDLINE(num,i)=0113624xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:23] ExecIf("PJSIP/223-000000a5", "1?Set(CONNECTEDLINE(name,i)=CID:55115585xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:24] ExecIf("PJSIP/223-000000a5", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)55115585xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:25] GotoIf("PJSIP/223-000000a5", "0?customtrunk") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:26] ExecIf("PJSIP/223-000000a5", "0?Set(DIAL_TRUNK_OPTIONS=)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:27] Set("PJSIP/223-000000a5", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:28] Dial("PJSIP/223-000000a5", "PJSIP/0113624xxxx@MyTrunk,300,Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^0113624xxxx^3624xxxx^1^1716463668^^55115585xxxx)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] app_stack.c: PJSIP/MyTrunk-000000a6 Internal Gosub(func-apply-sipheaders,s,1(1)) start
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/MyTrunk-000000a6", "Applying SIP Headers to channel PJSIP/MyTrunk-000000a6") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:2] Set("PJSIP/MyTrunk-000000a6", "TECH=PJSIP") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/MyTrunk-000000a6", "SIPHEADERKEYS=Alert-Info") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/MyTrunk-000000a6", "1") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:5] Set("PJSIP/MyTrunk-000000a6", "sipheader=unset") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/MyTrunk-000000a6", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2024-05-23 08:27:48] ERROR[19124] res_pjsip_header_funcs.c: No headers had been previously added to this session.
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/MyTrunk-000000a6", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/MyTrunk-000000a6", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/MyTrunk-000000a6", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:10] EndWhile("PJSIP/MyTrunk-000000a6", "") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/MyTrunk-000000a6", "0") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@func-apply-sipheaders:11] Return("PJSIP/MyTrunk-000000a6", "") in new stack
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] app_stack.c: Spawn extension (from-pstn, 3624xxxx, 1) exited non-zero on 'PJSIP/MyTrunk-000000a6'
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] app_stack.c: PJSIP/MyTrunk-000000a6 Internal Gosub(func-apply-sipheaders,s,1(1)) complete GOSUB_RETVAL=
[2024-05-23 08:27:48] VERBOSE[17200][C-0000004e] app_dial.c: Called PJSIP/0113624xxxx@MyTrunk
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] app_dial.c: Everyone is busy/congested at this time (1:0/1/0)
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:29] NoOp("PJSIP/223-000000a5", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-dialout-trunk:30] GotoIf("PJSIP/223-000000a5", "0?continue,1:s-CONGESTION,1") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx_builtins.c: Goto (macro-dialout-trunk,s-CONGESTION,1)
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:1] Set("PJSIP/223-000000a5", "RC=34") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("PJSIP/223-000000a5", "34,1") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx_builtins.c: Goto (macro-dialout-trunk,34,1)
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [34@macro-dialout-trunk:1] Goto("PJSIP/223-000000a5", "continue,1") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [continue@macro-dialout-trunk:1] NoOp("PJSIP/223-000000a5", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [continue@macro-dialout-trunk:2] ExecIf("PJSIP/223-000000a5", "1?Set(CALLERID(number)=223)") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [3624xxxx@from-internal:12] Macro("PJSIP/223-000000a5", "outisbusy,") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outisbusy:1] Progress("PJSIP/223-000000a5", "") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outisbusy:2] GotoIf("PJSIP/223-000000a5", "0?emergency,1") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outisbusy:3] GotoIf("PJSIP/223-000000a5", "0?intracompany,1") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outisbusy:4] Playback("PJSIP/223-000000a5", "all-circuits-busy-now&please-try-call-later, noanswer") in new stack
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] file.c: <PJSIP/223-000000a5> Playing 'all-circuits-busy-now.ulaw' (language 'en')
[2024-05-23 08:28:20] VERBOSE[19124] res_rtp_asterisk.c: 0x7f055c031120 -- Strict RTP learning after remote address set to: xxx.xxx.xxx.xxx:2230
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] res_rtp_asterisk.c: 0x7f055c031120 -- Strict RTP qualifying stream type: audio
[2024-05-23 08:28:20] VERBOSE[17200][C-0000004e] res_rtp_asterisk.c: 0x7f055c031120 -- Strict RTP switching source address to xxx.xxx.xxx.xxx:3206
[2024-05-23 08:28:22] VERBOSE[17200][C-0000004e] file.c: <PJSIP/223-000000a5> Playing 'please-try-call-later.ulaw' (language 'en')
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-outisbusy:5] Congestion("PJSIP/223-000000a5", "20") in new stack
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] app_macro.c: Spawn extension (macro-outisbusy, s, 5) exited non-zero on 'PJSIP/223-000000a5' in macro 'outisbusy'
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Spawn extension (from-internal, 3624xxxx, 12) exited non-zero on 'PJSIP/223-000000a5'
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Executing [h@from-internal:1] Macro("PJSIP/223-000000a5", "hangupcall") in new stack
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/223-000000a5", "1?theend") in new stack
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2024-05-23 08:28:24] ERROR[2776] cdr.c: Unable to find CDR for channel PJSIP/223-000000a5
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/223-000000a5", "0?Set(CDR(recordingfile)=)") in new stack
[2024-05-23 08:28:24] ERROR[2776] cdr.c: Unable to find CDR for channel PJSIP/223-000000a5
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Executing [s@macro-hangupcall:4] Hangup("PJSIP/223-000000a5", "") in new stack
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/223-000000a5' in macro 'hangupcall'
[2024-05-23 08:28:24] VERBOSE[17200][C-0000004e] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/223-000000a5'
I saw that in this line it changes the fone to 01101136…
VERBOSE[17200][C-0000004e] pbx.c: Executing [s@sub-flp-1:1] ExecIf("PJSIP/223-000000a5", "0?Set(TARGET_FLP_1=0110113624xxxx)") in new stack
But in the lines below it becomes 01136… Maybe is that the problem?