2

I need to develop small utility to convert one format of Caller ID to other one. I have got US Robotics 56K USB Modem that supports Caller ID also my service provider (BT) enabled Caller ID feature for my line (number shows on handset).

I have modem, mentioned above, connected to the same line, but I don't know what format it gives the number or how can I get phone number only in C# Application.

On the US Robotics Website there is no developers guide to how the modem works.

I need some guidance.

jww
  • 97,681
  • 90
  • 411
  • 885
zbora23
  • 141
  • 1
  • 2
  • 11
  • Wow, they still make those? :) – Steve Mar 05 '14 at 00:13
  • 1
    I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Mar 05 '14 at 00:16
  • Possible duplicate of [How to get Caller ID in C#?](https://stackoverflow.com/a/1201067/608639) – jww Mar 03 '19 at 09:45

4 Answers4

4

According to their manual, you can use AT Commands to turn on caller ID (It's disabled by default) and retreive the caller:

+VCID - Caller ID (CID)

This command controls the reporting and presentation of data associated with the Caller ID services in the Incoming Call Line ID (ICLID) data format for the next call.

+VCID=<pmode>

0 Disable Caller ID reporting. (Default.)

1 Enables Caller ID with formatted presentation to the DTE. The modem presents the data items in a pair format. The expected pairs are date, time, name, and caller code (telephone number),

2 Enables Caller ID with unformatted presentation to the DTE.

Retreiving:

+VRID - Report Retrieved Caller ID (CID)

This command reports the data associated with the Caller ID services in the Incoming Call Line ID (ICLID) data format for the last received call.

+VRID=<pmode>

0 Reports Caller ID with formatted presentation to the DTE. The modem presents the data items in a pair format. The expected pairs are date, time, name, and caller code (telephone number),

1 Reports Caller ID with unformatted presentation to the DTE.

I'm not exactly sure how to communicate with a Modem over USB, back in my day it was all Serial Port (and there are COM-Port Libraries for C#), no idea if a USB Modem implements a virtual COM Port for compatibility with Terminal software. Before starting to do this from C#, it might be an option to use a Terminal Emulator (Windows used to come with HyperTerminal, but that was a long time ago) and just try talking to the Modem directly to figure out if and how the communication works.

I hope that helps a bit.

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
  • 1
    Regarding "how to comminucate with a USB modem" I have the exact same modem as the OP attached to my Windows 10 computer, and after all the drivers are installed it shows as a serial device: `COM3` and can be access using standard serial communications techniques. – dgnuff Jul 04 '18 at 18:52
1

My usb modem shows up as /dev/ttyACM0 device. I have been able to use it as a serial device in both Linux and windows.

in Linux, you can use the dmesg command and determine what device it is attached to. for example for device one it shows up as /dev/ttyACM0 for the second device it would show up as /dev/ttyACM1 ...

In minicom, you can set it up for caller ID by typing "at +VCID=1" and it should respond with "OK".

in windows, you can use putty and set it up for the serial port at 115200,n,8,1. I have used VC# to communicate with it as well.

0

Did you tried with this

[CallerID]
HKR,,CallerIDOutSide,,O
HKR,,CallerIDPrivate,,P
HKR,,VariableTerminator,,<cr><lf>
HKR,EnableCallerID,1,,”AT#CID=1<cr>”
HKR, Responses, “<cr>”, 1, 01, 00, 00,00,00,00, 00,00,00,00
;00
HKR, Responses, “<lf>”, 1, 01, 00, 00,00,00,00, 00,00,00,00
;00
HKR,Responses,”<cr><lf>DATE = “,1,93,00,00,00,00,00,00,00,00,00
HKR,Responses,”MESG = “,1,97,00,00,00,00,00,00,00,00,00
HKR,Responses,”NAME = “,1,96,00,00,00,00,00,00,00,00,00
HKR,Responses,”NMBR = “,1,95,00,00,00,00,00,00,00,00,00
HKR,Responses,”TIME = “,1,94,00,00,00,00,00,00,00,00,00

for Number you've to use NMBR, for name NAME and so on.

0

On the US Robotics Website there is no developers guide to how the modem works.

You want the USR 56K USB Modem User Guide. It is the installation guide and full list of AT command. It is not linked on the USR5637 page. Apparently it is an OEM manual. I stumbled across it when searching on Google for "USR5637 DLE message".

For the USR5637 be sure you have firmware version v1.2.23. The version fixes Caller ID bugs (see the release notes). You can verify the firmware version with ATI3:

Debug: modem_write
Debug: Write 5: "ATI3\r"
Debug: modem_read
Debug: Read 37: "U.S. Robotics 56K FAX USB V1.2.23    
OK"

For the USR5637 you have to issue either one AT command or three AT commands, depending on the mode. You need one command if your are in Command mode. You need three commands if you are in Voice mode.

The one AT command for Command mode:

# set caller
AT+VCID=1

The three AT commands for Voice mode:

# set service class to voice
AT+FCLASS=8

# disable call waiting
AT+PCW=0

# set caller
AT+VCID=1

The USR5367 has a very sharp edge. You can get the ring count from the modem by reading the S1 register. Reading S1 for the ring count is supported by Accura, Conexant, MultiTech and USR modems. Getting the ring count from the modem simplifies your state machine because you don't need to track the variable or inactivity timeouts. However, reading S1 on USR modems is destructive, and it destroys the Caller ID unsolicited message.

So this is what happens if you read S1 for ring count on USR modems:

modem>   RING
program> count = read S1
modem>   # NAME, NMBR, DATE, TIME are not sent
modem>   RING
program> count = read S1

Another USR sharp edge is, setting +PCW=0 is documented in the manual, but it is not clearly stated it must be set for Caller ID. It took me several weeks to try it.

I talked with USR Support over a two week period trying to get Caller ID working on the modem. They never told me about +FCLASS=8 or +PCW=0. Their canned response was, try +VCID=1 on Windows in the terminal program. They never acknowledged I was working on Linux and OS X; and they never told me reading S1 was destructive. And they never realized Microsoft stopped shipping that terminal program with Windows 7.


When Caller ID is functioning for the USR5367, and the modem is is Voice mode, the modem communicates Caller ID related messages with "Data Link Escape" (DLE) messages. DLE messages are signaled with character 0x10.

RING is communicated with <DLE>+R and Caller ID info with <DLE>+X. So ring is signaled with two bytes 0x10 0x52 (followed by <CR><LF>). Caller ID info is signaled with the two bytes 0x10 0x58 0x10 (followed by <CR><LF>). The Caller ID data follows <DLE>+X using name/value pairs, like NAME=PASADENA MD<CR><LF> and NMBR=4104394421<CR><LF>. A full CallerID message would look like (taken from a telemarketer call):

<DLE>+X<CR><LF>
NAME=PASADENA     MD<CR>
NMBR=4104394421<CR>
DATE=1106<CR>
TIME=1425<CR><LF>

(And <CR><LF> is called the "trailer" in the manual and used as end-of-line as indicated by the S3and S4 register parameters).


I also extracted the USR5637 driver for Windows (USR5637Voice64bit.exe) and tried the initialization string from usr5637_rv.inf:

AT
AT&F1E0Q0V1&C1&D2S0=0

The official driver's initialization string did not enable Caller ID on the modem.

jww
  • 97,681
  • 90
  • 411
  • 885