[Home]

Summary:ASTERISK-30275: ari: RTP packets being sent out of P2P with out of stream seqno/ts with early bridging
Reporter:John M (johnm2)Labels:
Date Opened:2022-10-24 12:11:33Date Closed:
Priority:MinorRegression?No
Status:Open/NewComponents:Resources/res_ari_channels Resources/res_rtp_asterisk
Versions:18.9.0 18.12.1 18.15.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 22.04 Ubuntu 20.04Attachments:( 0) capture.pcapng
( 1) capture2.pcapng
( 2) debug_log_30275.txt
( 3) messages.log
( 4) pjsip.conf
Description:1. It only happens on the caller channel.
2. The issue only happens when using the bridge_native_rtp.so locally
3. The issue doesn’t happen if I set directmedia=yes and native_rtp is remote since Asterisk doesn't pass RTP in this case.
4. The issue doesn’t happen if I do noload => bridge_native_rtp.so and use only simple_bridge.
5. The issue seems to also only happen during early bridging. If early bridging is not used the issue doesn't seem to happen.

Issue is detailed here: https://community.asterisk.org/t/asterisk-sending-rtp-with-wrong-sequence-number/94468

Comments:By: Asterisk Team (asteriskteam) 2022-10-24 12:11:37.640-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-10-24 13:18:24.238-0500

Thanks for the report and debug. However we also need protocol specific debug captured at the time of the issue. Please include the following:

* Asterisk log files generated using the instructions on the Asterisk wiki [1], with the appropriate protocol debug options enabled, e.g. 'pjsip set logger on' if the issue involves the chan_pjsip channel driver.
* Configuration information for the relevant channel driver, e.g. pjsip.conf.
* A wireshark compatible packet capture, captured at the same time as the Asterisk log output.

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

Please also attach a packet capture.

By: John M (johnm2) 2022-10-24 13:25:31.535-0500

pjsip.conf

By: John M (johnm2) 2022-10-24 13:31:22.073-0500

PJSIP and RTP logs

By: John M (johnm2) 2022-10-24 13:37:16.998-0500

Packet 104 is commented and is the problematic one.
You can also see it by selecting the Caller channel RTP stream and going to Telephony -> RTP -> Stream Analysis

By: John M (johnm2) 2022-10-24 13:53:23.630-0500

And if you are looking at the logs it is seq 020648

By: Joshua C. Colp (jcolp) 2022-10-27 04:02:56.636-0500

We require additional debug to continue with triage of your issue. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis.

Thanks!

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

Can you please also provide the core debug level logs as well.

A packet is being sent outside of the bridged mechanism, which is causing it to use different information. The core debug log may show why exactly it happened.

By: John M (johnm2) 2022-10-27 10:52:37.258-0500

I am attaching a new PCAP with the debug logs as requested.

notice,warning,error,debug,verbose,dtmf
core set verbose 5
core set debug 5
pjsip set logger on
rtp set debug on

This case actually had 2 phantom RTP packets that I also commented on in the PCAP they are the following:

[Oct 27 15:26:58] VERBOSE[62934][C-00000045] res_rtp_asterisk.c: Sent RTP packet to      54.215.108.95:33188 (type 09, seq 022568, ts 2227490808, len 000160)
[Oct 27 15:26:58] VERBOSE[62934][C-00000045] res_rtp_asterisk.c: Sent RTP packet to      54.215.108.95:33188 (type 09, seq 022569, ts 2227490968, len 000160)

This is the first time I have seen 2 instead of 1.

By: John M (johnm2) 2022-10-27 10:54:35.040-0500

Uploaded

capture2.pcapng
debug_log_30275.txt

By: Joshua C. Colp (jcolp) 2022-11-08 08:46:51.716-0600

I believe this is specifically limited to ARI, and its use of early media. Not early media over all within Asterisk. I think it's possible for packets to get sent out of the P2P mechanism for a brief period of time.