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@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

Reply via email to