Hello,
Is there a facility for customizing the template which generates the dialplan for extensions?
When extensions are dialed, I need to run an AGI shell script, to send a push notification then wait(3) seconds to give the mobile app a chance to register to asterisk from an asleep state before the invite is passed on.
This snippet works for me, but if I put it in extensions_additional.conf it is overwritten as expected when apply config is presssed.
exten => 1337,1,Ringing
exten => 1337,n,AGI(/usr/bin/shellscrip.sh)
exten => 1337,n,Wait(3)
exten => 1337,n,Set(__RINGTIMER=${IF($["${DB(AMPUSER/1337/ringtimer)}" > "0"]?${DB(AMPUSER/1337/ringtimer)}:${RINGTIMER_DEFAULT})})
exten => 1337,n,Macro(exten-vm,novm,1337,0,0,0)
exten => 1337,n(dest),Set(__PICKUPMARK=)
exten => 1337,n,Goto(${IVR_CONTEXT},return,1)
exten => 1337,hint,SIP/1337,CustomPresence:1337
This is the āstockā generated dialplan (so basically I am just inserting 3 lines at the beginning above)
exten => 1338,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/1338/ringtimer)}" > "0"]?${DB(AMPUSER/1338/ringtimer)}:${RINGTIMER_DEFAULT})})
exten => 1338,n,Macro(exten-vm,novm,1338,0,0,0)
exten => 1338,n(dest),Set(__PICKUPMARK=)
exten => 1338,n,Goto(${IVR_CONTEXT},return,1)
exten => 1338,hint,SIP/1338,CustomPresence:1338