FreePBX overwrites custom settings in extensions_additional.conf

Hi guys,

I recently upgraded to v. 2.4.0 and I made a few changes to some macros in extensions_additional.conf (macro-agent-add, macro-agent-del, macro-dialout-trunk). The “problem” is every time I change something in FreePBX and apply configuration changes I lose my customizations. In v. 2.3 all these macros were located in extensions.conf which was not overwritten by FreePBX during normal operations (unless you upgraded Core module). Now my question is: is there any way to avoid this situation? I’d like to be able to continue using the web interface to add extensions, queues etc. but at the same time to keep my custom macros.

Thanks.

put them in extensions_override_freepbx.conf and redefine them there. Be careful if you are running Asterisk 1.4, the override behavior is a little different.

Thanks. I’ll try that.

Well I’ve tried copying all my custom macros to extensions_override_freepbx.conf but it didn’t help much. I just updated followme module and when I applied the new settings all my changes were gone. Maybe I didn’t get it right and that’s why it happened.

For instance I need the following lines in macro-dialout-trunk macro

exten => s,n(skipoutnum),GotoIf($["${pre_num}" = “AMP:A2B/”]?a2bdial:skipoutnumnormal)
exten => s,n(a2bdial),DeadAGI(a2billing.php|1) ; Dials out via the a2billing.php script.
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,n(skipoutnumnormal),Dial(${pre_num:4}${the_num}${post_num},300,${DIAL_TRUNK_OPTIONS})

so I copied the modified macro into extensions_override_freepbx.conf. Was that the right thing to do?

Thanks for your help.

I also recently upgraded to v. 2.4.0 and managed to break everything. can’t even dial another extension.
Should I have a new extensions.conf with 2.4.0 ?
My guess is that because my extensions.conf was modified it did not get overwritten so now there are two sets of macros etc in both extensions.conf and extensions_additional.conf causing everything to fail

Thanks for your help.

Robin

Robin,

Philippe was right. If you copy all your custom macros to extensions_override_freepbx.conf they will take precedence when system loads. So just copy all macros you were using before upgrade to override file and reload asterisk. It should be fine. Or at least it worked for me.

For a while I had the impression system will actually copy my custom macros from override file to extensions_additional.conf, for instance. But it looks like the system loads everything from extensions_overrride_freepbx.conf and then just “ignores” all macros and contexts with the same names from other configuration files. Give it try.

Hi for the record here is my fix

Upgrade to 2.4.0 seemed to generate a new extensions_additional.conf but left extensions.conf intact.
This caused system to fail because both files contained [macro-dialout-trunk]

My fix was to put [macro-dialout-trunk] with my modifications for A2Billing into extensions_overrride_freepbx.conf
Next I replaced my extensions.conf by copying an newer one from /var/www/html/admin/modules/core/etc/extensions.conf

Things seem to be working again,
Thanks for your help

Robin

if you do what you said you are going to break in the future. You should delete /etc/asterisk/extensions.conf and the press the apply configuration bar - it will get re-linked and future upgrades won’t break. In the meantime, you should have an error in your notification panel telling you about its inability to link the one you copied.

OK Thanks,
I didn’t realize that it was supposed to be a symbolic link to the file in /var/www/html/admin/modules/core/etc/extensions.conf

I’m not sure what you are doing but in the three setups that I have running 2.4 what you describe does NOT happen just like it should.

The file extension_override_freepbx.conf does not get touched. I created a new extension and applied. changes still there. Deleted the extension and applied, still there.

I took the code for [macro-hangupcall] added a series of Noops to the code along with my required code to insert a value into the userfield before the CDR values are recorded and cleared out.

This survived each and every time and has been present there for several weeks for me without issue on these setups. (From 2.4.0.0 through 2.4.0.1 updates).

Hi,
I need to change from:

exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook)
exten => h,1,Macro(hangupcall,)

to

exten => bypass,1,Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook)
exten => h,1,System(/usr/local/astpp/astpp-rate-engine.pl ${UNIQUEID} &)
exten => h,1,Macro(hangupcall,)

I’ve tryed to write the full macro into extensions_override_freepbx.conf, but at the reload, my change disappeared.

How can I fix this?

Thanks to all.

… I’m only try to add one line:
exten => h,1,System(/usr/local/astpp/astpp-rate-engine.pl ${UNIQUEID} &)

which I need for billing.
Regarding extensions_override_freepbx.conf, I’ve tryed to use it, following suggestion in this page.

Anyway… my problem is still there.
Everytime I make changes(anyone), my line disappear.
What’s re-write extensions_additional.conf?

Any hint, link is welcome

Best Regards

if you read the whole thread it has been explained clearly. YOU CAN NOT make changes to extensions_additional.conf as it WILL get overwritten each and every time as that is how FreePBX works. It has to as that file contains all of the configurations setup and changes for each extension. If it does not then you’d be complaining that your configuration changes are not being implemented.

It will NOT touch extensions_custom.conf and extensions_override_freepbx.conf.

The general policy with FreePBX is that any file NOT ending in _custom.conf will get overwritten at the will of FreePBX, be it at upgrade time or when a change is applied as it owns those files.

faberk, You are not explaining where you are attempting to make this change which in your case might be important. The initial poster was interested in modifying a Macro and the proper place to post that change in a macro is the override file.

You’d be better off starting a new thread with all your details and such the attempt to continue it here as your problem might seem sililar but depending on your answer could be totaly different.

Hi guys,

I have the same problem. I have to put the next line in extensions_additional.conf:
exten => s,n,System(/bin/echo -e “CallNotification:${CALLERID(num)}~${CALLERID(name)}”|/usr/bin/sendxmpp -f /etc/asterisk/sendxmpp.conf x.${ARG3}@pricetravel.com.mx -s “You Have an incoming call” &)

This line is for send an XMPP notification to our agents logged in a queue.But everytime I hit the reload button in the web interface this line dissapears.
Does anybody know how to configure this kind of customizations in “extensions_custom.conf or extensions_override.conf”?

I would really apreciate your help.

Jorge.