[asterisk-users] Simplest way of executing a non-blocking (async) python AGI script?
Antony Stone
Antony.Stone at asterisk.open.source.it
Fri Jun 30 12:23:04 CDT 2017
On Friday 30 June 2017 at 19:11:08, Jonathan H wrote:
> I use a python AGI which pulls some info from a web service, which should
> take half a second.
>
> Sometimes, it takes 5-10 seconds which blocks the dialplan execution, but
> the dialplan should continue immediately as it's not dependent on the
> AGI/web service data.
>
> What's the simplest, easiest quickest least-code way of firing off an AGI
> with some variable, and then returning to the dialplan?
Write your python code to fork() the lookup to a child process, and let the
parent return immediately to Asterisk.
> I've seen people talking about fastAGI, stasis, python ASYNC... all seems
> rather complicated. I feel I must be missing something embarrassingly
> obvious - isn't there just the equivalent of the unix shell's "&"?!
Not inside Asterisk, no.
Antony.
--
The words "e pluribus unum" on the Great Seal of the United States are from a
poem by Virgil entitled "Moretum", which is about cheese and garlic salad
dressing.
Please reply to the list;
please *don't* CC me.
More information about the asterisk-users
mailing list