[asterisk-bugs] [JIRA] (ASTERISK-28901) pjsip behaves incorrectly when sending RTP, it sends it to a private IP

Private Name (JIRA) noreply at issues.asterisk.org
Sun May 17 08:22:25 CDT 2020


Private Name created ASTERISK-28901:
---------------------------------------

             Summary: pjsip behaves incorrectly when sending RTP, it sends it to a private IP
                 Key: ASTERISK-28901
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28901
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_pjsip
    Affects Versions: 16.10.0, 13.33.0
         Environment: Linux
            Reporter: Private Name
            Severity: Blocker


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
The dialplan is: dial(${EXTEN}@asterisk)



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list