faucamp / python-gsmmodem

Python module to control a GSM modem attached to the system: send/receive SMS messages, handle calls, etc
GNU Lesser General Public License v3.0
385 stars 303 forks source link

Call.number returning None #83

Open simaogomes opened 7 years ago

simaogomes commented 7 years ago

Using the built-in example for receiving calls, when the call is received using the script incoming_call_demo.py, the number is shown as None...

AUitto commented 2 years ago

Although it seems like this project is somewhat abandoned, I'm facing the same issue. I'm guessing that the problem is the assumption the line always starts with RING and after that is the CLIP with the number. However, I've had several times two RINGs (which leads to none, as the second one is not the CLIP) and also several times without the RING at all, just the CLIP message.

I think the better way to handle these messages would be, instead of popping the values out of the original list, to iterate them and per message recognize the message type on line.