<div dir="ltr">You could use the DIALGROUP function for this and not need to shell out.<br><br><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_DIALGROUP">https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_DIALGROUP</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 8, 2017 at 7:35 AM, Frank Vanoni <span dir="ltr"><<a href="mailto:mailinglist@linuxista.com" target="_blank">mailinglist@linuxista.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
I have the following scenario:<br>
<br>
[mynicecontext]<br>
exten => 2000,1,Dial(SIP/deviceA&SIP/<wbr>deviceB&SIP/deviceC)<br>
<br>
As expected, by dialing 2000, all three devices will ring. And that's<br>
fine.<br>
However, there are situations where I only want "deviceA" and "deviceB"<br>
to ring. I would like to have an extension to dial in order to modify<br>
the dialplan.<br>
<br>
Here is what I did...<br>
<br>
In extensions.conf:<br>
<br>
------ snip -----<br>
[mynicecontext]<br>
#include "ringdevice.conf<br>
<br>
exten => 2000,1,GoTo(ringdevice,ring,1)<br>
<br>
exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt<br>
> /etc/asterisk/ringdevice.conf)<br>
exten => 4000,2,Wait(3)<br>
exten => 4000,3,System(/usr/sbin/<wbr>asterisk -rx "dialplan reload")<br>
exten => 4000,4,Playback(service&de-<wbr>activated)<br>
<br>
exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt<br>
> /etc/asterisk/ringdevice.conf)<br>
exten => 4001,2,Wait(3)<br>
exten => 4001,3,System(/usr/sbin/<wbr>asterisk -rx "dialplan reload")<br>
exten => 4001,4,Playback(service&<wbr>activated)<br>
------ end snip -----<br>
<br>
twodevices.txt contains<br>
exten => ring,1,Dial(SIP/deviceA&<wbr>SIPdeviceB)<br>
<br>
alldevices.txt contains<br>
exten => ring,1,Dial(SIP/deviceA&<wbr>SIPdeviceB&SIP/deviceC)<br>
<br>
By dialing 4000 or 4001, the dialplan is modified and reloaded<br>
accordingly.<br>
<br>
Is there a better solution?<br>
<span class="HOEnZb"><font color="#888888"><br>
Frank<br>
<br>
<br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.<wbr>org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>
</div>