Hi,
I have set an inbound route of +390744087128, which goes to extension 1001. When the call comes in as +390744087128 it matches the inbound route and goes to extension 1001 as expected.
When the call comes in as 00744087128 there is not a matching inbound route to send the call (it works for example when I add an additional inbound route of 00744087128 to extension 1001)
Instead of having multiple inbound routes, I would like to manipulate the call as it comes in, so add +39 and strip one 0…
On my trunk I have tried the following:
The call is still being presented inbound as 00744087128 as you can see in the SIP trace.
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [+390744087128;trunk-context=390744087128.ims.vf.it;tgrp=tg390744087128@from-pstn-toheader:2] GotoIf(“PJSIP/to_voda_pri-00000041”, “0?SIP”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [+390744087128;trunk-context=390744087128.ims.vf.it;tgrp=tg390744087128@from-pstn-toheader:3] GotoIf(“PJSIP/to_voda_pri-00000041”, “1?PJSIP”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx_builtins.c: Goto (from-pstn-toheader,+390744087128;trunk-context=390744087128.ims.vf.it;tgrp=tg390744087128,7)
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [+390744087128;trunk-context=390744087128.ims.vf.it;tgrp=tg390744087128@from-pstn-toheader:7] Goto(“PJSIP/to_voda_pri-00000041”, “from-pstn,00744087128,1”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx_builtins.c: Goto (from-pstn,00744087128,1)
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [00744087128@from-pstn:1] Set(“PJSIP/to_voda_pri-00000041”, “__FROM_DID=00744087128”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [00744087128@from-pstn:2] NoOp(“PJSIP/to_voda_pri-00000041”, “Received an unknown call with DID set to 00744087128”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [00744087128@from-pstn:3] Goto(“PJSIP/to_voda_pri-00000041”, “s,a2”) in new stack
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx_builtins.c: Goto (from-pstn,s,2)
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:2] Answer(“PJSIP/to_voda_pri-00000041”, “”) in new stack
[2019-07-24 13:05:07] WARNING[4727][C-0000002a] chan_sip.c: This function can only be used on SIP channels.
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:3] Log(“PJSIP/to_voda_pri-00000041”, "WARNING,Friendly Scanner from ") in new stack
[2019-07-24 13:05:07] WARNING[4727][C-0000002a] Ext. s: Friendly Scanner from
[2019-07-24 13:05:07] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:4] Wait(“PJSIP/to_voda_pri-00000041”, “2”) in new stack
[2019-07-24 13:05:09] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:5] Playback(“PJSIP/to_voda_pri-00000041”, “ss-noservice”) in new stack
[2019-07-24 13:05:09] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘ss-noservice.slin16’ (language ‘en’)
[2019-07-24 13:05:14] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:6] SayAlpha(“PJSIP/to_voda_pri-00000041”, “00744087128”) in new stack
[2019-07-24 13:05:14] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/0.slin16’ (language ‘en’)
[2019-07-24 13:05:15] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/0.slin16’ (language ‘en’)
[2019-07-24 13:05:16] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/7.slin16’ (language ‘en’)
[2019-07-24 13:05:17] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/4.slin16’ (language ‘en’)
[2019-07-24 13:05:17] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/4.slin16’ (language ‘en’)
[2019-07-24 13:05:18] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/0.slin16’ (language ‘en’)
[2019-07-24 13:05:19] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/8.slin16’ (language ‘en’)
[2019-07-24 13:05:20] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/7.slin16’ (language ‘en’)
[2019-07-24 13:05:21] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/1.slin16’ (language ‘en’)
[2019-07-24 13:05:21] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/2.slin16’ (language ‘en’)
[2019-07-24 13:05:22] VERBOSE[4727][C-0000002a] file.c: <PJSIP/to_voda_pri-00000041> Playing ‘digits/8.slin16’ (language ‘en’)
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@from-pstn:7] Hangup(“PJSIP/to_voda_pri-00000041”, “”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Spawn extension (from-pstn, s, 7) exited non-zero on ‘PJSIP/to_voda_pri-00000041’
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [h@from-pstn:1] Macro(“PJSIP/to_voda_pri-00000041”, “hangupcall,”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/to_voda_pri-00000041”, “1?theend”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/to_voda_pri-00000041”, “0?Set(CDR(recordingfile)=)”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@macro-hangupcall:4] NoOp(“PJSIP/to_voda_pri-00000041”, " montior file= ") in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/to_voda_pri-00000041”, “1?skipagi”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx_builtins.c: Goto (macro-hangupcall,s,7)
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/to_voda_pri-00000041”, “”) in new stack
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/to_voda_pri-00000041’ in macro ‘hangupcall’
[2019-07-24 13:05:23] VERBOSE[4727][C-0000002a] pbx.c: Spawn extension (from-pstn, h, 1) exited non-zero on ‘PJSIP/to_voda_pri-00000041’
Is there a way I can manipulate this permanently rather than have 2 different inbound routes??
Thanks in advance for any help!