<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">What’s the purpose of the URL? Does it assist operators who handle the emergency services call?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Off the top of my head, I am not sure you can fork an AGI call from asterisk. Seems it would defeat the purpose of AGI, which should handle the call flow when
it has control of the call. Have you considered have the AGI write to a socket of a secondary application, which will then perform the web call from its own process?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Seems relatively simple to write the call information to a socket as it’s getting processed, and then the AGI will complete in milliseconds and the call can continue.
The secondary application can then do the URL POST. (You can probably whip this up in python very easily).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Not sure this solve the delay issue, however. If the secondary application stops running, you’d have to see if / how the AGI fails. I think it would just fail
and the dialplan would just continue. Would need testing so it fails gracefully.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border:none;border-right:solid black 2.25pt;padding:0in 5.25pt 0in 0in">
<p class="MsoNormal"><span style="font-size:13.5pt;color:black"><img width="85" height="41" style="width:.8854in;height:.427in" id="Picture_x0020_1" src="cid:image001.png@01D4F6B8.F3CEF8F0"><o:p></o:p></span></p>
</td>
<td style="padding:0in 0in 0in 9.0pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td colspan="2" style="padding:0in 0in 3.75pt 0in">
<p class="MsoNormal"><span style="font-size:13.5pt;font-family:"Arial",sans-serif;color:black">Michael J. Munger, dCAP, MCPS, MCNPS, MBSS<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333">Microsoft Certified Professional</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333">Microsoft Certified Small Business Specialist</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333">Digium Certified Asterisk Professional</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333">High Powered Help, Inc.</span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="54" valign="top" style="width:15.0pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">p:<o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333">678-905-8569<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="54" valign="top" style="width:15.0pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">w:<o:p></o:p></span></p>
</td>
<td valign="top" style="padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="https://hph.io"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#1DA1DB">hph.io</span></a></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"> </span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">e: </span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="mailto:mj@hph.io"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#1DA1DB">mj@hph.io</span></a></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#333333"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:105%"><span style="font-size:11.0pt;line-height:105%;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> asterisk-users <asterisk-users-bounces@lists.digium.com>
<b>On Behalf Of </b>Dovid Bender<br>
<b>Sent:</b> Friday, April 19, 2019 1:49 PM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com><br>
<b>Subject:</b> Re: [asterisk-users] Forking AGI or GoSub<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Steve,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Apr 10, 2019 at 10:01 PM Steve Edwards <<a href="mailto:asterisk.org@sedwards.com">asterisk.org@sedwards.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">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" 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" target="_blank">
http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" 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" 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" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>