[asterisk-users] Dial an extension to modify dialplan
Antony Stone
Antony.Stone at asterisk.open.source.it
Mon May 8 10:13:36 CDT 2017
On Monday 08 May 2017 at 15:44:47, Marcelo Terres wrote:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Dialpl
> anExtensionAdd
>
> Is it enough?
Is there a similar call to delete an extension, or to modify an existing one?
On the basis that the OP already has extension 2000 defined, he would need to
delete this and replace it with a new definition, or alter the current
definition, to get the required results.
Simply being able to add a new extension to an existing dialplan isn't quite
enough.
Antony.
> On 8 May 2017 at 15:35, Frank Vanoni <mailinglist at linuxista.com> wrote:
> > Hello
> >
> > I have the following scenario:
> >
> > [mynicecontext]
> > exten => 2000,1,Dial(SIP/deviceA&SIP/deviceB&SIP/deviceC)
> >
> > As expected, by dialing 2000, all three devices will ring. And that's
> > fine.
> > However, there are situations where I only want "deviceA" and "deviceB"
> > to ring. I would like to have an extension to dial in order to modify
> > the dialplan.
> >
> > Here is what I did...
> >
> > In extensions.conf:
> >
> > ------ snip -----
> > [mynicecontext]
> > #include "ringdevice.conf
> >
> > exten => 2000,1,GoTo(ringdevice,ring,1)
> >
> > exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> >
> >> /etc/asterisk/ringdevice.conf)
> >
> > exten => 4000,2,Wait(3)
> > exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4000,4,Playback(service&de-activated)
> >
> > exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> >
> >> /etc/asterisk/ringdevice.conf)
> >
> > exten => 4001,2,Wait(3)
> > exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4001,4,Playback(service&activated)
> > ------ end snip -----
> >
> > twodevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA&SIPdeviceB)
> >
> > alldevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA&SIPdeviceB&SIP/deviceC)
> >
> > By dialing 4000 or 4001, the dialplan is modified and reloaded
> > accordingly.
> >
> > Is there a better solution?
> >
> > Frank
--
3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
The first logician says "I don't know."
The second logician says "I don't know."
The third logician says "Yes!"
Please reply to the list;
please *don't* CC me.
More information about the asterisk-users
mailing list