473,394 Members | 1,221 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

getting caller id info

Hi, I am developing an application where I need to read the caller id
from an incoming call. The only info (for now) I need is the caller id
info, so that I can display the propper caller info on screen if so
desired.
I was thinking on using asterisk (asterisk.org) for this with
appropriate 2FXO/2FXS card but I do not know if this is just overkill
(asterisk for this). Do you know of any other solution/way of getting
the caller id and passing it to PHP?.

tks.

Jul 17 '05 #1
7 6031
>Hi, I am developing an application where I need to read the caller id
from an incoming call. The only info (for now) I need is the caller id
info, so that I can display the propper caller info on screen if so
desired.
You need to give more information. What is the incoming call
supposed to be connected to? A modem? Voice? A voice-response
system? A quick click and hang-up?

You can, for instance, get caller-id from a modem connected to
a phone line through the serial port, then answer the call
and hang up. Somehow I don't think the last part is what you
intended.
I was thinking on using asterisk (asterisk.org) for this with
appropriate 2FXO/2FXS card but I do not know if this is just overkill
(asterisk for this). Do you know of any other solution/way of getting
the caller id and passing it to PHP?.


A 2FXO/2FXS card is likely much more expensive than 2 dirt-cheap
modems with caller-ID capability. And the modems don't HAVE to
answer the call to get the caller ID. On the other hand, if you
really wanted to use the caller ID to route the call, asterisk is
quite capable of doing this in a way you're unlikely to get with a
cheap modem. asterisk might even leave the info around for your
app to get hold of it (e.g. the guy currently called into Extension
203 has caller ID XXX XXX-XXXX).

Gordon L. Burditt
Jul 17 '05 #2

Gordon Burditt wrote:
Hi, I am developing an application where I need to read the caller idfrom an incoming call. The only info (for now) I need is the caller idinfo, so that I can display the propper caller info on screen if so
desired.
You need to give more information. What is the incoming call
supposed to be connected to? A modem? Voice? A voice-response
system? A quick click and hang-up?

Is a small restaurant order system with 2/3 incoming lines. Currently
everything is handled manually. The idea is to have a php app in the
intranet where orders will recorded. The operator would still use
normal telephone lines, but they would like as a plus to grab the
caller id info and pull customer info (using the caller id info from a
previous order.. if any) from the system. For this I would need
X-HARDWARE (this is what I want to figure out). Then X-HARDWARE would
pass the caller id-info to the php server (I need to fiture this out
too depending on what X-HARDWARE is). X-HARDWARE doesn't even have to
answer or do anything with the call just grab the caller id info and
pass it appropiately.
A 2FXO/2FXS card is likely much more expensive than 2 dirt-cheap
modems with caller-ID capability. And the modems don't HAVE to
answer the call to get the caller ID. On the other hand, if you
really wanted to use the caller ID to route the call, asterisk is
quite capable of doing this in a way you're unlikely to get with a
cheap modem. asterisk might even leave the info around for your
app to get hold of it (e.g. the guy currently called into Extension
203 has caller ID XXX XXX-XXXX).

Gordon L. Burditt


I know as a fact that asterisk can do this and more, but i was
wondering if there was an easier solution and cheaper hardware to
accomplish it.

tks again.

Jul 17 '05 #3
>> You need to give more information. What is the incoming call
supposed to be connected to? A modem? Voice? A voice-response
system? A quick click and hang-up?

Is a small restaurant order system with 2/3 incoming lines. Currently
everything is handled manually. The idea is to have a php app in the
intranet where orders will recorded. The operator would still use
normal telephone lines, but they would like as a plus to grab the
caller id info and pull customer info (using the caller id info from a
previous order.. if any) from the system. For this I would need
X-HARDWARE (this is what I want to figure out). Then X-HARDWARE would
pass the caller id-info to the php server (I need to fiture this out
too depending on what X-HARDWARE is). X-HARDWARE doesn't even have to
answer or do anything with the call just grab the caller id info and
pass it appropiately.
A 2FXO/2FXS card is likely much more expensive than 2 dirt-cheap
modems with caller-ID capability. And the modems don't HAVE to
answer the call to get the caller ID. On the other hand, if you
really wanted to use the caller ID to route the call, asterisk is
quite capable of doing this in a way you're unlikely to get with a
cheap modem. asterisk might even leave the info around for your
app to get hold of it (e.g. the guy currently called into Extension
203 has caller ID XXX XXX-XXXX).

Gordon L. Burditt


I know as a fact that asterisk can do this and more, but i was
wondering if there was an easier solution and cheaper hardware to
accomplish it.


A cheap standalone modem connected to each phone line and serial
ports can act as a caller-ID device. Have some task monitor the
serial line from each modem and record the caller ID somewhere (PHP
is not a good candidate for this since you want to monitor all the
time, and PHP has things like run time limits, although it's possible
to do this with standalone PHP). You want the caller ID captured
BEFORE the operator opens up the order web page. Sticking the
caller ID and a timestamp in a prearranged file location is one
approach.

PHP looks at that file (when someone opens the web page) and picks
up the caller ID, then does its thing with it.

You don't care about the speed of the modem at all, as the intent
is never to answer the phone. It does need to do caller-ID, but
not necessarily 56K. You might be able to pick up modems like
this on Ebay for $10 each plus shipping.

Gordon L. Burditt
Jul 17 '05 #4
tks for your quick reply!!
I am quite new to telephony stuff.... will the modem automatically
write the caller id info to the serial port??
If that's the case, then I just have to have a program to stand there
and look at the port.....

tks again,
ivan

Jul 17 '05 #5
>I am quite new to telephony stuff.... will the modem automatically
write the caller id info to the serial port??
It typically comes as part of the RING (spontaneous) response
generated when the phone rings. You may get the same caller-ID
data multiple times (one on each ring) if the phone isn't answered
immediately.
If that's the case, then I just have to have a program to stand there
and look at the port.....


It's almost that simple.

You may need to have the program set up the modem first, to tell
it you WANT "RING" responses, and ones with caller-ID in them, to
set up the serial port speed on the PC side, turn off auto-answer,
and such. This is a couple of AT commands once you set the speed.
(Sorry, I can't give you specific commands, and they are modem-dependent,
although there are probably only a few variations at most.) Then
just listen for info coming back.

You probably want your program to check that the modem is taking
the commands (you get an OK back) before assuming that it is working.

Gordon L. Burditt
Jul 17 '05 #6
Might just look into a modem with caller-id and the free software
called YAC
http://sunflowerhead.com/software/yac/
it's open source.. at the very least, it keeps a log file of incoming
calls that you could read.

Jul 17 '05 #7

BKDotCom wrote:
Might just look into a modem with caller-id and the free software
called YAC
http://sunflowerhead.com/software/yac/
it's open source.. at the very least, it keeps a log file of incoming
calls that you could read.


this looks very promising....I am going to try it.... TKS!!!

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: robb | last post by:
Hi I have a modem on my computer, and would like to log callerid from it, I'm a complete novice at programming perl, but with reading the docs I've managed to get to a stage using win32::serial...
3
by: Bryan | last post by:
I've been messing around with a C++ application on Xbox, and have been encountering problems with my objects getting garbage collected when they go out of scope, but before I'm actually done using...
0
by: The Bear | last post by:
Is there any documentation on getting information from a modem such as the caller id? T.B.
5
by: The Bear | last post by:
Does anyone know how to get the Caller ID from a phone and make use of it in a computer? T.B.
17
by: Mitko Haralanov | last post by:
I need to be able to get the name of the currently executed method within that method. I know that the method object does have the __name__ attribute but I know know how to access it from withing...
3
by: Andrew Gentile | last post by:
Hello, I am trying to write a function which takes several floats as inputs, then returns 1x6 array of floats. I normally program in Matlab, and I am often confused by C. It seems that this...
3
by: tshad | last post by:
I have a page that I am getting a username and password as a random number (2 letters, one number and 4 more letters) I have 2 functions I call: *************************************************...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
3
by: Francesco Guerrieri | last post by:
Hi, Today I've been thinking a bit about the "python internals". Inspired by this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66062 I found out a little problem which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.