<div dir="ltr">Steve,<div><br></div><div>In my case this is for emergency services. The AGI calls a web URL with the callers information. The call passes through Asterisk and we don't want to delay the call at all if the API takes 1-2 extra seconds.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 10, 2019 at 10:01 PM Steve Edwards <<a href="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.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">On Wed, 10 Apr 2019, Dovid Bender wrote:<br>
<br>
> I have an AGI that can sometimes take time complete. I don't want the <br>
> dialplan to be held up by the agi. Is there any way to call it and have <br>
> Asterisk continue with the dialplan?<br>
<br>
On Wed, 10 Apr 2019, Dovid Bender wrote:<br>
<br>
> I have an AGI that can sometimes take time complete. I don't want the <br>
> dialplan to be held up by the agi. Is there any way to call it and have <br>
> Asterisk continue with the dialplan?<br>
<br>
I had a situation that required this functionality -- processing a credit <br>
card could take a second or two and we didn't want 'dead air' for our user <br>
experience.<br>
<br>
I created a pthread to play 'Please hold on while we process your card and <br>
get ready for a good time...' while the main program continued with the <br>
card authorization.<br>
<br>
Most of the time the auth completed before the audio finished so it <br>
appeared to be instantaneous to the caller.<br>
<br>
The only caveat is to not interact (stdin/stdout) with Asterisk until <br>
'stream file' in the thread completed.<br>
<br>
-- <br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards       <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a>      Voice: +1-760-468-3867 PST<br>
             <a href="https://www.linkedin.com/in/steve-edwards-4244281" rel="noreferrer" target="_blank">https://www.linkedin.com/in/steve-edwards-4244281</a><br>
<br>
-- <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>