FreePBX 2.8 Prepend problem

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 [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]:16] Macro(“SIP/100-000003f8”, “dialout-trunk-predial-hook|”) in new stack
[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]:1] Macro(“SIP/100-000003f8”, “hangupcall|”) in new stack
[Nov 17 08:10:51] VERBOSE[25618] logger.c: – Executing [[email protected]: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 [[email protected]: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 [[email protected]: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 [[email protected]: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

Philippe,

Thanks for your suggestions. We were able to successfully uninstall and then reinstall the system. That left us at FreePBX v2.5. We then manually installed FreePBX 2.8 and tested the prepend. It works properly.

It appears there’s a problem with the way the update occurred. I will try an uninstall and re-install of FreePBX.

check your notification panel.

This AGI script no longer exists in 2.8:

[Nov 17 08:10:48] VERBOSE[25618] logger.c: – Executing [[email protected]:12] ExecIf(“SIP/100-000003f8”, “1|AGI|fixlocalprefix”) in new stack

It could be you have not applied configuration settings, or it could be other issues as Elastix has been known to have their problems incorrectly copying files to places where they should not be and blocking auto-linking and stuff like that.

These are usually caught by reported errors in the notification panel.

If you are using 2.8 and need to do prepends in the trunk (that’s what is sounds like, not the route) then just put the prepend in the prepend box and the pattern you are matching that needs the prepend in the match pattern box.

the syntax you are using above with the “+” and “|” is no longer used. (And + is now a legal dial character).

however … a quick glance at your log shows that you are not in fact running FreePBX 2.8 (at least that is not the dialplan generated)

in the old syntax, just get rid of the “|” if you just want to prepend.

Thanks for your response.

Per the main screen it does report FreePBX 2.8.0.4

It is possible some old modules are there. I checked on the module admin page and all modules report 2.8.X.X except: Blacklist 2.7.0.1, DND 2.7.0.1, Recordings 3.3.10.3, IAX Settings 2.7.0.2, Bulk DID 2.5.0.3, Bulk Extensions 2.7.0, Customer DB 2.5.0.4, GABCast 2.5.0.2, Inventory 2.5.0.2 and VoiceMail Admin 2.5.7.1.

The system was updated to this version using FreePBX update from the GUI.

I am using the GUI boxes for prepend (where I enter the 84XXX code), the prefix is blank and the pattern is 011XXX.

I have the prepend on the trunk only. The outbound route has 0115. as a dialplan.