[Home]

Summary:ASTERISK-21399: RTP Multicast of L16 (type 10): Asterisk and wireshark disagree
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2013-04-10 10:37:29Date Closed:2017-09-14 12:39:16
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/General Resources/res_rtp_multicast
Versions:SVN Frequency of
Occurrence
Related
Issues:
Environment:Debian 7.0, wireshark 1.8.2-5wheezy2Attachments:( 0) full-dialed-multirtp.txt
( 1) full-originate-multirtp.txt
( 2) rtp.cap
Description:While trying to debug an RTP multicast issue, I tried to use the following in the Asterisk CLI to send an RTP multicast to the phone:

originate MulticastRTP/basic/224.0.0.5:5000 application Playback long-test-file

(The MoH could be used for <long-test-file>)

The phone (Yealink SIP-T28P) reports that it was sent "HD", and and does not produce any useful sound, apart from low-volume noise.

In order to reproduce the problem I recorded the sound using:

 tcpdump -w rtp.cap -s0 'host 224.0.0.5'

After a while I stopped the multicast channel using 'channel request hangup' and ended the recording. rtp.cap is attached.

In wireshark:

1. Select Analyze -> Decode as -> RTP

You will note that all packets now are parsed as having "Payload type: 16-bit uncompressed audio, stereo (10)".

2. Telephony -> RTP -> Stream Analysis
3. Try playing the audio in the player. Nothing heard.
4. Save Payload. Save it as 'rtp.sln' and 'play' will play it just fine, so Asterisk did not do anything to the content.

Comments:By: Tzafrir Cohen (tzafrir) 2013-04-10 10:40:45.193-0500

packet capture of RTP Multicast of slin content

By: Rusty Newton (rnewton) 2013-04-18 19:24:11.544-0500

Reproduced in SVN-branch-11-r386006. Attaching VERBOSE and DEBUG output for initiation of multicast from both the Dial application and when using originate. Endpoint is a Snom 320 which doesn't even produce noise when receiving the stream generated with using originate.

I noted in full-originate-multirtp that Asterisk does indicate .slin here:

{noformat}
[Apr 18 19:10:21] VERBOSE[17240][C-0000000a] file.c:
    -- <MulticastRTP/0x7f08f40195a8> Playing '/var/lib/asterisk/moh/macroform-cold_day.slin' (language 'en')
{noformat}

'core show channel' on the Multicast RTP (from originate) indicates

{noformat}
 NativeFormats: (slin)
   WriteFormat: slin
    ReadFormat: slin
WriteTranscode: No
 ReadTranscode: No
{noformat}


'core show channel' on the Multicast RTP (from Dial) indicates

{noformat}
 NativeFormats: (ulaw)
   WriteFormat: ulaw
    ReadFormat: ulaw
{noformat}

By: Sean Bright (seanbright) 2017-05-30 10:55:57.986-0500

The problem with using Originate here (without passing the {{c(codec)}} option in the dial string) is that it will default to signed linear @ 8kHz. Multicast RTP has no SDP, so Asterisk tries to pick one of the static RTP payload assignments that match signed linear @ 8kHz and erroneously chooses payload 10 (L16 @ 44.1kHz - stereo).

The easiest work around for this is to pass a codec argument in the dial string:

{noformat}
MulticastRTP/basic/224.0.0.5:5000//c(ulaw)
{noformat}

The reason that it works in the {{Dial}} case, is because the channel performing the dial is already ulaw and the MulticastRTP channel picks up on that and uses it.

A better fix would be for MulticastRTP/UnicastRTP to use slin44 by default, and pick up payload code 11 instead of 10. That, coupled with the endianess issue (fix is up for review [here|https://gerrit.asterisk.org/#/c/5729/]) should make it work by default and wouldn't require passing a codec argument.


By: Friendly Automation (friendly-automation) 2017-09-14 12:39:17.316-0500

Change 6488 merged by Jenkins2:
chan_rtp: Use μ-law by default instead of signed linear

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

By: Friendly Automation (friendly-automation) 2017-09-14 12:39:53.750-0500

Change 6490 merged by Jenkins2:
chan_rtp: Use μ-law by default instead of signed linear

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

By: Friendly Automation (friendly-automation) 2017-09-14 12:48:28.012-0500

Change 6489 merged by Joshua Colp:
chan_rtp: Use μ-law by default instead of signed linear

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

By: Friendly Automation (friendly-automation) 2017-09-14 12:55:20.544-0500

Change 6487 merged by Jenkins2:
chan_rtp: Use μ-law by default instead of signed linear

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