Asterisk
  1. Asterisk
  2. ASTERISK-26851

res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit transport

    Details

    • Frequency of Occurrence:
      Constant
    • Regression:
      No

      Description

      When establishing an RTP session, unless the endpoint has a defined media_address, pjsip will bind the local socket to a wildcard address. This works fine where we can rely on the OS routing table to determine the correct interface, however it doesn't necessarily provide the correct behaviour in situations where there are multiple interfaces - especially if the host has multiple IP addresses on the same subnet (common in HA deployments).

      If the endpoint is bound to a transport which is then bound to a specific local IP address, I would expect that the RTP socket should follow the behaviour of the SIP socket and ensure that all traffic is sent/received from this address. Unfortunately this is not what happens.

      Attached is a patch which attempts to fix this. In short, in the absence of a media_address on the endpoint, and if the transport has a bound IP address - it will use this address for the local end of the RTP socket.

      Note: This issue is probably a duplicate of that logged in the closed ticket: ASTERISK-26656.

        Issue Links

          Activity

          Hide
          Friendly Automation added a comment -

          Change 5400 merged by zuul:
          res_pjsip_sdp_rtp.c: Don't alter global addr variable.

          https://gerrit.asterisk.org/5400

          Show
          Friendly Automation added a comment - Change 5400 merged by zuul: res_pjsip_sdp_rtp.c: Don't alter global addr variable. https://gerrit.asterisk.org/5400
          Hide
          Friendly Automation added a comment -

          Change 5401 merged by zuul:
          res_pjsip_sdp_rtp.c: Don't alter global addr variable.

          https://gerrit.asterisk.org/5401

          Show
          Friendly Automation added a comment - Change 5401 merged by zuul: res_pjsip_sdp_rtp.c: Don't alter global addr variable. https://gerrit.asterisk.org/5401
          Hide
          Friendly Automation added a comment -

          Change 5442 merged by zuul:
          res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member.

          https://gerrit.asterisk.org/5442

          Show
          Friendly Automation added a comment - Change 5442 merged by zuul: res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member. https://gerrit.asterisk.org/5442
          Hide
          Friendly Automation added a comment -

          Change 5437 merged by Joshua Colp:
          res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member.

          https://gerrit.asterisk.org/5437

          Show
          Friendly Automation added a comment - Change 5437 merged by Joshua Colp: res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member. https://gerrit.asterisk.org/5437
          Hide
          Friendly Automation added a comment -

          Change 5432 merged by Joshua Colp:
          res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member.

          https://gerrit.asterisk.org/5432

          Show
          Friendly Automation added a comment - Change 5432 merged by Joshua Colp: res_pjsip_sdp_rtp.c: Don't use deprecated transport struct member. https://gerrit.asterisk.org/5432

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development