DND and Queue pause

Hi,

I would like to have a queue member being paused/unpaused when he is using *76 to set/unset DND.

Can I modify the DND function to create this (aditional) behaviour ?

Should I manipulate a database variable ?

Gr. Bart.

*76 is in /etc/asterisk/extensions_additional.conf

So you could write in /etc/asterisk/extensions_override.conf to include or override with your custom script. one approach is you could copy the whole context over, then modify as you see fit. You will need to remember that once its in override, override is the only place you can edit the behavior.

EDIT:
There is a include hook of include => app-dnd-toggle-custom so you should just need to make a [app-dnd-toggle-custom] context in extensions_custom.conf and it would be included in the original context. While overriding would also work, this is probably the better way to go.

Hi,

I put this in “extensions_custom.conf” and it works !

[from-internal-custom]

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

[dnd-on]

exten => _X.,1,PauseQueueMember(,Local/${CALLERID(num)}@from-queue/n)
exten => _X.,n,Playback(beep)
exten => _X.,n,Goto(app-dnd-on,*78,1)

[dnd-off]

exten => _X.,1,UnPauseQueueMember(,Local/${CALLERID(num)}@from-queue/n)
exten => _X.,n,Playback(beep)
exten => _X.,n,Goto(app-dnd-off,*79,1)

[dnd-toggle]

exten => _X.,1,ExecIf($["${DB(DND/${CALLERID(num)})}" = “”]?PauseQueueMember(,Local/${CALLERID(num)}@from-queue/n):UnPauseQueueMember(,Local/${CALLERID(num)}@from-queue/n)
exten => _X.,n,Playback(beep)
exten => _X.,n,Goto(app-dnd-toggle,*76,1)

2 Likes

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