home-assistant-libs / voip-utils

Apache License 2.0
1 stars 5 forks source link

Include URI for device identification #18

Closed jaminh closed 2 months ago

jaminh commented 2 months ago

When receiving a call parse the SIP URI from the Contact or From header to use for identifying a device. Using the URI will make it possible to distinguish between multiple endpoints calling through a centralized server (such as Asterisk) which would otherwise appear to come from the same IP address. Keeping track of the Contact header URI will also make it possible to send outbound calls to the device using the correct URI.

jaminh commented 2 months ago

I'll admit python is a second language for me, so thank you for the feedback. With this change merged we might want to reopen https://github.com/home-assistant/core/pull/111050/files for the associated changes in HA, although it needs to be updated for the change to using the entire URI rather than parsing the individual parts like I was doing originally.