Adding custom lines to extensions_additional.conf

Hello there. I have the following setup - asteris 1.4 , freepbx on ubuntu 8.10. Everthing is working fine, except a custom script that i need to execute every time there’s a call. Here’s call the callgroup looks like :

include => ext-group-custom
exten => 600,1,Macro(user-callerid,)
exten => 600,n,System(/usr/share/asterisk/agi-bin/otrs_call_status.agi)
exten => 600,n,AGI(/usr/share/asterisk/agi-bin/otrs_callerid.agi)
exten => 600,n,GotoIf($[“foo${BLKVM_OVERRIDE}” = “foo”]?skipdb)
exten => 600,n,GotoIf($["${DB(${BLKVM_OVERRIDE})}" = “TRUE”]?skipov)
exten => 600,n(skipdb),Set(__NODEST=)
exten => 600,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL})
exten => 600,n,Set(__BLKVM_BASE=${EXTEN})
exten => 600,n,Set(DB(${BLKVM_OVERRIDE})=TRUE)
exten => 600,n(skipov),Set(RRNODEST=${NODEST})
exten => 600,n(skipvmblk),Set(__NODEST=${EXTEN})
exten => 600,n,Set(RecordMethod=Group)
exten => 600,n,Macro(record-enable,101-102-103-104-105,${RecordMethod})
exten => 600,n,Set(RingGroupMethod=ringall)
exten => 600,n(DIALGRP),Macro(dial,40,${DIAL_OPTIONS},101-102-103-104-105)
exten => 600,n,Set(RingGroupMethod=)
exten => 600,n,GotoIf($[“foo${RRNODEST}” != “foo”]?nodest)
exten => 600,n,Set(__NODEST=)
exten => 600,n,dbDel(${BLKVM_OVERRIDE})
exten => 600,n,Goto(ext-group,600,1)
exten => 600,n(nodest),Noop(SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST})

; end of [ext-group]

What i need is the 2 lines where it reads :

exten => 600,n,System(/usr/share/asterisk/agi-bin/otrs_call_status.agi)
exten => 600,n,AGI(/usr/share/asterisk/agi-bin/otrs_callerid.agi)

to be in extensions_custom.conf, but for them to work they have to be after
exten => 600,1,Macro(user-callerid,). The setup is working as it is, but those 2 lines are erased every time i reload asterisk. I have tried putting the Macro line in extensions_custom.conf but it doesn’t work. Any ideas ?

Try putting your changed [ext-group] in /etc/asterisk/extensions_override_freepbx.conf but bear in mind that any time you upgrade FreePBX, it will be your responsibility to check the original [ext-group] and see if anything has changed.

Thanks :slight_smile:

Another option which is more advanced but might insulate you better from future changes, you could create a simple module that splices into the ring dialplan and ads what you need. Then it is dynamically added to extensions_additional.conf. There are several examples of this in other modules.

Thanks, but i don’t think i am so advanced yet :slight_smile: