aspose file tools*
The moose likes I/O and Streams and the fly likes Read calling number from modem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Read calling number from modem" Watch "Read calling number from modem" New topic
Author

Read calling number from modem

Sanjoo Singh
Ranch Hand

Joined: May 08, 2010
Posts: 33
Hi, I am creating an application with having a callerID module. This module is to read calling phone number from modem. I have googled and reference many SerialPort related stuff but could not find a concrete solution. I am able to detect phone ring using serialEvent with javax.comm jar
I am wondering if AT commands can be used to read/get calling phone number. I also referred following AT commands:
AT+CLIP
AT+VCID
AT+CNUM

But I could not be able to get a concluding solution. Here are my main questions:
1. Is it possible to read calling phone number using AT commands or any other alternative
2. Which AT command can be used and how to send from java application..

Looking forward for quick help/guide.


Solution Spider
Ron McLeod
Ranch Hand

Joined: Feb 12, 2013
Posts: 329
    
    6

The AT commands for extended operations vary between modem makes and models. Also, not all modems support CLID. Exactly which modem are you using?
Sanjoo Singh
Ranch Hand

Joined: May 08, 2010
Posts: 33
m using USB modem.
Sanjoo Singh
Ranch Hand

Joined: May 08, 2010
Posts: 33
Ron, is it possible to create a generic method or any command/method available, which can provide the caller's number?
Ron McLeod
Ranch Hand

Joined: Feb 12, 2013
Posts: 329
    
    6

using USB modem

Exactly which vendor and model of USB modem?

is it possible to create a generic method or any command/method available, which can provide the caller's number?

No, there is no standard for controlling the modem's calling line feature.

The first step is to verify that your telephony provider offers calling line service, and that your subscription includes the service (or in the case of an office PBX, that the PBX has the feature and that it is enabled for your line). Note that there are many (non-compatible) protocols used to deliver calling line information - you will need to ensure the your modem supports the protocol used by service/equipment you are connecting to.

Next, determine if the modem you want to use supports the calling line feature. The best way is to start with the make and model number, and search for the user manual or technical reference. If you find a document for the device, check to see if the feature is supported and which AT command(s) used to control it. Also check the protocols it supports, and verify that it is compatible with the telephony service/equipment. If you cannot locate an information, you could try a variety of AT commands used by different modem and hope you get lucky. Try each one and see if any respond with OK.

The more command strings are:
        AT+VCID=1
        AT+CLIP=1
        AT#CID=1
        AT%CCID=1
        AT#CC1
        AT*ID1


Sanjoo Singh
Ranch Hand

Joined: May 08, 2010
Posts: 33
Thank you for this explanation. I will try these commands & follow your guidelines and will update here.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Read calling number from modem