tomek-o / tSIP

SIP softphone
149 stars 32 forks source link

Multiple IP addresses cause client to not connect #35

Closed Northernn closed 1 year ago

Northernn commented 1 year ago

The scenario is a computer has a static IP 10.0.0.1 for eg. and needed it also on other networks so in the advanced added a couple more networks 192.168.1.1 and 10.0.10.1 for example.

This causes tSip to not be able to register (seems to get confused by the networks and default to the wrong IP, so then cannot get to the default gateway) using the default configuration, it also seems to do the same thing if you VPN into a different network, for example an office network, or something like that, (works fine if you open tsip first and register it) but as soon as there are multiple IPs before it is opened it has issues trying to register.

The only way to fix this seems to be go back to one IP/DHCP or to specifically bind tSIP, but the computer may not have a static ip in all cases (DHCP) so binding it to an IP might be tricky, the NIC option in cinfiguration picked up one of the other IPs (not the main one), it seemed to use the last one in the additional IP list eg. 10.0.10.1, but needed to be 10.0.0.1, so the only other way was binding it to the GUID (which might be a bit technical for some people), and not ideal

Removing the extra networks and reverting the PC back to DHCP or single static IP / Network resolves the issue.

Other tested clients do NOT have this issue, they connect and register fine irrespective of the network configuration.

Maybe defaulting to using the network with the default gateway would resolve it?

tomek-o commented 1 year ago

I should probably take a look at https://github.com/baresip/baresip/pull/1513, but it would require longer time. At the moment to make interface selection slightly easier I've added human-readable network interface name to the list: network_interfaces If you would like to update - executable is at https://tomeko.net/tmp/tSIP.exe.

Northernn commented 1 year ago

I will try the new version, but this issue is causing a big issue for remote workers, the only way the client works is if you connect it BEFORE you vpn anywhere, it doesn't matter if use remote gateway is checked or not, if you vpn in from the computer you are using then try and connect with tsip to voip system it cannot handle it at all and will not connect. If you connect first then vpn to a server, everything works find, if there is a network glitch you have to disconnect everything and reconnect to tsip before connecting back up again to carry on.

This is the way round it, but it is a little annoying.

I haven't tested with the latest version (after the above change) yet so I will do that and see if it makes any difference and let you know.

tomek-o commented 1 year ago

This change above is mostly for convenience, adding adapter names to the list. Maybe I am missing something, but adding/removing VPN interface (if it is not the one used for the calls) should not interfere with softphone if it is bound to another interface.

Northernn commented 1 year ago

This does seem to be fixed in the new version (Dec 2022) have tested a few different ways to try and get it to break but it worked fine each time, but in the older version this is an issue, it hangs the software, or struggles to connect to the server. So basically the answer is make sure you are on the latest version.

Thanks for your help