CallerID detection: does not work with some phones

I use the following method to detect Caller ID when someone calls.

In the form upload, I install the following code:

this.serialPort1.PortName = "COM3"; this.serialPort1.BaudRate = 9600; this.serialPort1.DataBits = 8; this.serialPort1.RtsEnable = true; this.serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived); this.serialPort1.Open(); this.serialPort1.WriteLine("AT#cid=1" + System.Environment.NewLine); void serialPort1_DataReceived(object sender, SerialDataReceivedEventArgs e) { richTextBox1.Text += this.serialPort1.ReadLine(); //richTextBox1.Text += this.serialPort1.ReadExisting(); //richTextBox1.Text += this.serialPort1.ReadByte().ToString(); } 

Team

 this.serialPort1.WriteLine("AT#cid=1" + System.Environment.NewLine); 

gave me a way out

 OK 

This ensures that Caller Id is supported by the modem and is operational.

I tried with some private telephone lines in our country (India), it gives the expected result, as shown below.

 RING //On 1st Ring DATE = xxxxx //On 2nd Ring TIME = xxxx NMBR = xxxxxxxxx RING //On 3rd Ring RING //On 4th Ring 

But when I try to use government telephones (BSNL Company in India), it cannot provide part of DATE, TIME and NMBR. He gives the following result.

 RING //On 1st Ring RING //On 3rd Ring RING //On 4th Ring 

Please note that nothing is displayed during the second ring.

Important Note:

  • Government phones support the caller ID because when a telephone line is connected to a telephone tool, a number appears.
  • The above code successfully works with many other landline telephones by private companies.

- Any idea why I am not getting the BSNL phone numbers, even though they are displayed on the Caller ID screen of the phone?

Edit: I send the following initialization commands to the modem in order to set it for DTMF receive mode.

 AT#CID=1 //Enable Caller ID (Verbose) AT#VLS=0 //Voice Source--Telephone Line (Go on hook) AT#VTD=3F,3F,3F //Enable DTMF Transmit, Receive and Voice Online AT#CLS=8 //Sets Modem to Voice Mode 

Thanks in advance.

+7
source share
1 answer

If you use a shared modem, unfortunately, there is no guarantee that it will work in all situations in all countries; for example, the US uses FSK signaling to transmit CID over the wire, while India seems to use DTMF signaling.

It is possible that BSNL uses a type of signaling that the modem does not support (If it was so that the CID was simply not transmitted, you still expect to see an empty NMBR= )

I would test a modem that, as you know, supports DTMF signaling.

Also, if government phones are in the office behind the PBX, then it could be a mess with sending the CID.

+2
source

All Articles