Extensions_override_freepbx.conf Edits Not Loading with Dialplan Reload

FreePBX 14.0.13.17
Asterisk 13.22.0

We have a small dialplan script to change alert-info headers and trigger custom ringtones on endpoints. It’s been working for years, and had been migrated from FPBX 10 and up as we’ve upgraded, but recently added a couple of additional lines to the script but they won’t load when we perform the usual dialplan reload.

Custom dialplan:

[from-internal]

include => alert-info

[from-internal-original]
include => from-internal-noxfer
include => from-internal-xfer
include => bad-number ; auto-generated

[alert-info]
exten => _8XXXXX,1,Goto(from-internal-original,${EXTEN},1)

exten => _XXXXX,1,ExecIf($["${CALLERID(name):-4}" = “High”]?SIPAddHeader(Alert-Info: HIGH))
exten => _XXXXX,n,GotoIf($["${CALLERID(name):-4}" = “High”]?from-internal-original,${EXTEN},1)
exten => _XXXXX,1,ExecIf($["${CALLERID(name):-8}" = “Security”]?SIPAddHeader(Alert-Info: SECURITY)) ; New line not being loaded to dialplan via reload
exten => _XXXXX,n,GotoIf($["${CALLERID(name):-8}" = “Security”]?from-internal-original,${EXTEN},1) ; New line not being loaded to dialplan via reload
exten => _XXXXX,n,ExecIf($["${CALLERID(name):-6}" = “Urgent”]?SIPAddHeader(Alert-Info: URGENT))
exten => _XXXXX,n,GotoIf($["${CALLERID(name):-6}" = “Urgent”]?from-internal-original,${EXTEN},1)
exten => _XXXXX,n,ExecIf($["${CALLERID(name):-9}" = “Emergency”]?SIPAddHeader(Alert-Info: EMERGENCY))
exten => _XXXXX,n,GotoIf($["${CALLERID(name):-9}" = “Emergency”]?from-internal-original,${EXTEN},1)
exten => _XXXXX,n,ExecIf($["${CALLERID(name):-4}" = “Fire”]?SIPAddHeader(Alert-Info: FIRE))
exten => _XXXXX,n,GotoIf($["${CALLERID(name):-4}" = “Fire”]?from-internal-original,${EXTEN},1)
exten => _XXXXX,n,SIPAddHeader(Alert-Info: NORMAL)
exten => _XXXXX,n,Goto(from-internal-original,${EXTEN},1)

Result of dialplan show alert-info after adding new lines:

[ Context 'alert-info' created by 'pbx_config' ]

‘_8XXXXX’ => 1. Goto(from-internal-original,${EXTEN},1) [pbx_config]
‘_XXXXX’ => 1. ExecIf($["${CALLERID(name):-4}" = “High”]?SIPAddHeader(Alert-Info: HIGH)) [pbx_config]
2. n,GotoIf($["${CALLERID(name):-4}" = “HIgh”]?from-internal-original,${EXTEN},1) [pbx_config]
3. ExecIf($["${CALLERID(name):-6}" = “Urgent”]?SIPAddHeader(Alert-Info: URGENT)) [pbx_config]
4. GotoIf($["${CALLERID(name):-6}" = “Urgent”]?from-internal-original,${EXTEN},1) [pbx_config]
5. ExecIf($["${CALLERID(name):-9}" = “Emergency”]?SIPAddHeader(Alert-Info: EMERGENCY)) [pbx_config]
6. GotoIf($["${CALLERID(name):-9}" = “Emergency”]?from-internal-original,${EXTEN},1) [pbx_config]
7. ExecIf($["${CALLERID(name):-4}" = “Fire”]?SIPAddHeader(Alert-Info: FIRE)) [pbx_config]
8. GotoIf($["${CALLERID(name):-4}" = “Fire”]?from-internal-original,${EXTEN},1) [pbx_config]
9. SIPAddHeader(Alert-Info: NORMAL) [pbx_config]
10. Goto(from-internal-original,${EXTEN},1) [pbx_config]

-= 2 extensions (11 priorities) in 1 context. =-

We’ve tried adding (+) next to the context name i.e. [alert-info] (+) with no success.

Any suggestions welcome! (Including tips to streamline this code…)

You have two matches on _XXXXX,1

[alert-info]
exten => _XXXXX,1,ExecIf($["${CALLERID(name):-4}" = “High”]?SIPAddHeader(Alert-Info: HIGH))
exten => _XXXXX,1,ExecIf($["${CALLERID(name):-8}" = “Security”]?SIPAddHeader(Alert-Info: SECURITY)) ; New line not being loaded to dialplan via reload

Change the second one to _XXXXX,n

Of course… a fourth set of eyes always does the trick. Copy/paste/modify does have its downside. Thanks for the quick assist @sorvani!

Why don’t you write your custom dialplan to extensions_custom.conf ?

That’s the official place where it belongs.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.