[Home]

Summary:ASTERISK-26656: PJSIP fails to handle NAT clients on multihomed boxes
Reporter:Private Name (falves11)Labels:
Date Opened:2016-12-10 07:27:06.000-0600Date Closed:2020-01-14 11:14:15.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_multihomed
Versions:13.12.2 Frequency of
Occurrence
Related
Issues:
Environment:Linux 64Attachments:( 0) pjsip-config.txt
Description:In PJSIP, we have these 3 settings for an endpoint located behind a NAT
   rtp_symmetric - Send media to the address and port from which Asterisk receives it, regardless of where SDP indicates that it should be sent
   force_rport - Send responses to the source IP address and port as though port were present, even if it's not
   rewrite_contact - Rewrite SIP Contact to the source address and port of the request so that subsequent requests go to that address and port.

If the machine has one interface, PJSIP correctly determines the public IP of the client, rewrites the contact and sends RTP back to the public IP. If the machine has more than one network interface, on the same network (my case), then PJSIP gets confused and send the RTP to the private IP, this the client never gets the media.

All this can be seen with
rtp set debug on

This issue has the tragic consequence of not allowing for any load balancing, since we can effectively have on single network interface.
Comments:By: Asterisk Team (asteriskteam) 2016-12-10 07:27:06.770-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: Private Name (falves11) 2016-12-10 07:35:11.563-0600

The box has two IPs, on the same network. Everything works if I send a call to eth0, then RTP is sent to the public IP of the client. If I send the call to eth1, the second IP, then PJSIP sends back media to the private IP of the client.

By: Joshua C. Colp (jcolp) 2016-12-12 09:22:21.211-0600

Thank you for taking the time to report this bug and helping to make Asterisk better. Unfortunately, we cannot work on this bug because your description did not include enough information. Please read over the Asterisk Issue Guidelines [1] which discusses the information necessary for your issue to be resolved and the format that information needs to be in. We would be grateful if you would then provide a more complete description of the problem. At a minimum, we need:

1. The specific steps or actions you took that caused you to encounter the problem.
2. The behavior you expected and the location of documentation that led you to that expectation.
3. The behavior you actually encountered.

To demonstrate the issue in detail, please include Asterisk log files generated per the instructions on the wiki [2]. If applicable, please ensure that protocol-level trace debugging is enabled, e.g., 'sip set debug on' if the issue involves chan_sip, and configuration information such as dialplan and channel configuration.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

[2] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information



By: Asterisk Team (asteriskteam) 2016-12-26 12:00:01.527-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines