Hello,
I have a problem processing incoming calls from a sip trunk provider. There are 100 numbers in the siptrunk. When I add an inbound route to a number other than the main number the call still goes to the main number. In the logs you can see that the call actually goes to the main number but on the provider’s side the same call goes to a different number:
freepbx logs:
78518 [2024-12-27 12:53:23] VERBOSE[4483][C-00000001] pbx.c: Executing [327796000@from-trunk:1] Set(“PJSIP/Netia-sip-trunk-00000000”, “__FROM_DID=327796000”) in new stack
78519 [2024-12-27 12:53:23] VERBOSE[4483][C-00000001] pbx.c: Executing [327796000@from-trunk:2] NoOp(“PJSIP/Netia-sip-trunk-00000000”, “Received an unknown call with DID set to 327796000”) in new stack
78520 [2024-12-27 12:53:23] VERBOSE[4483][C-00000001] pbx.c: Executing [327796000@from-trunk:3] Goto(“PJSIP/Netia-sip-trunk-00000000”, “s,a2”) in new stack
78521 [2024-12-27 12:53:23] VERBOSE[4483][C-00000001] pbx_builtins.c: Goto (from-trunk,s,2)
78522 [2024-12-27 12:53:23] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:2] Answer(“PJSIP/Netia-sip-trunk-00000000”, “”) in new stack
78523 [2024-12-27 12:53:24] ERROR[4483][C-00000001] pbx_functions.c: Function SIP_HEADER not registered
78524 [2024-12-27 12:53:24] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:3] Log(“PJSIP/Netia-sip-trunk-00000000”, "WARNING,Friendly Scanner from ") in new stack
78525 [2024-12-27 12:53:24] WARNING[4483][C-00000001] Ext. s: Friendly Scanner from
78526 [2024-12-27 12:53:24] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:4] Wait(“PJSIP/Netia-sip-trunk-00000000”, “2”) in new stack
78527 [2024-12-27 12:53:26] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:5] Playback(“PJSIP/Netia-sip-trunk-00000000”, “ss-noservice”) in new stack
78528 [2024-12-27 12:53:26] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘ss-noservice.ulaw’ (language ‘en’)
78529 [2024-12-27 12:53:31] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:6] SayAlpha(“PJSIP/Netia-sip-trunk-00000000”, “327796000”) in new stack
78530 [2024-12-27 12:53:31] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/3.ulaw’ (language ‘en’)
78531 [2024-12-27 12:53:31] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/2.ulaw’ (language ‘en’)
78532 [2024-12-27 12:53:32] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/7.ulaw’ (language ‘en’)
78533 [2024-12-27 12:53:33] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/7.ulaw’ (language ‘en’)
78534 [2024-12-27 12:53:34] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/9.ulaw’ (language ‘en’)
78535 [2024-12-27 12:53:35] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/6.ulaw’ (language ‘en’)
78536 [2024-12-27 12:53:36] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/0.ulaw’ (language ‘en’)
78537 [2024-12-27 12:53:36] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/0.ulaw’ (language ‘en’)
78538 [2024-12-27 12:53:37] VERBOSE[4483][C-00000001] file.c: <PJSIP/Netia-sip-trunk-00000000> Playing ‘digits/0.ulaw’ (language ‘en’)
78539 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@from-trunk:7] Hangup(“PJSIP/Netia-sip-trunk-00000000”, “”) in new stack
78540 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Spawn extension (from-trunk, s, 7) exited non-zero on ‘PJSIP/Netia-sip-trunk-00000000’
78541 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [h@from-trunk:1] Gosub(“PJSIP/Netia-sip-trunk-00000000”, “macro-hangupcall,s,1()”) in new stack
78542 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:1] Set(“PJSIP/Netia-sip-trunk-00000000”, “__MCVMSTATUS=”) in new stack
78543 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:2] Gosub(“PJSIP/Netia-sip-trunk-00000000”, “app-missedcall-hangup,s,1()”) in new stack
78544 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:1] NoOp(“PJSIP/Netia-sip-trunk-00000000”, “Dialed: s”) in new stack
78545 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:2] NoOp(“PJSIP/Netia-sip-trunk-00000000”, "Caller: ") in new stack
78546 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:3] GotoIf(“PJSIP/Netia-sip-trunk-00000000”, “0?exit”) in new stack
78547 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:4] Set(“PJSIP/Netia-sip-trunk-00000000”, “EXTENNUM=s”) in new stack
78548 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:5] Set(“PJSIP/Netia-sip-trunk-00000000”, “FEXTENNUM=s”) in new stack
78549 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:6] GotoIf(“PJSIP/Netia-sip-trunk-00000000”, “0?exit”) in new stack
78550 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:7] AGI(“PJSIP/Netia-sip-trunk-00000000”, “agi://127.0.0.1/missedcallnotify.php,s,s,0,PJSIP/Netia-sip-trunk-00000000,”) in new stack
78551 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] res_agi.c: <PJSIP/Netia-sip-trunk-00000000>AGI Script agi://127.0.0.1/missedcallnotify.php completed, returning 0
78552 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@app-missedcall-hangup:8] Return(“PJSIP/Netia-sip-trunk-00000000”, “”) in new stack
78553 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:3] UserEvent(“PJSIP/Netia-sip-trunk-00000000”, “MES,RTPAUDIOQOSMESBRIDGED:,RTPAUDIOQOSMES:”) in new stack
78554 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:4] GotoIf(“PJSIP/Netia-sip-trunk-00000000”, “1?theend”) in new stack
78555 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx_builtins.c: Goto (macro-hangupcall,s,6)
78556 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:6] ExecIf(“PJSIP/Netia-sip-trunk-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
78557 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/Netia-sip-trunk-00000000”, “”) in new stack
78558 [2024-12-27 12:53:38] VERBOSE[4483][C-00000001] pbx.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/Netia-sip-trunk-00000000’
In pcap file from provider I can see correct number