Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#509 B2B and Contact hdr. Again.

1.8.x
closed-fixed
modules (454)
7
2012-05-04
2012-04-13
Nick Altmann
No

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.

Discussion

    • priority: 5 --> 7
    • assigned_to: nobody --> bogdan_iancu
     
  • 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

     
  • 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

     
  • Nick Altmann
    Nick Altmann
    2012-04-25

    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.

     
  • 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

     
  • Nick Altmann
    Nick Altmann
    2012-05-04

    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. :-)

     
    • status: open --> closed-fixed