[Asterisk-Users] Asterisk::AGI script won't work?

Richard Reina rf_reina at yahoo.com
Wed Mar 30 14:50:21 MST 2005


Thanks very much for the suggestions.  I've
implemented them, but the main problem seems to be
that the program send_clid.agi is not executing
despite the cli> saying that it is.  If you have other
ideas let me know.

Thanks again,

Richard
--- Jean-Michel Hiver <jhiver at ykoz.net> wrote:
> Richard Reina wrote:
> 
> >I installed the AGI perl library then put the
> >following script in a file called
> >/var/lib/asterisk/agi-bin/send_clid.agi,
> >updated my [incoming] context with exten =>
> >s,1,AGI(send_clid.agi) and did a restart now.
> >
> >use Asterisk::AGI;
> >my $agi = Asterisk::AGI->new();
> >my %input = $agi->ReadParse();
> >
> >my $clid = $input{callerid};
> >my $dnid = $input{dnid};
> >  
> >
> 1st rule with Perl scripts: use strict;
> 2nd rule: use warnings;
> 
> Then.
> 
> Are you sure about the capitalization?
> 
> I.e. if the variable is ${CALLERID} in asterisk,
> 
> You should use $agi->get_variable ('CALLERID') I
> think.
> 
> 
> >open(CS, ">>call_id_test");
> >  
> >
> You should use an absolute path, i.e.
> 
> /tmp/call_id_test
> 
> 
> >print CS "INCOMING CALL FROM " . $clid . "\n";
> >print CS $dnid . "\n";
> >close(CS) || die "can't close\n"; 
> >system("wall $clid");
> >  
> >
> On my system, wall takes input from STDIN. So
> 
> open FP, "|wall";
> print FP "CLID: $clid";
> close FP;
> 
> Might work better.
> 
> Regards,
> Jean-Michel.
> 
> -- 
> Ykoz Un Max - La VoIP en pré-payé!
> Essayez gratuitement - 5 crédits offerts.
> ---> http://ykoz.net/voip/max <---
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
>
http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>   
>
http://lists.digium.com/mailman/listinfo/asterisk-users
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 



More information about the asterisk-users mailing list