[Chicago-talk] transl. php to perl?

Richard Reina richard at rushlogistics.com
Tue Mar 29 08:47:54 PST 2005


Warren, 

I think I'm getting a little closer.  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 reload.

use Asterisk::AGI;
my $agi = Asterisk::AGI->new();
my %input = $agi->ReadParse();

my $clid = $input{callerid};
my $dnid = $input{dnid};

open(CS, ">call_id_test");
print CS "INCOMING CALL FROM " . $clid . "\n";
print CS $dnid . "\n";
close(CS) || die "can't close\n"; 
system("wall $clid");

The >cli seems to indicate it worked:
Launched agi script
/var/lib/asterisk/agi-bin/send_clid.agi
AGI script send_clid.agi completed, returning 0

however I see no output from wall and if I do a cat
call_id_test it's empty.  call_id_test has permission
set to 777.

Any idea what I'm doing wrong?

Thanks, again for all the help thus far.

Richard

--- Warren Smith <warren at warrenandrachel.com> wrote:

> In my [incoming] context (where all my zapata calls
> go), this is the
> first thing executed. I.E.
> 
> exten => s,1,AGI(send-clid.agi)
> exten => s,2,Background(greeting)
> ...
> 


More information about the Chicago-talk mailing list