[asterisk-users] Forking AGI or GoSub
Michael Munger
mj at hph.io
Fri Apr 19 12:59:37 CDT 2019
What’s the purpose of the URL? Does it assist operators who handle the emergency services call?
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?
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).
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.
[cid:image001.png at 01D4F6B8.F3CEF8F0]
Michael J. Munger, dCAP, MCPS, MCNPS, MBSS
Microsoft Certified Professional
Microsoft Certified Small Business Specialist
Digium Certified Asterisk Professional
High Powered Help, Inc.
p:
678-905-8569
w:
hph.io<https://hph.io> e: mj at hph.io<mailto:mj at hph.io>
From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf Of Dovid Bender
Sent: Friday, April 19, 2019 1:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
Subject: Re: [asterisk-users] Forking AGI or GoSub
Steve,
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.
On Wed, Apr 10, 2019 at 10:01 PM Steve Edwards <asterisk.org at sedwards.com<mailto:asterisk.org at sedwards.com>> wrote:
On Wed, 10 Apr 2019, Dovid Bender wrote:
> I have an AGI that can sometimes take time complete. I don't want the
> dialplan to be held up by the agi. Is there any way to call it and have
> Asterisk continue with the dialplan?
On Wed, 10 Apr 2019, Dovid Bender wrote:
> I have an AGI that can sometimes take time complete. I don't want the
> dialplan to be held up by the agi. Is there any way to call it and have
> Asterisk continue with the dialplan?
I had a situation that required this functionality -- processing a credit
card could take a second or two and we didn't want 'dead air' for our user
experience.
I created a pthread to play 'Please hold on while we process your card and
get ready for a good time...' while the main program continued with the
card authorization.
Most of the time the auth completed before the audio finished so it
appeared to be instantaneous to the caller.
The only caveat is to not interact (stdin/stdout) with Asterisk until
'stream file' in the thread completed.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com<mailto:sedwards at sedwards.com> Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Check out the new Asterisk community forum at: https://community.asterisk.org/
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190419/f92f66e1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 738 bytes
Desc: image001.png
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190419/f92f66e1/attachment.png>
More information about the asterisk-users
mailing list