3

Consider a situation in which that you installed a GSM modem (DLink DWM-156 in my case) to your computer. Then you wrote the following Python program to accept all the incoming calls:

import serial

phone = serial.Serial("COM10",  115200, timeout=5)

try:
    time.sleep(1)
    while(1):
        x = phone.readline()
        print(x)
        if (x == b'RING\r\n'):
            phone.write(b'ATA\r')
            time.sleep(2)

finally:
    phone.close()

Now, the question is :

  1. Is there any way to detect if the incoming call is a voice call or data call?
  2. Can a dial-up modem initiate a data call also, or it can make voice calls only?
Ebrahim Ghasemi
  • 5,850
  • 10
  • 52
  • 113

2 Answers2

1

You can have a look here regarding Voice modem commands.

What I believe is that if you receive AT+VTX then respond with CONNECT and the data from that point will be wave audio data.

It should also work the other way around to initiate a voice call.

Christopher Janzon
  • 1,039
  • 11
  • 22
  • Thank you. Is there any difference between **Voice modem** and **Dial up modem**, or they two are the same? – Ebrahim Ghasemi Jul 01 '15 at 09:12
  • "A voice modem is an analog telephone data modem with a built-in capability of transmitting and receiving voice recordings over the phone line." I think it depends on their capabilities to support voice and data. If you can handle raw data then I think it should be possible to send voice over a standard Dial up modem, if your client supports it. Here's a GSM modem from Amazon which states to be support voice. http://www.amazon.com/Generic-Wavecom-Q2303A-Commands-Adapter/dp/B00BD1NQAQ – Christopher Janzon Jul 01 '15 at 09:50
  • Thank you for your comment. I already read definition of Voice modem in that Wiki link. But I want to know if it is equal with dial up modem or not? – Ebrahim Ghasemi Jul 01 '15 at 09:53
  • Correct me if I'm wrong : "GSM modems are for Data call and Dial up modems are for Voice call. But both can support the other capability". Anyway how can I recognize the type of incoming call? (to see if it is voice or data call) – Ebrahim Ghasemi Jul 01 '15 at 09:55
  • I think so. I'm quite new to this subject so don't take everything I say as a fact. Well, whatever data you receive is data until the client sends you a command to start a voice transfer, which would be `AT+VTX`. – Christopher Janzon Jul 01 '15 at 10:10
1

The modem you have is a 3G (HSDPA) data modem - it is intended to set up a data connection to the operators PS network (packet switched network).

3G core networks have two major parts, circuit switched for voice and packet switched for data.

Things get muddied a bit as you can make a modem call over the CS voice network (data is converted into 'tones' over the voice channel, as a very high level explanation), and you can make a VoIP call over the PS data network.

For the former case, most times you would not want to do this as you will get far higher speed over the PS network. For the latter case, your operator may block (or try to block...) VoIP traffic, although many do not now as voice minutes are cheap on many plans now anyway, so this is not such a threat to them anymore.

Although the modem you have is probably not set up to send and receive voice calls, there are instructions for some 3G dongles to update them to allow this, for example this video explain how to do so for a Huawei dongle: https://www.youtube.com/watch?v=mRF2cCFehRQ. Your modem does appear to support an easy set up to redirect calls or apply a busy tone etc from a quick look at the manual, but this is not what you want I think.

Mick
  • 24,231
  • 1
  • 54
  • 120