ARI problems trying to play MP3


I’m trying to play MP3 files using ARI from a URI.

First tried with format MP3, Mono, 16Khz, 32-bit float and got the following errors:

[Apr 8 11:35:33] WARNING[10056][C-0000000d]: mp3/interface.c:218 decodeMP3: Junk at the beginning of frame 52494646
[Apr 8 11:35:33] WARNING[10056][C-0000000d]: mp3/layer3.c:328 III_get_side_info_1: big_values too large!

Then converted the same file to 8khz and this time it plays but with a horrible sound, Asterisk adds .slin to the file name, and it throws a STUNT error:

[Apr 8 11:59:53] ERROR[7524]: pjproject: <?>: icess0x7f6fe405a128 …Error sending STUN request: Invalid argument
> 0x7f6fe4041160 – Strict RTP learning after ICE completion
– <PJSIP/0001130-0000000f> Playing ‘https://filepathredacted/VoicemailGreetingRecording_20200408143245_000000000356.mp3.slin’ (language ‘en’)


  1. Can Asterisk play 16khz mp3 files or must be 8khz?
  2. I’m not using a STUN server. Is that STUN error normal?
  3. More important, how can I fix the sound quality played by Asterisk? Is it a file format problem?
  • Verified the file plays just fine when pasting the media URL directly in the browser.
  • Asterisk Version 16.5
  • ARI: playWithId: POST /channels/{channelId}/play/{playbackId}
  • Verified is loaded:
    Module Description Use Count Status Support Level MP3 format [Any rate but 8000hz mono is 0 Running extended


The format_mp3 module is an add-on and not really supported. I don’t know what its current state is or whether it really supports non-8kHz. According to the description “Any rate but 8000hz mono is optimal”.

Converting to core supported types outside of Asterisk would yield better results.

The STUN error is fine, it generally means that an IPv6 candidate was present but your system does not have a global IPv6 address.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.