[Freeswitch-users] Recording ULAW files

freeswitch-users at digitaldan.com freeswitch-users at digitaldan.com
Wed Jan 21 11:05:51 PST 2009

Thanks for the quick reply. 

I'm new to this project so I'm not familiar with the inner workings just yet but at looking at mod_native_file.c it seems this is a thin wrapper around the switch's own file input and output routines? Would it be best to change this class or register a new file type, like .ul? If so, where would be a good starting point. 

----- Original Message ----- 
From: "Anthony Minessale" <anthony.minessale at gmail.com> 
To: freeswitch-users at lists.freeswitch.org 
Sent: Wednesday, January 21, 2009 10:56:45 AM GMT -07:00 US/Canada Mountain 
Subject: Re: [Freeswitch-users] Recording ULAW files 

no, there is currently no way to do that. 
It would be feasible to add an option to mod_native_file to write wav headers around the raw data but it has not been attempted. 

On Wed, Jan 21, 2009 at 10:48 AM, < freeswitch-users at digitaldan.com > wrote: 

Hi, I'm recording files using the pcmu extension in order to save them in the g.711 ulaw format, which is what everything in my network uses. It appears that the recorded file is just raw data without a header. Is there any way to save this as a wav type with a header (keeping the ulaw format)? 

for example, running the unix command 'file' on the recording prints: 
/tmp/185065_f7bb8e0c-e641-11dd-800d-5ffe41c540dd.PCMU: data 

if I run it through sox which just outputs the same data (ulaw,8000,mono) but specifying the type as wav 
/usr/bin/sox -t .ul -r 8000 -c 1 -b -U file.pcmu -t wav -r 8000 -c 1 -b -U file.wav 

it produces a file that shows: 
/tmp/185065_f7bb8e0c-e641-11dd-800d-5ffe41c540dd.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 Hz 

if I try and save it within freeswitch using the wav extension, it trans-codes it to a pcm format 
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz 

Is there any way to have freeswitch record the file as ulaw with the RIFF wav header? 


Freeswitch-users mailing list 
Freeswitch-users at lists.freeswitch.org 
UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users 

Anthony Minessale II 

FreeSWITCH http://www.freeswitch.org/ 
ClueCon http://www.cluecon.com/ 

AIM: anthm 
MSN:anthony_minessale at hotmail.com 
GTALK/JABBER/ PAYPAL:anthony.minessale at gmail.com 
IRC: irc.freenode.net #freeswitch 

FreeSWITCH Developer Conference 
sip:888 at conference.freeswitch.org 
iax:guest at conference.freeswitch.org/888 
googletalk:conf+888 at conference.freeswitch.org 

_______________________________________________ Freeswitch-users mailing list Freeswitch-users at lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090121/39718b6a/attachment-0002.html 

More information about the FreeSWITCH-users mailing list