[OpenSIPS-Users] mhomed=1 and force_send_socket()

Vitalii Aleksandrov vitalik.voip at gmail.com
Wed Jul 31 05:33:20 EDT 2019


When user is registered everything is OK. The problem appears when I 
send a call to another proxy or carrier. With UDP transport opensips 
correctly detects an outgoing interface and forwards a call. With 
TCP/TLS transport opensips is not that smart. Found the place in code 
which detects an outgoing socket and it just takes the first interface 
for TCP with a comment that it's too complicated to detect it properly.
It means if you have a proxy with multiple LAN/WAN interfaces you can't 
just forward calls to different trunks and have to manually manage 
force_send_socket().
And unfortunately this trick with $fs doesn't work for BIN and I just 
can't have cluster neighbors in different segments of my network.

> mhomed =1 will make sure that the outgoing interface towards user A is 
> the interface on which user A has registered.
> Hence you need to be very very careful with mhomed=1.
> I use force_send_socket when I a have a mixed environment (e.g users 
> that register, connection to provider without registration, etc).
>
> these are my 2 drops of wisdom :-)
>
> as for BIN, that I can't explain as I never used that type of interface.
>
> .
> Op di 30 jul. 2019 om 17:16 schreef Vitalii Aleksandrov 
> <vitalik.voip at gmail.com <mailto:vitalik.voip at gmail.com>>:
>
>     Hi,
>
>     Have a problem with a multihomed proxy which doesn't select outgoing
>     interface correctly. Found similar topics where people discussed
>     usage
>     of force_send_socket() when they want to force opensips to use some
>     interface.
>
>     As far as I understood "mhomed=1" is the option which forces
>     opensips to
>     select a proper outgoing interface in multihomed environment. This
>     options really works, but unfortunately only for UDP. When
>     opensips has
>     multiple TCP / TLS / BIN interfaces, opensips just takes the first
>     from
>     the list which is not always correct and fails to establish an
>     outgoing
>     connection.
>
>     Since I have a module that detects an outgoing interface I can use
>     this
>     info with $fs to force correct socket for SIP. Unfortunately this
>     trick
>     doesn't work for BIN and it's not possible to setup a multihomed
>     opensips with clustering neighbors in both internal and external
>     networks.
>
>     Is there any workaround for BIN?
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190731/3a9869d2/attachment-0001.html>


More information about the Users mailing list