[OpenSIPS-Users] How to avoid UDP usage in load_balancer module

Răzvan Crainea razvan at opensips.org
Tue Feb 20 08:56:54 EST 2018


Hi, Mirko!

Your solution works too, you can stick with it, it basically has the 
same effect.

Best regards,
Răzvan

On 02/20/2018 02:55 PM, Mirko Csiky wrote:
> Hi Razvan,
> in the meantime (yesterday), the problem was solved by using :
> force_send_socket(tcp:192.168.12.175);
> before t_relay()
> In my database (i have 3 rows in load_balancer table only) it is so:
> sip\:192.168.15.92
> (\ as escape character for ":" DBTEXT syntax)
> so, i think, it doesnt provide the transport parameter.
> Thanks for hack idea ! It looks as better solution than mine: should i 
> use it ? (or stay with force_send_socket(tcp ?)
> best regards
> Mirko
> 
> 
> 
> 
> On Tue, Feb 20, 2018 at 9:07 AM, Răzvan Crainea <razvan at opensips.org 
> <mailto:razvan at opensips.org>> wrote:
> 
>     Hi, Mirko!
> 
>     If you provision a UDP URI in the database, then the outgoing INVITE
>     will be sent as UDP.
>     If you want to preserve the protocol, regardless the URI's protocol,
>     you'll have to explicitely hack it in the script by altering the
>     destination URI, something like:
> 
>     if ($rP == "TCP")
>          $du = $du + ";transport=tcp";
> 
>     Note that this hack presumes that the URIs in your database are
>     always provisioned without a transport parameter;
> 
>     Hope this helps.
> 
>     Best regards,
>     Răzvan
> 
> 
>     On 02/19/2018 02:32 PM, Mirko Csiky wrote:
> 
>         Hi guys,
>         i am playing with opensips and load balancer module, and it
>         seems like inital TCP invites will be forwarded (opensips relay
>         after load_balance(...) ) as UDP ? Can this behaviour be
>         deactivated ? (i tried to find some configuration options, but
>         without success)
>         It is also possible that my config is not ok and it is so
>         because of misconfiguration ...
>         Can anybody help me here ?
>         best regards
>         Mirko
> 
> 
>         _______________________________________________
>         Users mailing list
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>         <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
> 
> 
>     -- 
>     Răzvan Crainea
>     OpenSIPS Core Developer
>     http://www.opensips-solutions.com <http://www.opensips-solutions.com>
>     OpenSIPS Summit 2018
>     http://www.opensips.org/events/Summit-2018Amsterdam
>     <http://www.opensips.org/events/Summit-2018Amsterdam>
> 
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>     <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
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam



More information about the Users mailing list