[asterisk-users] Forking AGI or GoSub
Steve Edwards
asterisk.org at sedwards.com
Wed Apr 10 20:59:57 CDT 2019
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 Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
More information about the asterisk-users
mailing list