Accessing Caller ID

Justin Gedge jgedge at amis.com
Wed Feb 9 11:26:59 MST 2005


here is some ``outdated'' source code--

http://www.jwz.org/cid/

I stumbled across this months ago when I was looking into using a modem 
to determine if the phone was on/off the hook.  I was originally looking 
at how to interfac esome obscure piece of hardware from Radio Shack to 
the computer... but eventually realized that modem's are cheap and 
already do all this and more and already have a nice interface w/ the 
computer.  What I figured out was the mgetty/vgetty packages allow you 
to talk to a modem blah blah blah -- but they suck.  What I would 
recommend-- is searching and downloading a decent manual for your modem 
[or a similar modem].  There is a whole slew of AT commands that are 
fairly standard for modems.  The right AT sequence will have your modem 
report back the caller ID [if the modem has caller ID support], tell you 
when the phone is ringing, allow you to pick up etc....

If you're having trouble finding a decent modem manual... google 
"supraexpress-manual.pdf".  This is the manual for my modem.  If you 
still have trouble finding a decent manual [or this one]  email me 
offline and I'll get you a copy of this one.  It has a nice listing of 
the AT commands.

As far as communicating w/ the modem-- I've never made it this far... 
but if I had to try today-- i'd probably use the Expect module, or 
IO:Stty  [see p534 Perl Cookbook]. 

Near as I can tell-- if you have a modem on a serial interface-- you 
should be able to hook a terminal up to the serial interface right...?  
Think back to the old VT terminal-- [The piece of hardware that XTerm 
and windows HyperTerm are emulating].  It makes sense that you should be 
able to get into the modem from a terminal and issue AT commands [in the 
modem's own ``baby shell''].  Once you figure this out... it's just a 
matter of automating it with the Expect, or IO:stty modules.

For me the biggest barrier [and it's probably pretty simple if I spent a 
little time] is how to get an XTerm to connect to the modem/serial 
port.  I think if you can do this-- you can start issue all your AT 
commands and start experimenting and having some fun.

By the way-- does anyone on PLUG have any experience w/ tying the XTerm 
strait to a serial port... to do the same type of things one would use 
Windows Hyperterminal for?  This would be kind of usefull because on a 
lot of the Sun Server's we'll keep an old VT-220 terminal around just to 
hook up to the Sun servers [rather than buying the graphics cards 
etc]... but if we could just run a cable from the serial port on a linux 
box [or laptop] to the sun box-- we'd eliminate the VT-220 [or in our 
case-- have a nice solution to replace the Terminal that just went out 
on us a few weeks ago... after 20+ years of service in the company]


ps-- if you spend enough time on the jwz.org site-- you'll eventually 
end up at [www.dnalounge.com] which is also kind of interesting.

jmg




Hans Fugal wrote:

>If the modem groks caller ID and vgetty groks the modem, you could do
>this with vgetty. You could also do it with asterisk and
>asterisk-supported hardware. Getting a single-port FXO card for asterisk
>is cheap (see the recent thread about cheap asterisk hardware) and will
>be sufficient to do what you want. If you already have the modem, then
>take a look at vgetty.
>
>On Tue,  8 Feb 2005 at 17:13 -0700, Alan Young wrote:
>  
>
>>On Tue, 08 Feb 2005 16:49:57 -0700, Gabriel Gunderson <gabe at gundy.org> wrote:
>>    
>>
>>>Looks like they both work.
>>>      
>>>
>>Hmmm.  I misunderstood then.  I thought one had been turned off.  Oh well.
>>
>>    
>>
>>>This is kinda generic.  They do have caller id boxes that get access to
>>>caller id just fine.  Are you talking about in a server like asterisk or
>>>something?  What is it you are trying to do?
>>>      
>>>
>>I have a client who wants to have his main computer to popup a window
>>that displays as much info as possible on an incoming call, polling a
>>db if possible.
>>
>>I can do everything except for accessing the caller id information.  I
>>don't know how to do that.  I've heard that you could just do it off
>>of a modem that understands caller id, but I don't know how.
>>-- 
>>Alan
>>.===================================.
>>| This has been a P.L.U.G. mailing. |
>>|      Don't Fear the Penguin.      |
>>|  IRC: #utah at irc.freenode.net   |
>>`==================================='
>>
>>    
>>
>
>  
>
>------------------------------------------------------------------------
>
>.===================================.
>| This has been a P.L.U.G. mailing. |
>|      Don't Fear the Penguin.      |
>|  IRC: #utah at irc.freenode.net   |
>`==================================='
>




More information about the PLUG mailing list