I need help with prepending numbers. Based upon the number dialed, I need to prepend codes to route to a particular rate for one of my SIP carriers. I am running an Elastix version 1.6.2-13 upgraded to latest release of FreePBX 2.8. The trunk has the following dialplan:
84176+|01155.
84178+|011598.
84178+|011593.
84173+|01152.
There are not any other entries in the dialplan. Another trunk has been set up to handle other Non-US calls.
I expected this dial plan to prepend the 8417X number in front of the number dialed. Instead, I only see the actual dialed number in the call log. I am attaching an extract here.
================================ Call Log Begin ===========================
ExecIf(“SIP/100-000003f8”, “1|Set|CALLERID(all)=Multisol IT<6789218100>”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: ExecIf
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Last app: Set|CALLERID(all)=Multisol IT<6789218100>
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/100-000003f8”, “0|Set|CALLERID(all)=”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: ExecIf
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/100-000003f8”, “0|SetCallerPres|prohib_passed_screen”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: ExecIf
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: Macro
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/100-000003f8”, “1|AGI|fixlocalprefix”) in new stack
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
[Nov 17 08:10:48] VERBOSE[25618] logger.c: fixlocalprefix: ERROR: This the fixlocalprefix script has been deprecated and does nothing
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – AGI Script fixlocalprefix completed, returning 0
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: ExecIf
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Last app: AGI|fixlocalprefix
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/100-000003f8”, “OUTNUM=01159824871169”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: Set
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/100-000003f8”, “custom=SIP/iCall_MuIntTPrime”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: Set
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/100-000003f8”, “0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^default)tTfwW”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: ExecIf
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:16] Macro(“SIP/100-000003f8”, “dialout-trunk-predial-hook|”) in new stack
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/100-000003f8”, “”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: Macro
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/100-000003f8”, “0?bypass|1”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: GotoIf
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/100-000003f8”, “0?customtrunk”) in new stack
[Nov 17 08:10:48] DEBUG[25618] app_macro.c: Executed application: GotoIf
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/100-000003f8”, “SIP/iCall_MuIntTPrime/01159824871169|300|tTfwW”) in new stack
[Nov 17 08:10:48] NOTICE[25618] app_dial.c: Hey! chan SIP/100-000003f8’s context=‘macro-dialout-trunk’, and exten=‘s’
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Called iCall_MuIntTPrime/01159824871169
[Nov 17 08:10:50] VERBOSE[25618] logger.c: – SIP/iCall_MuIntTPrime-000003f9 is ringing
[Nov 17 08:10:50] VERBOSE[25618] logger.c: – SIP/iCall_MuIntTPrime-000003f9 is making progress passing it to SIP/100-000003f8
[Nov 17 08:10:50] VERBOSE[25618] logger.c: – SIP/iCall_MuIntTPrime-000003f9 answered SIP/100-000003f8
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [h@macro-dialout-trunk:1] Macro(“SIP/100-000003f8”, “hangupcall|”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/100-000003f8”, “1?skiprg”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Goto (macro-hangupcall,s,4)
[Nov 17 08:10:51] DEBUG[25618] app_macro.c: Executed application: GotoIf
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [s@macro-hangupcall:4] GotoIf(“SIP/100-000003f8”, “1?skipblkvm”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Goto (macro-hangupcall,s,7)
[Nov 17 08:10:51] DEBUG[25618] app_macro.c: Executed application: GotoIf
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [s@macro-hangupcall:7] GotoIf(“SIP/100-000003f8”, “1?theend”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Goto (macro-hangupcall,s,9)
[Nov 17 08:10:51] DEBUG[25618] app_macro.c: Executed application: GotoIf
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [s@macro-hangupcall:9] Hangup(“SIP/100-000003f8”, “”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/100-000003f8’ in macro ‘hangupcall’
[Nov 17 08:10:51] VERBOSE[25618] logger.c: == Spawn h extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/100-000003f8’
[Nov 17 08:10:51] VERBOSE[25618] logger.c: == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/100-000003f8’ in macro ‘dialout-trunk’
============================== Call Log End ================================
Can anyone tell me what I am not doing correctly? Is there a better way to prepend a code to the beginning of a number?
Thank you in advance