[Home]

Summary:ASTERISK-26851: res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit transport
Reporter:Richard Begg (meric)Labels:
Date Opened:2017-03-10 00:11:50.000-0600Date Closed:2017-03-17 08:59:51
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_pjsip_sdp_rtp
Versions:13.14.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-26890 STUN server with non-default-route transport causes INVITE delay
Environment:Centos 7Attachments:( 0) bind_rtp_to_transport.patch
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.
Comments:By: Asterisk Team (asteriskteam) 2017-03-10 00:11:51.639-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Friendly Automation (friendly-automation) 2017-03-17 08:59:52.041-0500

Change 5197 merged by Joshua Colp:
res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit transport

[https://gerrit.asterisk.org/5197|https://gerrit.asterisk.org/5197]

By: Friendly Automation (friendly-automation) 2017-03-17 10:35:27.302-0500

Change 5198 merged by George Joseph:
res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit transport

[https://gerrit.asterisk.org/5198|https://gerrit.asterisk.org/5198]

By: Friendly Automation (friendly-automation) 2017-03-17 11:48:44.643-0500

Change 5199 merged by Joshua Colp:
res_pjsip_sdp_rtp: RTP instance does not use same IP as explicit transport

[https://gerrit.asterisk.org/5199|https://gerrit.asterisk.org/5199]

By: Friendly Automation (friendly-automation) 2017-04-04 16:30:59.716-0500

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

[https://gerrit.asterisk.org/5398|https://gerrit.asterisk.org/5398]

By: Friendly Automation (friendly-automation) 2017-04-04 16:34:58.324-0500

Change 5403 merged by Joshua Colp:
res_pjsip_sdp_rtp.c: Don't alter global addr variable.

[https://gerrit.asterisk.org/5403|https://gerrit.asterisk.org/5403]

By: Friendly Automation (friendly-automation) 2017-04-04 17:11:05.890-0500

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

[https://gerrit.asterisk.org/5402|https://gerrit.asterisk.org/5402]

By: Friendly Automation (friendly-automation) 2017-04-04 17:23:36.879-0500

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

[https://gerrit.asterisk.org/5400|https://gerrit.asterisk.org/5400]

By: Friendly Automation (friendly-automation) 2017-04-04 17:54:30.705-0500

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

[https://gerrit.asterisk.org/5401|https://gerrit.asterisk.org/5401]

By: Friendly Automation (friendly-automation) 2017-04-11 20:14:07.065-0500

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

[https://gerrit.asterisk.org/5442|https://gerrit.asterisk.org/5442]

By: Friendly Automation (friendly-automation) 2017-04-12 04:54:57.589-0500

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

[https://gerrit.asterisk.org/5437|https://gerrit.asterisk.org/5437]

By: Friendly Automation (friendly-automation) 2017-04-12 04:56:29.039-0500

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

[https://gerrit.asterisk.org/5432|https://gerrit.asterisk.org/5432]