shalu dhamija
2011-Dec-26 05:18 UTC
[asterisk-users] Not able to play wav files in asterisk
Hello all, I am trying to play .wav file using asterisk 1.8.7.1.? I tried playing the wav files having different properties. The properties of the file can be seen using 'file' command or 'ffmpeg -i <filename>' 1.? Filname: miss_audio.wav [root at localhost en]# file miss_audio.wav miss_audio.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 Hz [root at localhost en]# ffmpeg -i miss_audio.wav Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, 1 channels, s16, 64 kb/s I am getting the following warning in this case. [Dec 24 15:08:47] WARNING[26513]: format_wav.c:92 check_header_fmt: Not a wav file 7 [Dec 24 15:08:47] WARNING[26513]: file.c:376 fn_wrapper: Unable to open format wav 2. Filename: msg0000.wav This file is recorded using asterisk voicemail() application . [root at localhost en]# file msg0000.wav msg0000.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz [root at localhost en]# ffmpeg -i msg0000.wav Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, s16, 128 kb/s And in this case? asterisk is trying to play the file in slin format. ? -- <SIP/phone1-00000000> Playing 'msg0000.slin' (language 'en') [Dec 24 15:14:10] WARNING[26566]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/phone1-00000000 for msg0000 ??? -- Auto fallthrough, channel 'SIP/phone1-00000000' status is 'UNKNOWN' [Dec 24 15:14:10] DEBUG[26566]: channel.c:2679 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/phone1-00000000' Why does asterisk start playing the file in slin format. I would be thankful if someone can guide me to the steps for playing the wav file in asterisk. Regards, Shalu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111226/5413cb6e/attachment.htm>
isrlgb at gmail.com
2011-Dec-26 06:32 UTC
[asterisk-users] Not able to play wav files in asterisk
Rename the wav to ulaw Miss_audio.ulaw -----Original Message----- From: shalu dhamija <shalu.dhamija at rancoretech.com> Sender: asterisk-users-bounces at lists.digium.com Date: Mon, 26 Dec 2011 10:48:36 To: <asterisk-users at lists.digium.com> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Subject: [asterisk-users] Not able to play wav files in asterisk -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Steve Edwards
2011-Dec-26 07:03 UTC
[asterisk-users] Not able to play wav files in asterisk
On Mon, 26 Dec 2011, isrlgb at gmail.com wrote:> Rename the wav to ulaw > Miss_audio.ulawVery bad advice. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Tzafrir Cohen
2011-Dec-26 09:52 UTC
[asterisk-users] Not able to play wav files in asterisk
On Mon, Dec 26, 2011 at 10:48:36AM +0530, shalu dhamija wrote:> > > > Hello all, > > > > I am trying to play .wav file using asterisk 1.8.7.1.? I tried playing the wav files having different properties. > > The properties of the file can be seen using 'file' command or 'ffmpeg -i <filename>' > > > > 1.? Filname: miss_audio.wav > > > > [root at localhost en]# file miss_audio.wav > > miss_audio.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 HzAsterisk prefers the payload to be signed-linear rather than mu-law.> > > > [root at localhost en]# ffmpeg -i miss_audio.wav > > Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, 1 channels, s16, 64 kb/s> > > > I am getting the following warning in this case. > > > > [Dec 24 15:08:47] WARNING[26513]: format_wav.c:92 check_header_fmt: Not a wav file 7This message is, indeed, misleading.> [Dec 24 15:08:47] WARNING[26513]: file.c:376 fn_wrapper: Unable to open format wavBut this one is correct. I wonder if something along the lines of: sox orig.wav new.wav -s would do. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Israel Gottlieb
2011-Dec-26 12:13 UTC
[asterisk-users] Not able to play wav files in asterisk
On Mon, Dec 26, 2011 at 9:03 AM, Steve Edwards <asterisk.org at sedwards.com>wrote:> On Mon, 26 Dec 2011, isrlgb at gmail.com wrote: > > Rename the wav to ulaw >> Miss_audio.ulaw >> > > Very bad advice. >that might be but if you take a pcm "ulaw" encoded file and name it ".wav" asterisk will throw that error I think asterisk should get smarter and read the header to get the format or whatever else is needed and not only the extension of the filename> -- > Thanks in advance, > ------------------------------**------------------------------** > ------------- > Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST > Newline Fax: +1-760-731-3000 > > > -- > ______________________________**______________________________**_________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20111226/b3f1522a/attachment.htm>