Forking AGI Or GoSub
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 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?
10 thoughts on - Forking AGI Or GoSub
Is there a reason you can’t fork in the AGI and just return to the dialplan in the parent?
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@sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
—
Mark,
I am using PHP agi and when forking the call does not continue util the forked process is done. Am I doing it wrong?
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.
Dovid,
I’m not much of a PHP person, but in perl, i check the process id that’s returned from fork() and exit if it’s 1 (parent) and keep processing if it’s the child (greater than 1).
I think php uses pcntl_fork().
Is that how you’re doing it?
–_000_46FCA36BC7E1D546AC28870158F9C25B03D42E2D74ABRAHAMhighpo_
Content-Type: text/plain; charset=”utf-8″
Content-Transfer-Encoding: base64
V2hhdOKAmXMgdGhlIHB1cnBvc2Ugb2YgdGhlIFVSTD8gRG9lcyBpdCBhc3Npc3Qgb3BlcmF0b3Jz IHdobyBoYW5kbGUgdGhlIGVtZXJnZW5jeSBzZXJ2aWNlcyBjYWxsPw0KDQpPZmYgdGhlIHRvcCBv ZiBteSBoZWFkLCBJIGFtIG5vdCBzdXJlIHlvdSBjYW4gZm9yayBhbiBBR0kgY2FsbCBmcm9tIGFz dGVyaXNrLiBTZWVtcyBpdCB3b3VsZCBkZWZlYXQgdGhlIHB1cnBvc2Ugb2YgQUdJ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WNr IG91dCB0aGUgbmV3IEFzdGVyaXNrIGNvbW11bml0eSBmb3J1bSBhdDogaHR0cHM6Ly9jb21tdW5p dHkuYXN0ZXJpc2sub3JnLw0KDQpOZXcgdG8gQXN0ZXJpc2s/IFN0YXJ0IGhlcmU6DQogICAgICBo dHRwczovL3dpa2kuYXN0ZXJpc2sub3JnL3dpa2kvZGlzcGxheS9BU1QvR2V0dGluZytTdGFydGVk DQoNCmFzdGVyaXNrLXVzZXJzIG1haWxpbmcgbGlzdA0KVG8gVU5TVUJTQ1JJQkUgb3IgdXBkYXRl IG9wdGlvbnMgdmlzaXQ6DQogICBodHRwOi8vbGlzdHMuZGlnaXVtLmNvbS9tYWlsbWFuL2xpc3Rp bmZvL2FzdGVyaXNrLXVzZXJzDQo
–_000_46FCA36BC7E1D546AC28870158F9C25B03D42E2D74ABRAHAMhighpo_
Content-Type: text/html; charset=”utf-8″
Content-Transfer-Encoding: base64
PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVy bjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVt YXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWlj cm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv VFIvUkVDLWh0bWw0MCI+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIg Y29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjxtZXRhIG5hbWU9IkdlbmVyYXRv ciIgY29udGVudD0iTWljcm9zb2Z0IFdvcmQgMTUgKGZpbHRlcmVkIG1lZGl1bSkiPg0KPCEtLVtp ZiAhbXNvXT48c3R5bGU+dlw6KiB7Y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_46FCA36BC7E1D546AC28870158F9C25B03D42E2D74ABRAHAMhighpo_
–_000_46FCA36BC7E1D546AC28870158F9C25B03D42E2DF1ABRAHAMhighpo_
Content-Type: text/plain; charset=”us-ascii”
Content-Transfer-Encoding: quoted-printable
I am very much a PHP person. PHP doesn’t really have an elegant way to handle forking / threading, which can make it non-trivial to implement and can be unreliable if the implementation is not exact. PHP must also be compiled to be thread safe in order to do this properly.
Granted, the last time I looked into this with PHP was under PHP 5.6, and tests at that time did not yield the results we wanted. We ultimately moved to Python when we needed multi-threading, which is extremely elegant and reliable for this application.
[cid:image001.png@01D4F6B9.8C1499D0]
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@hph.io
From: asterisk-users 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?
Is there a reason you can’t fork in the AGI and just return to the dialplan in the parent?
Dovid,
I’m not much of a PHP person, but in perl, i check the process id that’s returned from fork() and exit if it’s 1 (parent) and keep processing if it’s the child (greater than 1).
I think php uses pcntl_fork().
Is that how you’re doing it?
–_000_46FCA36BC7E1D546AC28870158F9C25B03D42E2DF1ABRAHAMhighpo_
Content-Type: text/html; charset=”us-ascii”
Content-Transfer-Encoding: quoted-printable
In PHP something like:
$pid = pcntl_fork();
if ($pid != 0) {
// we are the parent
// do parent stuff
exit;
}
// we are the child, detatch from terminal
$sid = posix_setsid();
if ($sid < 0) { die; } // do child stuff -- http://help.nyigc.net/
—
Eric,
As I mentioned before that does not seem to work with PHP
== Using SIP RTP CoS mark 5AGI Script Playing ‘tt-monkeys.slin’ (language ‘en’)
— Executing [my_test_test@from-external:1]
NoOp(“SIP/fpp-55559999-000009ca”, “”) in new stack
— Executing [my_test_test@from-external:2]
AGI(“SIP/fpp-55559999-000009ca”,
“fast_agi_wrapper,my_test,cnum000009&cname=Dovid Bender”) in new stack
— Launched AGI Script /opt/dovid/fastagi/fast_agi_wrapper fast_agi_wrapper,my_test,cnum000009&cname=Dovid Bender: We are the parent. Let’s die!
fast_agi_wrapper,my_test,cnum000009&cname=Dovid Bender: We are child here. Taking a nap !
fast_agi_wrapper,my_test,cnum000009&cname=Dovid Bender: That nap was goooood!
—
/opt/dovid/fastagi/fast_agi_wrapper completed, returning 0
— Executing [my_test_test@from-external:3]
Playback(“SIP/fpp-55559999-000009ca”, “tt-monkeys”) in new stack
—
— Remote UNIX connection
— Remote UNIX connection disconnected
My code:
verbose(“We are the parent. Let’s die!”);
exit;
}
// we are the child, detatch from terminal
$sid = posix_setsid();
if ($sid < 0) { die; } // do child stuff $fastagi->verbose(“We are child here. Taking a nap !”);
sleep(5);
$fastagi->verbose(“That nap was goooood!”);
?>
Glancing at the code, Asterisk appears to wait for the pipe between Asterisk and the AGI to be closed before it considers it completed. So, the problem is this pipe is duplicated into the child.
Try adding this after setsid:
fclose(STDIN);
fclose(STDOUT);
fclose(STDERR);
fopen(‘/dev/null’, ‘r’); // set fd/0
fopen(‘/dev/null’, ‘w’); // set fd/1
fopen(‘php://stdout’, ‘w’); // a hack to duplicate fd/1 to 2
(from https://andytson.com/blog/2010/05/daemonising-a-php-cli-script-on-a-posix-system/
)