Open mattkasa opened 1 year ago
I just tried binding to INADDR_ANY
and it works and gets farther, the next issue seems to be binding to a random port for RTP. We would need to bind to a known range of ports in order to expose those to the network, similarly to how frigate/go2rtc/rtsptoweb support configuring ranges of ports.
I've added the bind to INADDR_ANY
and verified it works on my end.
I'm not sure how to get the bind to work in a port range, though.
Hi, I'm having this same issue (posted on Discord and was pointed here).
I (kinda) understand the docker networking, but I'm confused as to why the container can't bind to 192.168.1.10 - in my case, I can ping the calling IP, and even TCP connect to it - so this just routes though docker out to the LAN (outbound ports don't need to be mapped like inbound).
I'm going to try to change the .py file as per above and see if that works.
So, I get a call connecting now, but no voice data coming though so I guess that's the port not getting though. I'm on 'host' networking mode so I thought it may work. I'm also seeing HA update the "Call in progress" flag but it never clears.
I think this is happening because the address (
call_info.server_ip
) is taken from the INVITE, which looks like this:Without host networking, the homeassistant container has an IP like 172.26.0.20 and cannot bind to 192.168.1.10.
To fix this, maybe we could bind to
INADDR_ANY
instead of trusting the IP from the INVITE which will not be correct in a lot of networking scenarios?Something like:
https://github.com/home-assistant-libs/voip-utils/blob/e9e58f3576de52376877f705e76e6d2529d339ec/voip_utils/voip.py#L53