[Home]

Summary:ASTERISK-26086: res_musiconhold: format option is not documented adequately
Reporter:Jens Bürger (wiremuddle)Labels:
Date Opened:2016-06-05 05:49:27Date Closed:2017-03-28 13:11:54
Priority:MinorRegression?
Status:Closed/CompleteComponents:Documentation Resources/res_musiconhold
Versions:13.9.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian Linux 7.11Attachments:
Description:On a freshly compiled Asterisk 13.9.1 with example configuration, streaming MoH in wideband (16 kHz) only leads to an screaming noise.
When playing in 8 kHz, streaming works fine::
Excerpt from musiconhold.conf:
[streamtest]
mode=custom
application=/usr/bin/mpg123 -q -r 8000 --mono -s http://mp3.theradio.cc

When streaming in wideband like this:
[streamtest]
mode=custom
format=g722
application=/usr/bin/mpg123 -q -r 16000 --mono -s http://mp3.theradio.cc

The client hears only a screaming noise.

In contrast, when playing a local file which was resampled with sox to 16 kHz, this works fine.

This was verified with two different clients (Snom 370 hardware phone, Jitsi soft phone)
Comments:By: Asterisk Team (asteriskteam) 2016-06-05 05:49:27.932-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].

By: Rusty Newton (rnewton) 2016-06-15 15:42:00.341-0500

Does this *only* occur with mpg123? What about 16kHz from another streaming source (as opposed to the 16kHz file that worked) ?


By: Jens Bürger (wiremuddle) 2016-06-17 02:14:36.328-0500

I certainly can test it, if you have a suggestion for an alternative tool?

By: Rusty Newton (rnewton) 2016-06-17 12:51:07.172-0500

I'm unsure, maybe mplayer, clementine, VLC or pianobar.

By: Jens Bürger (wiremuddle) 2016-07-01 06:19:27.199-0500

Yes, the behavior also persists when using another streaming setup, as for example:
{code}
/usr/bin/wget -q -O - http://mp3.theradio.cc | /usr/bin/madplay -Q -z -o raw:- --mono -R 16000 -a -12 -
{code}
Nevertheless, I was a bit unsure what exactly the variable "format" is supposed to do. After crawling the sourcecode, I came across that it specifies the format of the stream given and after further source digging, I found out that there are variants, e.g. of the slin format for different sampling rates (slin16 / slin32 / slin44, etc.).

To sum it up, I think it would be a good idea to have this documented better.

By: Jens Bürger (wiremuddle) 2016-07-01 06:22:52.491-0500

To sum it up, my example works like this
{code}
[streamtest]
mode=custom
format=slin16
application=/usr/bin/mpg123 -q -r 16000 --mono -s http://mp3.theradio.cc
{code}


By: Joshua C. Colp (jcolp) 2016-07-05 06:02:58.482-0500

Are you saying that after discovering what the format option does and setting it to slin16 you were then able to hear the audio properly?

By: Jens Bürger (wiremuddle) 2016-07-06 01:05:27.320-0500

Yes, sorry if I didn'nt make this clear enough; after getting to the bottom of how to configure it, I got HD audio MoH using mpg123 without problems.

By: Friendly Automation (friendly-automation) 2017-03-28 13:11:55.654-0500

Change 5330 merged by Joshua Colp:
res_musiconhold: Document the 'format' option

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

By: Friendly Automation (friendly-automation) 2017-03-28 13:12:01.226-0500

Change 5328 merged by Joshua Colp:
res_musiconhold: Document the 'format' option

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

By: Friendly Automation (friendly-automation) 2017-03-28 13:12:05.759-0500

Change 5329 merged by Joshua Colp:
res_musiconhold: Document the 'format' option

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