[Asterisk-Dev] Parsing caller ID info from serial port CallerIDdevice to Asterisk?

Robert Murray robertm at marco-na.com
Tue Aug 2 11:49:37 MST 2005


This might or might not help you. I made a wrote perl script that would take
input
from the serial port and then connect to the manager API and start the call
using that interface.

i.e..
Serial port input <CALL100>
Manager output <
Action: Originate
Channel: SIP/100
Context: default
Exten: 8135551212
Priority: 1
Callerid: 3125551212
Timeout: 30000
Variable: var1=23|var2=24|var3=25
ActionID: ABC45678901234567890
>

I think then if you replace Channel with your zap channel and then place
your
calling extension in Exten: that might work for you.

You can test this by starting a telnet to the manager port and hand typing
the command in
or cut and paste the commands into the telnet session.

Check the wiki for information on the manager api

Robert

-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com
[mailto:asterisk-dev-bounces at lists.digium.com]On Behalf Of Carl
Andersson
Sent: Tuesday, August 02, 2005 2:20 PM
To: asterisk-dev at lists.digium.com
Subject: [Asterisk-Dev] Parsing caller ID info from serial port
CallerIDdevice to Asterisk?


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
_______________________________________________
Asterisk-Dev mailing list
Asterisk-Dev at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list