[Asterisk-Users] AGI Problem
Cyrille Demaret
cyrille at easynet.be
Fri Dec 2 05:55:39 MST 2005
Hi,
I've changed that and it's the same problem. I've this problem with all
applications. Results from agi are not correct.
Regards,
Cyrille
-----Message d'origine-----
De : asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] De la part de Giovanni
Miano
Envoyé : vendredi 2 décembre 2005 12:52
À : Asterisk Users Mailing List - Non-Commercial Discussion
Objet : Re: [Asterisk-Users] AGI Problem
Try print "EXEC ChanIsAvail IAX2/24\n";
Channel type is IAX2 not IAX
Cheers
2005/12/2, Cyrille Demaret <cyrille at easynet.be>:
> Hi,
>
> I'm running the last CVS asterisk version (I was running an older version
> before with the same problem) and I've a problem with agi scripts.
Commands
> results are not always correct.
>
> I've made a small agi test script that execute ChanIsAvail on an
inexistent
> extension:
>
> ----------------------------------------------------
> #!/usr/bin/perl
>
> $|=1;
> while(<STDIN>) {
> chomp;
> last unless length($_);
> if (/^agi_(\w+)\:\s+(.*)$/) {
> $AGI{$1} = $2;
> }
> }
>
> # Check
> print "EXEC ChanIsAvail IAX/24\n";
> $result = <STDIN>;
> print "VERBOSE \"$result\" 0\n";
>
> # Check
> print "EXEC ChanIsAvail IAX/24\n";
> $result = <STDIN>;
> print "VERBOSE \"$result\" 0\n";
>
> # Check
> print "EXEC ChanIsAvail IAX/24\n";
> $result = <STDIN>;
> print "VERBOSE \"$result\" 0\n";
> ----------------------------------------------------
>
> Result is :
>
> ----------------------------------------------------
> -- Executing DeadAGI("SIP/200-60d2", "b") in new stack
> -- Launched AGI Script /var/lib/asterisk/agi-bin/b
> -- AGI Script Executing Application: (ChanIsAvail) Options: (IAX/24)
> Dec 2 10:29:37 WARNING[15776]: channel.c:2520 ast_request: No channel
type
> registered for 'IAX'
> b: 200 result=-1
> -- AGI Script Executing Application: (ChanIsAvail) Options: (IAX/24)
> Dec 2 10:29:37 WARNING[15776]: channel.c:2520 ast_request: No channel
type
> registered for 'IAX'
> b: 200 result=1
> -- AGI Script Executing Application: (ChanIsAvail) Options: (IAX/24)
> Dec 2 10:29:37 WARNING[15776]: channel.c:2520 ast_request: No channel
type
> registered for 'IAX'
> b: 510 Invalid or unknown command
> -- AGI Script b completed, returning 0
> ----------------------------------------------------
>
> The first result is ok (-1) but not the second and the third.
>
> Why do I get different results for the same command?
>
> Thank you,
>
> Regards,
>
> Cyrille
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Giovanni Miano
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list