[Asterisk-Dev] Parsing caller ID info from serial port CallerID
device to Asterisk?
Carl Andersson
zaphodb at beeblebroxindustries.com
Tue Aug 2 11:19:40 MST 2005
Anyone have any idea about where to inject caller id data to asterisk to
make DID work, when callerid is recieved with a callerid box connected
to a serial port?
When I call this script from [ext-did-custom] I get correct caller ID in
the CDR:s, but the calls are not connected according to the DID:s I have
configured.
Reason for using this solution? X100P cards doesn't like the Swedish
DTMF caller ID, the tones are of too high amplitude and gets distorted,
so I had to build an external caller id reciever...
So, what have I missed? I am not so good with Perl scripting :)
The whole project including hardware schematics is available at:
http://www.area51.org.il/~zaphodb/asterisk/astcid/
#!/usr/bin/perl
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
my $channel = $input{'channel'};
if($channel eq "Zap/1-1") {
open(INFILE, "/usr/share/cid/callerid.txt") or die "cannot open file";
if ($callerID=<INFILE>) {
print "SET CALLERID $callerID<$callerID>";
}
close INFILE;
}
--
Greetings, Carl Andersson a.k.a Zaphod Beeblebrox
More information about the asterisk-dev
mailing list