Thanks at lot @derdude41065. But my skills are not good enough to change this file in a container. I could change it in a backup, if it is a editable file, and load the backup. I just searched for sip2mqtt.py, but could not find it. I guess it is a compiled file in the backup. Could you send me your relevant file so I can exchange it in the backup?
Or could you @MartyTremblay make this a configurable element? acc_cfg.allow_contact_rewrite = False or True
This seems to finally solve my door bell problem. Great work!
Great work! Thanks a lot! It is working perfectly and really fast.
@MartyTremblay: I can now confirm that the change allow_contact_rewrite=True fixes the problem of sip2mqtt not recognizing calls in my configuration with a Fritz!Box. Maybe you can change that in your script for the future.
Maybe it helps others: I had to change the MQTT sensor in configuration.yaml a bit to get it to work:
sensor:
- platform: mqtt
name: Tuerklingel SIP2MQTT
unique_id: tuerklingel_sip2mqtt
state_topic: "home/sip"
icon: "mdi:bell"
#value_template: '{{ value_json.verb }}' # does not work
value_template: '{{ value_json["verb"] }}'
json_attributes_topic: "home/sip"
I’ve tried to install @raphii 's addon but I’m getting the following error:
Traceback (most recent call last):
File “sip2mqtt.py”, line 216, in
main(sys.argv[1:])
File “sip2mqtt.py”, line 164, in main
broker.connect(args.mqtt_domain, args.mqtt_port, args.mqtt_keepalive)
File “/usr/lib/python2.7/site-packages/paho/mqtt/client.py”, line 839, in connect
return self.reconnect()
File “/usr/lib/python2.7/site-packages/paho/mqtt/client.py”, line 962, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File “/usr/lib/python2.7/socket.py”, line 557, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
socket.gaierror: [Errno -2] Name does not resolve
I’m using the standard core_mosquitto broker with domain of core_mosquitto and default port of 1883.
Hi, I just installed this addon and with sipgate credentials it works fine.
My main line, however, is Deutsche Telekom with the SIP server sip.t-online.de
If I enter the Telekom credentials that are working with my SIP phones, and start up sip2mqtt the log file throws a 502 bad gateway error.
Did someone have success in connecting with a SIP line from Deutsche Telekom?