[Asterisk-Dev] Using an additional modem to get CallerID

Andy Powell andy at beagles-den.demon.co.uk
Wed Feb 4 02:49:27 MST 2004


For those in the UK the following may be useful for callerid - the first one is pretty cheap iirc

http://www.automatedhome.co.uk/article1207.html with some additional detail at

http://www.photon.dyndns.org/projects/btcd50conversion/index.html
http://www.eatworms.org.uk/ha/callerid.php

or if you are feeling flush

http://www.crucible-technologies.co.uk/developers-base.asp or
http://www.pathwaydata.co.uk/CallerIDProducts.asp

(Compatible with Cable and BT networks )

at £80 it's a bit steep, but there is a difference between 'might work' and 'will work'

HTH

Andy

*********** REPLY SEPARATOR  ***********

On 01/02/2004 at 20:03 Conroy, Lawrence (SMTP) wrote:

>Hi there,
>   Yup - I do mean BT (i.e. the SINs to which your referred) Caller 
>Display Service.
>I believe that Cable & Clueless use a similar spec (in theory - I don't 
>know if
>they still provide analogue direct connected service).
>
><further into the pit>
>It is not compatible with Bellcore specs - the V.23 data burst is at a 
>different
>time relative to the Ring current pulses, there's a wetting reversal, 
>... (see
>the SINs for the gory details - they're all under 
>www.sinet.bt.com/index.html).
>
>The upshot is that, IF one is in the UK and connected to the BT network 
>with
>analogue PATS (like most folk), then a Bellcore standard Caller-ID 
>won't work.
>
>ISDN works fine - many thanks to junghanns - however, in the UK that is 
>mutually
>exclusive to DSL (and cable networks add more problems as usual and so 
>should be
>avoided to maintain sanity).
></further>
>
>IF one can find an old Pace Message Modem then it should be possible.
>A potential alternative is SOME US Robotics modems, but USR didn't seem 
>to know
>which ones work and which ones don't [I believe that their message 
>modem is the
>one that may work].
>
>Yes - there are AT commands to configure the modems to display CallerID 
>along
>with the RING message - I have a nasty suspicion that these are 
>modem-specific.
>
>The theory would be to get something listening to a serial port to 
>which is
>connected a modem that is can (and has been programmed to) report the 
>caller
>display data. Somehow, this would need to be made available to the 
>process
>running *, as the X100P does work fine to pick up the call and do its 
>stuff.
>There would also need to be some tweak to write in the caller ID that 
>zap has
>marked as unknown. Thus, it *is* possible with an external modem, IF 
>one has
>the right modem and has written a script/program to monitor this, AND 
>has a
>tweak to pull that info into *.
>
>--- As an alternative...
>
>I have NO info on the X100P, so it's hard to know how easy or impossible
>it would be to get this beast to read BT CDS. If anyone wants to try 
>this then
>I'll happily act as a tester - I'm not sure my code skills would help 
>much :).
>At present, in the UK, however, it's "as much use as chocolate soldier 
>in a fire",
>as far as CDS is concerned.
>
>all the best,
>   Lawrence
>
>
>On 1 Feb 2004, at 4:13 pm, Nicholas Hart wrote:
>
>> Lawrence - Presuming you are referring to BT services
>> (for non-UK readers: BT = British Telecom :))
>>  - I certainly get Caller-ID over my BT analogue line, and if you check
>> the BT technical documentation (http://www.sinet.bt.com/227v3p3.pdf) it
>> sounds very much as if it IS based on Bellcore standards (CLASS?).
>>
>> Though of course BT have managed to improve on the original, so perhaps
>> the technique described below may not work.....
>>
>> However, it might be helpful to have some more detail on the modem
>> configuration needed to make this all work - I presume this is some
>> 'Hayes' AT command set extension....
>>
>> nic
>>
>>> SOre point; I have one, but Caller-ID doesn't work in the UK (we don't
>>> DO bellcore over here), so it's no f*ing use.
>>> Not all of us live in the U.S of A - hard to believe, but true.
>>> atb,
>>>    Lawrence
>>>
>>> On 31 Jan 2004, at 5:41 pm, Brian West wrote:
>>>
>>>> Now thats an ugly hack.  Why not just get an X100P :P
>>>>
>>>> bkw
>>>>
>>>>
>>>> On Sat, 31 Jan 2004, Jonathan McHarg wrote:
>>>>
>>>>> There are two stages in the process of getting callerID information
>>>>> from a
>>>>> standard modem, to be used in Asterisk. The first stage is actually
>>>>> capturing the information from the modem, the second stage is
>>>>> importing the
>>>>> captured data into Asterisk.
>>>>>
>>>>> Capturing the caller ID details from the modem
>>>>>
>>>>> I will presume at this stage, that you have a modem that supports
>>>>> caller ID
>>>>> and it is installed and configured to work with your Linux box.
>>>>>
>>>>> Here is my first script that reads the details in...
>>>>>
>>>>> #!/usr/bin/perl
>>>>> $PortName = "/dev/ttyn00";
>>>>> $PortObj =  open(MODEM,$PortName) || die "Can't open $PortName: 
>>>>> $!\n";
>>>>> while (1==1) {
>>>>>   local $/ = "\n";
>>>>>   while ($line=<MODEM>) {
>>>>>     chomp;
>>>>>     if ($line =~ s/NMBR = //) {
>>>>>       open(OUTFILE, ">/usr/src/myperl/callerid.txt") or die "Can't
>>>>> open
>>>>> callerid.txt: $!";
>>>>>       print OUTFILE "$line";
>>>>>       close OUTFILE;
>>>>>     };
>>>>>   }
>>>>> }
>>>>>
>>>>> depending on your setup, you'll need to amend the $portName variable
>>>>> to
>>>>> point to the port that you've installed the modem on. You also may
>>>>> want to
>>>>> change the path that the callerid.txt file is written to.
>>>>>
>>>>> Once the script is written, used the chmod A+X callerid.pl to change
>>>>> the
>>>>> mode so that the program can be executed.
>>>>>
>>>>> Finally run the program with & parameter, to spawn the program as a
>>>>> new
>>>>> process.
>>>>>
>>>>>
>>>>> Using the callerid.txt file in Asterisk
>>>>>
>>>>> Once the callerid.pl file has captured the callerid data, the number
>>>>> needs
>>>>> to be loaded into asterisk. This is done using AGI functions within
>>>>> asterisk.
>>>>>
>>>>> Firstly create a perl script as follows.
>>>>>
>>>>> #!/usr/bin/perl
>>>>> open(INFILE, "/usr/src/myperl/callerid.txt") or die "cannot open
>>>>> file";
>>>>> if ($callerID=<INFILE>) {
>>>>>   print "SET CALLERID $callerID"};
>>>>> close INFILE;
>>>>>
>>>>> once created, this script should be placed in the AGI directory.
>>>>>
>>>>> Finally add a line to your extensions.conf file to call this script,
>>>>> an
>>>>> example line would be.
>>>>>
>>>>> Exten=>_.,1,agi,getcallerid.pl
>>>>>
>>>>> Hopefully, this should now leave you with CID working !!
>>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>> --
>>> Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury,
>>> Bracknell,
>>> Berkshire. RG12 8FZ
>>>
>>> The information contained in this e-mail and any attachments is
>>> confidential to
>>> Roke Manor Research Ltd and must not be passed to any third party 
>>> without
>>> permission. This communication is for information only and shall not
>>> create or
>>> change any contractual relationship.
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>> ------------------------------
>> Nicholas Hart
>> GTTelegraph
>> www.gttelegraph.net
>> ------------------------------
>> _______________________________________________
>> 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
>>
>
>-- 
>Registered Office: Roke Manor Research Ltd, Siemens House, Oldbury,
>Bracknell,
>Berkshire. RG12 8FZ
>
>The information contained in this e-mail and any attachments is
>confidential to
>Roke Manor Research Ltd and must not be passed to any third party without
>permission. This communication is for information only and shall not
>create or
>change any contractual relationship.
>
>_______________________________________________
>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