title: How to recognize type of incoming call? (Data call or Voice call)
body: <p>Consider a situation in which that you installed a GSM modem (<a href="http://www.dlink.com/uk/en/support/product/dwm-156-3-75-hsupa-usb-adapter" rel="nofollow">DLink DWM-156</a> in my case) to your computer. Then you wrote the following Python program to accept all the incoming calls:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>Now, the question is : </p>
  
  <ol>
  <li>Is there any way to detect if the incoming call is a voice call or data call?</li>
  <li>Can a dial-up modem initiate a data call also, or it can make voice calls only?</li>
  </ol>