[OpenSIPS-Devel] [ opensips-Bugs-3517393 ] B2B and Contact hdr. Again.

SourceForge.net noreply at sourceforge.net
Fri May 4 10:02:08 CEST 2012


Bugs item #3517393, was opened at 2012-04-12 22:04
Message generated for change (Comment added) made by nikbyte
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3517393&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Nick Altmann (nikbyte)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: B2B and Contact hdr. Again.

Initial Comment:
When packet goes from internal to external interface, now b2b works well without force_send_socket - it detects send socket correctly.
But without force_send_socket Contact header contains always internal ip.
If I do force_send_socket(EXT_IP), Contact contains external ip.

I think it should also automatically detect Contact ip without force_send_socket.


----------------------------------------------------------------------

>Comment By: Nick Altmann (nikbyte)
Date: 2012-05-04 01:02

Message:
No problem cause it's not difficult to add force_send_socket. Also it would
be good to document that if you need force_rport functionality, you need to
add force_rport to b2b_request route separately from main route. I had two
days to debug b2b and tm to understand it. :-)


----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-05-04 00:56

Message:
Nick,

Having the B2B to do kind of autodetection of the outvound interface
(without using the force_send_socket) is almost mission impossible (or at
least does not pay the effort) - the issue here is that the contact hdr is
built by b2b module (before sending, of course). The sending is done via
the TM module, which is responsible for auto-detecting the socket, building
VIA and sending the message out. So the sending is done by TM (choosing the
socket), but the contact is built by b2b, prior to the TM interface
detection......classical egg and the hen problem.

So, let's better document that interface changing is done only via
force_send_socket() .

Bogdan

----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2012-04-24 23:01

Message:
Before your first patch local to external routing failed because there was
wrong interface for outgining packet.
It failed with force_send_socket and without force_send_socket.
You patched it and my config worked well with force_send_socket. Interface,
Via and Contact was correct.
Later, I tried to remove force_send_socket and it was that packets send
from internal to external interface correctly, but Contact contains
internal interface address. (About Via I don't remember now, but I can test
again).
I think it's possible to patch (and it's correct) that in such situations
b2b forward packets without force_send_socket.


----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-04-24 08:17

Message:
Nick,

There is something strange that I need to check with you: you say that in a
"local to external routing, b2b works well even without the
force_send_socket()" - that means that in the Contact, VIA of the outgoing
INVITE you have the external interface and, even more, the INVITE is sent
from the external interface ?? Could you check that for me please, as the
code says something else.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-04-20 04:05

Message:
Actually the contact should reflect the outbound interface (send socket)
all the time, with or without force_send_socket().

I will look into this.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3517393&group_id=232389



More information about the Devel mailing list