[OpenSIPS-Users] b2b_logic issues about multi homed opensips
Nick
nikbyte at gmail.com
Tue Mar 20 05:58:29 CET 2012
I've tested it again and… it works... partially. Sorry for misleading.
force_send_socket works before b2b_init_request with this patch, but on
next packets it doesn't work.
Also I has another problem with b2b, I cannot reroute packet, it ignores
$du=something in all routes (b2b_request, b2b_reply, local).
I need non-standard (manual) routing. How can I route manually?
--
Nick
2012/3/19 Nick <nikbyte at gmail.com>
> I applied patch (see bottom), but force_send_socket doesn't work.
>
> I tried to insert force_send_socket:
> - Before b2b_init_request;
> - In b2b_request route;
> - In b2b_reply route;
> - In local_route.
>
> It has no effect. :-(
>
>
> The patch:
>
> Index: logic.c
> ===================================================================
> --- logic.c (revision 8797)
> +++ logic.c (working copy)
> @@ -602,7 +602,7 @@
> ci.extra_headers = tuple->extra_headers;
> ci.body = (tuple->sdp.s?&tuple->sdp:NULL);
> ci.from_tag = NULL;
> - ci.send_sock = msg?msg->rcv.bind_address:NULL;
> + ci.send_sock =
> msg?(msg->force_send_socket?msg->force_send_socket:msg->rcv.bind_address):NULL;
> ci.local_contact = tuple->local_contact;
>
> if(msg)
> @@ -700,7 +700,7 @@
> ci.extra_headers = extra_headers;
> ci.body = body;
> ci.from_tag = NULL;
> - ci.send_sock = msg->rcv.bind_address;
> + ci.send_sock =
> msg->force_send_socket?msg->force_send_socket:msg->rcv.bind_address;
> ci.local_contact = tuple->local_contact;
>
> if (str2int( &(get_cseq(msg)->number),
> &ci.cseq)!=0 )
> @@ -2511,7 +2511,7 @@
> ci.extra_headers = tuple->extra_headers;
> ci.body = 0;
> ci.from_tag = 0;
> - ci.send_sock = msg?msg->rcv.bind_address:0;
> + ci.send_sock =
> msg?(msg->force_send_socket?msg->force_send_socket:msg->rcv.bind_address):0;
> ci.local_contact = tuple->local_contact;
>
> if(msg)
> @@ -2726,7 +2726,7 @@
> ci.dst_uri = msg->dst_uri;
> ci.extra_headers = &extra_headers;
> ci.body = (body.s?&body:NULL);
> - ci.send_sock = msg->rcv.bind_address;
> + ci.send_sock =
> msg->force_send_socket?msg->force_send_socket:msg->rcv.bind_address;
> ci.local_contact = tuple->local_contact;
>
> dlginfo = tuple->servers[0]->dlginfo;
> @@ -3227,7 +3227,7 @@
> ci.from_uri = from_uri;
> ci.extra_headers = tuple->extra_headers;
> ci.body = (body.s?&body:NULL);
> - ci.send_sock = msg->rcv.bind_address;
> + ci.send_sock =
> msg->force_send_socket?msg->force_send_socket:msg->rcv.bind_address;
> ci.local_contact = tuple->local_contact;
>
> if (str2int( &(get_cseq(msg)->number),
> &ci.cseq)!=0 )
>
> --
> Nick
>
> 2012/3/16 Bogdan-Andrei Iancu <bogdan at opensips.org>
>
>> **
>> Nick,
>>
>> try to replace that line with:
>> ci.send_sock = msg->force_send_socket ? msg->force_send_socket :
>> msg->rcv.bind_address;
>>
>> Regards,
>> Bogdan
>>
>>
>> On 03/16/2012 03:03 PM, Nick wrote:
>>
>> In my config mhomed=1, but in logic.c everything code like:
>>
>> ci.send_sock = msg->rcv.bind_address;
>>
>> If I understand correctly, only used socket from which message received.
>>
>> --
>> Nick
>>
>>
>> 2012/3/16 Bogdan-Andrei Iancu <bogdan at opensips.org>
>>
>>> Hi Nick,
>>>
>>> have you tried to enabled the mhomed option ?
>>> http://www.opensips.org/Resources/DocsCoreFcn17#toc63
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> On 03/16/2012 11:23 AM, Nick wrote:
>>>
>>>> Hello!
>>>>
>>>> I try to make b2bua with two interfaces (external and internal) and
>>>> need to bridge calls from internal to external interface (and back).
>>>> But when initial INVITE received to internal socket, b2b_logic sends
>>>> packet to external address also from internal socket.
>>>>
>>>> I tried force_send_socket before b2b_init_request, it has no effect.
>>>> I tried force_send_socket in local_route, it also has no effect.
>>>>
>>>> Does anyone have any ideas how to solve this problem?
>>>>
>>>> --
>>>> Nick
>>>>
>>>
>>> --
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>>
>>>
>>
>> _______________________________________________
>> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> --
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120320/3e3322ec/attachment.htm>
More information about the Users
mailing list