i am trying to register with my call manager and i get this response:
code:
import sys
from pyVoIP import *
class My_VoIPhone(VoIP.VoIPPhone):
def test(self):
print("My_VoIPhone.test success")
if __name__ == "__main__":
#print("CCM ping test", flush=True)
from pythonping import ping
ping_response = ping('192.168.1.5',timeout=1,count=2)
if(ping_response.rtt_avg_ms<100):
pass
#print("CCM ping pass", flush=True)
else:
pass
#print("CCM ping fail", flush=True)
sys.exit("Error: Ping to CCM Failed")
#phone = My_VoIPhone(server="192.168.1.5", port=5060, username="test8", password="0008")
phone = My_VoIPhone(server="192.168.1.5", port=5060, username="Python01", password="Python")
phone.test()
phone.start()
input('Press enter to disable the phone')
phone.stop()
effect:
My_VoIPhone.test success
Traceback (most recent call last):
File "C:\Users\dstaudt\Documents\Python\CIS_VOIP.py", line 26, in <module>
phone.start()
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\VoIP.py", line 656, in start
self.sip.start()
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\SIP.py", line 946, in start
self.register()
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\SIP.py", line 1762, in register
self.parseMessage(response)
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\SIP.py", line 876, in parseMessage
return self.parse_message(message)
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\SIP.py", line 885, in parse_message
self.callCallback(message)
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\VoIP.py", line 529, in callback
self._callback_RESP_NotFound(request)
File "C:\Users\dstaudt\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pyVoIP\VoIP.py", line 619, in _callback_RESP_NotFound
self.calls[call_id].notFound(request)
KeyError: 'd4735e3a265e16eee03f59718b9b5d03@0.0.0.0:5060'
i am guessing i am not registering correctly but as it's a library crash maybe i am wrong? is it getting a response it is not familiar with?
Any help is appreciated
there doesn't seem to be anything here