<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Thanks, that's what I'm currently doing now.<br><br>----- Original Message -----<br>From: "Anthony Minessale" <anthony.minessale@gmail.com><br>To: freeswitch-users@lists.freeswitch.org<br>Sent: Wednesday, January 21, 2009 12:28:19 PM GMT -07:00 US/Canada Mountain<br>Subject: Re: [Freeswitch-users] Recording ULAW files<br><br>The default audio framework operates on raw audio.<br>The mod_native_file triggers a special flag that tells the higher level api's for recording not <br>to transcode the audio first.<br><br>It would probably be easier for you to use the api_hangup_hook variable to trigger a sox command<br>
to wrap the files in a wav or use a batch process in cron to do so than to try to figure it out in the code.<br><br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 1:05 PM, <span dir="ltr"><<a href="mailto:freeswitch-users@digitaldan.com" target="_blank">freeswitch-users@digitaldan.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">Thanks for the quick reply. <br>
<br>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. <br>
<div><div></div><div class="Wj3C7c"><br><br>----- Original Message -----<br>From: "Anthony Minessale" <<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
Sent: Wednesday, January 21, 2009 10:56:45 AM GMT -07:00 US/Canada Mountain<br>Subject: Re: [Freeswitch-users] Recording ULAW files<br><br>no, there is currently no way to do that.<br>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.<br>
<br><br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 10:48 AM, <span dir="ltr"><<a href="mailto:freeswitch-users@digitaldan.com" target="_blank">freeswitch-users@digitaldan.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">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)? <br>
<br>for example, running the unix command 'file' on the recording prints:<br>/tmp/185065_f7bb8e0c-e641-11dd-800d-5ffe41c540dd.PCMU: data<br><br>if I run it through sox which just outputs the same data (ulaw,8000,mono) but specifying the type as wav<br>
/usr/bin/sox -t .ul -r 8000 -c 1 -b -U file.pcmu -t wav -r 8000 -c 1 -b -U file.wav<br><br>it produces a file that shows:<br>/tmp/185065_f7bb8e0c-e641-11dd-800d-5ffe41c540dd.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 Hz<br>
<br>if I try and save it within freeswitch using the wav extension, it trans-codes it to a pcm format<br> RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz<br><br>Is there any way to have freeswitch record the file as ulaw with the RIFF wav header?<br>
<br>Thanks!<br></div></div><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
<br></div></div>_______________________________________________
Freeswitch-users mailing list
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</div></div><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
<br>_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
</div></body></html>