[Asterisk-Users] Weird AGI/X100P behavior

Steven Critchfield critch at basesys.com
Sat Apr 12 00:18:36 MST 2003


2 parts here. 
1: you don't need EAGI here since you are doing simple stuff, try using
just plain AGI
2: try running your perl script on the command line with a -wc options
to make sure you aren't failing to run and therefore asterisk hangs up
quickly.
  

On Sat, 2003-04-12 at 01:50, James Sharp wrote:
> I've got a single phone line coming into an X100P.
> 
> In extensions.conf I've got this:
> 
> [inboundzap]
> exten => s,1,Answer
> exten => s,2,EAgi,hanguptest.agi
> 
> I see the ring come in and Asterisk detects it and tries to do something
> with it:
> 
> NOTICE[20492]: File chan_zap.c, Line 4017 (ss_thread): Got event 2
> (Ring/Answered)...
>     -- Executing Answer("Zap/1-1", "") in new stack
>     -- Executing EAGI("Zap/1-1", "hanguptest.agi") in new stack
>     -- Launched AGI Script /var/lib/asterisk/agi-bin/hanguptest.agi
> Foo:  1
>     -- AGI Script hanguptest.agi completed, returning 0
>     -- Hungup 'Zap/1-1'
>     -- Starting simple switch on 'Zap/1-1'
> 
> 
> The line never gets answered, though....unless I use one of the sample AGI
> scripts that come with *.
> 
> My hanguptest.agi file is pretty simple:
> 
> #!/usr/bin/perl
> 
> use Asterisk::AGI;
> $|=1;
> $AGI = new Asterisk::AGI;
> %input = $AGI->ReadParse();
> $AGI->answer();
> $foo = $AGI->wait_for_digit();
> print STDERR "Foo:  $foo\n";
> $AGI->say_digits('$foo');
> $AGI->hangup;
> 
> 
> Am I missing something basic about AGI?
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list