[Home]

Summary:ASTERISK-28901: pjsip behaves incorrectly when sending RTP, it sends it to a private IP
Reporter:Private Name (falves11)Labels:
Date Opened:2020-05-17 08:22:10Date Closed:2020-05-17 12:35:29
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.33.0 16.10.0 Frequency of
Occurrence
Related
Issues:
Environment:LinuxAttachments:( 0) asteriskbug.txt
( 1) pjsip.conf
Description:I found that the PJSIP incorrectly sends RTP back to a private address, while in the same exact circumstances the old sip channel works correctly.

My phone is located behind a NAT, 172.16.0.0/21.
Asterisk 16 is on a public IP.
PJSIP has the config below:
force_rport=yes
direct_media=yes
disable_direct_media_on_nat = yes
direct_media_method=invite

But when I send a call I see the RTP being sent to my private address, vs the public IP. This only happens when Asterisk has dialed the call to another carrier. If instead of Dial I choose Answer() and MusicOnHold, then the RTP gets shipped to the right address.
This is a sample of the erroneous behavior:
Got  RTP packet from    XX.XX.XX.XX:17510 (type 00, seq 024786, ts 017440, len 000160)
Sent RTP packet to      172.16.7.254:50798 (type 00, seq 010736, ts 017440, len 000160)
172.16.7.254 is my private address

This is the call flow:
Sostphone --->Router---->Asterisk16Public--->Asterisk16Public (musicOnHold)
On the first Asterisk16Public I see the RTP being sent to the Private IP.
I am uploading my PJSIP.conf and trace that shows, it its last line, the change to the
The dialplan is: dial(${EXTEN}@asterisk)
NOTE: the first few seconds into the call, the RTP is correctly sent to my public IP. Then there is a reinvite and asterisk switches to the private IP.

I am uploading a trace that shows in its last line the issue. Until then the behavior is correct.
In the trace I replaced the public IPs and numbers for strings.




Comments:By: Asterisk Team (asteriskteam) 2020-05-17 08:22:12.858-0500

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: Asterisk Team (asteriskteam) 2020-05-17 08:22:13.902-0500

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Joshua C. Colp (jcolp) 2020-05-17 08:33:35.249-0500

We appreciate the difficulties you are facing, however this does not appear to be a bug report and your request or comments would be better served in a different forum.

The Asterisk community provides support over IRC, mailing lists, and forums as described at http://asterisk.org/community. The Asterisk issue tracker is used specifically to track issues concerning bugs and documentation errors.

Please see the Asterisk Issue Guidelines [1] for instruction on the intended use of the Asterisk issue tracker.

Thanks!

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



By: Asterisk Team (asteriskteam) 2020-05-17 08:47:06.591-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Private Name (falves11) 2020-05-17 12:09:21.092-0500

I am confused, is this issue closed and not a bug? If so, can somebody elaborate? In an identical scenario, the old chan_sip works as expected.

By: Asterisk Team (asteriskteam) 2020-05-17 12:09:21.356-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Joshua C. Colp (jcolp) 2020-05-17 12:35:29.414-0500

It was closed as not a bug because given the available information it seems to be a configuration issue. As the project has many areas to ask for help, it's best to go through those and give ample time for any replies.