<div dir="ltr"><div>Hi Dovid, thanks for that, it works! :)<br></div><div><br></div><div>[from-internal]<br>exten = 514316XXXX,1,Answer()<br>same => n,Dial(LOCAL/100@extensions&LOCAL/101@background)<br><br>[extensions]<br>exten => 100,1,Playback(hello)<br>same => n,JACK([i(SuperCollider:in_1), o(SuperCollider:out_1)])<br>same => n,Hangup()<br><br>[background]<br>Exten => 101,1,Congestion<br>Exten => h,1,AGI(test.py) </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 15, 2020 at 5:16 PM Dovid Bender <<a href="mailto:dovid@telecurve.com">dovid@telecurve.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Asterisk will try calling both at once. As soon as one is answered it cancels the call to the other. What you can do is for extension 101 to put it in it's own context and then call the agi from the h extension. So something like this:<br>[from-internal]<br>exten = 514316XXXX,1,Answer()<br>same => n,Playback(hello)<br>same => n,Dial(LOCAL/100@extensions&LOCAL/101@extensions)<br>[extensions]<br>exten => 100,1,JACK([i(SuperCollider:in_1), o(SuperCollider:out_1)])<br>same => n,Hangup()<br><div>[our_agi]</div><div>Exten => 101,1,Congestion</div><div>Exten => h,1,AGI(test.py) <br></div><div><div><br></div><div><br></div><div><br></div><div> <br><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 15, 2020 at 12:35 PM Peter van Haaften <<a href="mailto:petervh@gmail.com" target="_blank">petervh@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br>I am trying to write a dialplan that will use Dial() to call two local extensions. One extension will run an AGI script (a continuous background process, running until hangup), the other will connect the active channel to Jack() (also running as continuous process, until hangup).<br><br>This is my current dialplan attempt:<div><br>---------------------<br>[from-internal]<br>exten = 514316XXXX,1,Answer()<br>same => n,Playback(hello)<br>same => n,Dial(LOCAL/100@extensions&LOCAL/101@extensions)<br>[extensions]<br>exten => 100,1,JACK([i(SuperCollider:in_1), o(SuperCollider:out_1)])<br>same => n,Hangup()<br>exten => 101,1,AGI(test.py)<div>---------------------</div><div><br>Currently, this will start my python script via AGI & run it as blocking, stopping extension 100 from connecting.<br><br>I’ve also tried the following alternative syntax’s with Dial, with varying results but no solution yet:<br><br>---------------------<br>same => n,Dial(LOCAL/100@extensions,,&LOCAL/101@extensions,,G(extensions,101,1))<br>same => n,Dial(LOCAL/100@extensions,,g&LOCAL/101@extensions,,g)<br>same => n,Dial(LOCAL/100@extensions,,G(extensions,101,1))</div><div>---------------------</div><div><br>From my readings of other related issues, I think I’m very close but have just minimally messed up the syntax. I know trying to force two running processes on the dialplan is not generally recommended, but I have a specific use-case, and my Asterisk server will only be handling a small number of concurrent callers.<br><br>I can provide more detail on my python script process, my need for Jack, etc. My need for parallel running processes on the dialplan was spurned by issues I’ve had with JACK_HOOK, which are detailed here: <a href="https://community.asterisk.org/t/jack-hook-issue-and-finding-working-alternative/86039" target="_blank">https://community.asterisk.org/t/jack-hook-issue-and-finding-working-alternative/86039</a></div><div><br>Thanks in advance for any help or suggestions!<br></div></div></div></div>
-- <br>
_____________________________________________________________________<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.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/wiki/display/AST/Getting+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/mailman/listinfo/asterisk-users</a></blockquote></div>
-- <br>
_____________________________________________________________________<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.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/wiki/display/AST/Getting+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/mailman/listinfo/asterisk-users</a></blockquote></div>