[Asterisk-Dev] EAGI : Pipe saturation

Areski areski at e-group.org
Tue Dec 16 08:44:52 MST 2003

On Tue, 2003-12-16 at 16:12, Steven Critchfield wrote:
> On Tue, 2003-12-16 at 05:13, Areski wrote:
> > Well, I created a script that loop all the time until that the user
> > hangup. With AGI, my script is not killed by Asterisk for some reasons
> > ;/ (perhaps it's normal) 
> What language are you using for the Agi? Maybe your lost pipes are in
> your script not asterisk.
I also though to it and that's why I tried with Perl (the first was in
c)... then I removed all pieces of my script till to find out what was
wrong and at the end I had an empty script... so for sure, that's come
from asterisk (perhaps just my), I m pretty sure that there is smth
wrong in the function when efd (enhanced) is setup.
static int launch_script(char *script, char *args, int *fds, int *efd,
int *opid)

Did you test an eagi and see if you lose also pipes?
I m beginner with Asterisk but if pipe aren't close, it should not be
difficult to fix it.

exten => 1879,1,Answer
exten => 1879,2,Wait(2)
exten => 1879,3,eagi,DialAnMp3.agi
exten => 1879,4,Hangup

> > Actually, I just tricked it on AGI, so it's work fine now, I detect the
> > hangup from stdin. Perhaps that was the way.
> Thats the appropriate way/ Asterisk does not kill you script off. It
> just closes it's side of the pipes. So you have to detect that and close
> up your side and clean anything else up before exiting. 

I m sure that I saw smth like send SIGHUP signal, I should stop drugs
and alcools. 

Thans for all,

More information about the asterisk-dev mailing list