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

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Aug 7 06:35:51 EDT 2019


Vitalii,

I think this is what you are looking for 
https://github.com/OpenSIPS/opensips/issues/1671, right ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 07/31/2019 12:33 PM, Vitalii Aleksandrov wrote:
> 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
>
>
> _______________________________________________
> 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/20190807/ad1bc7f5/attachment-0001.html>


More information about the Users mailing list