How to add a line in the dialplan

For CTI use,I would like to add a line in the DND ON (*78) part of the dialplan :


And another line in the DND OFF (*79) part of the dialplan :


Can this be done inside FreePBX using the GUI ?

Look online for the dialplan injection module.

Hi Andrew,

I placed these lines in the extensions_custom.conf.
The modification works but can it be done this way
without destroying the “internal architecture” of FreePBX ?


exten => *78,1,Goto(dnd-on-xtelsio,${CALLERID(num)},1)
exten => *79,1,Goto(dnd-off-xtelsio,${CALLERID(num)},1)


exten => _X.,1,UserEvent(SETDND)
exten => _X.,n,Playback(beep)
exten => _X.,n,Goto(app-dnd-on,*78,1)


exten => _X.,1,UserEvent(DELDND)
exten => _X.,n,Playback(beep)
exten => _X.,n,Goto(app-dnd-off,*79,1)

Looks clean to me. You are prob fine with ${CALLERID(num)} but you may find ${AMPUSER} will work in edge cases where CID doesn’t.

Hi Lorne,

I think the variable AMPUSER is still empty at this time and will only be filled further on in the DND dialplan. That’s why I used CALLERID(num).

But please correct me when I’m wrong.

Gr. Bart.

1 Like