[Asterisk-Users] simple perl-agi - where's the error?

Christian B bencokakao at gmail.com
Mon Mar 20 08:13:38 MST 2006


no. the result is sligthly different(no quotes), but the variable still
can not be written:

GET VARIABLE DIALSTRING
AGI Tx >> 200 result=1 (Zap/G1/0892343242343)
AGI Rx << EXEC DIAL 
    -- AGI Script Executing Application: (DIAL) Options: ((null))
Mar 20 16:12:10 WARNING[4478]: app_dial.c:773 dial_exec_full: Dial
requires an argument (technology/number) AGI Tx >> 200 result=-1


i don't think the problem lies in the dial-command, but in setting the
variable $dialstring

when i use
$dialstring = "Zap/G1/0892343242343"
the dial-command works...

thanks!

On Mon, 20 Mar 2006 15:06:47 +0100
Benoît Mérouze <benoit.merouze at ipercom.com> wrote:

> You should try '$res = $AGI->exec("DIAL", "$dialstring");'
> 
> 
> Christian B wrote:
> > Hello!
> >
> > I'm trying to setup a perl-deadagi, but my perl skills lack. can
> > someone tell me why the following code doesn't work:
> >
> > #!/usr/bin/perl
> > use Asterisk::AGI;
> >  $AGI = new Asterisk::AGI;
> >
> > $dialstring = $AGI->get_variable("DIALSTRING");
> > $res = $AGI->exec("DIAL $dialstring");
> >
> >
> > the asterisk output says:
> >
> > AGI Rx << GET VARIABLE DIALSTRING
> > AGI Tx >> 200 result=1 (089324154332)
> > AGI Rx << EXEC DIAL  ""
> >     -- AGI Script Executing Application: (DIAL) Options: ()
> > Mar 20 11:46:02 WARNING[21970]: app_dial.c:773 dial_exec_full: Dial
> > requires an argument (technology/number) AGI Tx >> 200 result=-1
> >     -- AGI Script agirouter/dialscript.pl completed, returning 0
> >
> >
> > so the get_variable-command seems to work, also the exec(with
> > "$dialstring = 089324154332" the call goes out), but not setting the
> > variable. should be so simple :-( astcc-agi seems to use the same
> > syntax, so i have no clue what is wrong in my place... 
> > any ideas? thx!
> >
> > kind regards
> > christian
> > _______________________________________________
> > --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
> >
> >   
> 
> -- 
> Benoit Merouze
> Network Software Developer
> benoit.merouze at ipercom.com
> 
> _______________________________________________
> --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