[asterisk-users] Forking AGI or GoSub

2019-04-10 Thread Dovid Bender
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? -- _ -- Bandwidth and Colocation Provided by http:/

Re: [asterisk-users] Forking AGI or GoSub

2019-04-10 Thread Mark Wiater
On 4/10/2019 3:54 PM, 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? > Is there a reason you can't fork in the AGI and just return to the

Re: [asterisk-users] Forking AGI or GoSub

2019-04-10 Thread Steve Edwards
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 sometime

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Dovid Bender
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 wrote: > On Wed, 10 Apr 2019, D

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Dovid Bender
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? On Wed, Apr 10, 2019 at 4:27 PM Mark Wiater wrote: > On 4/10/2019 3:54 PM, Dovid Bender wrote: > > I have an AGI that can sometimes take time complete. I don't want the >

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Mark Wiater
On 4/19/2019 1:49 PM, Dovid Bender wrote: > 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? > > > On Wed, Apr 10, 2019 at 4:27 PM Mark Wiater > wrote: > > On 4/10/2019 3:54 PM, Dov

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Michael Munger
: hph.io<https://hph.io> e: m...@hph.io<mailto:m...@hph.io> From: asterisk-users On Behalf Of Dovid Bender Sent: Friday, April 19, 2019 1:49 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Forking AGI or GoSub Steve, In my case

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Michael Munger
f Of Mark Wiater Sent: Friday, April 19, 2019 2:00 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Forking AGI or GoSub On 4/19/2019 1:49 PM, Dovid Bender wrote: Mark, I am using PHP agi and when forking the call does not continue util the forked process is done. Am I doi

Re: [asterisk-users] Forking AGI or GoSub

2019-04-19 Thread Eric Wieling
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 On 04/19/2019 02:00 PM, Mark Wiater wrote: On 4/19/2019 1:49 P

Re: [asterisk-users] Forking AGI or GoSub

2019-04-22 Thread Dovid Bender
Eric, As I mentioned before that does not seem to work with PHP == Using SIP RTP CoS mark 5 -- Executing [my_test_test@from-external:1] NoOp("SIP/fpp--09ca", "") in new stack -- Executing [my_test_test@from-external:2] AGI("SIP/fpp--09ca", "fast_agi_wrapper,my_te

Re: [asterisk-users] Forking AGI or GoSub

2019-04-23 Thread John Runyon
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'); /