[asterisk-users] Dial an extension to modify dialplan

Frank Vanoni mailinglist at linuxista.com
Wed May 10 05:56:23 CDT 2017


Dear Digium List

First of all, I thank all of you for all the replies and the interesting
suggestions. I thank you very much. I can only learn from people like
you. :-)

I will remember all the different solutions for a future use in other
scenarios.

On Mon, 2017-05-08 at 16:35 +0200, Frank Vanoni wrote:

> Is there a better solution? 

At the end, I cleaned up my dial plan by removing the previous mess and
I'm using now ASTDB, as suggested, in the following way:


exten => 4000,1,Set(DB(alldevices/status)=OFF)
exten => 4000,2,Playback(service&de-activated)

exten => 4001,1,Set(DB(alldevices/status)=ON)
exten => 4001,2,Playback(service&activated)

exten => 2000,1,GotoIf($[${DB(alldevices/status)}=ON]?2001,1:2002,1)

exten => 2001,1,Dial(SIP/Dial(SIP/deviceA&SIP/deviceB&SIP/deviceC)

exten => 2002,1,Dial(SIP/Dial(SIP/deviceA&SIP/deviceB)




More information about the asterisk-users mailing list