Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Recording ULAW files


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
freeswitch-users at di...
Guest





PostPosted: Wed Jan 21, 2009 12:05 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

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?

Thanks!
Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Jan 21, 2009 1:04 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

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@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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?

Thanks!



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
freeswitch-users at di...
Guest





PostPosted: Wed Jan 21, 2009 2:09 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

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@gmail.com>
To: freeswitch-users@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@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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?

Thanks!



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________ 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
Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Jan 21, 2009 2:40 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

The default audio framework operates on raw audio.
The mod_native_file triggers a special flag that tells the higher level api's for recording not
to transcode the audio first.

It would probably be easier for you to use the api_hangup_hook variable to trigger a sox command
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.


On Wed, Jan 21, 2009 at 1:05 PM, <freeswitch-users@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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@gmail.com (anthony.minessale@gmail.com)>
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@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@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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?

Thanks!



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400



_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org (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


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
freeswitch-users at di...
Guest





PostPosted: Wed Jan 21, 2009 3:30 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

Thanks, that's what I'm currently doing now.

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

The default audio framework operates on raw audio.
The mod_native_file triggers a special flag that tells the higher level api's for recording not
to transcode the audio first.

It would probably be easier for you to use the api_hangup_hook variable to trigger a sox command
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.


On Wed, Jan 21, 2009 at 1:05 PM, <freeswitch-users@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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@gmail.com (anthony.minessale@gmail.com)>
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@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@digitaldan.com (freeswitch-users@digitaldan.com)> wrote:
Quote:
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?

Thanks!



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400



_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org (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


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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




--
Anthony Minessale II

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

AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________ 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
Back to top
brian at freeswitch.org
Guest





PostPosted: Wed Jan 21, 2009 3:36 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

mod_sndfile already registered .ul and .al Wink

/b

On Jan 21, 2009, at 1:05 PM, freeswitch-users@digitaldan.com (freeswitch-users@digitaldan.com) wrote:
Quote:
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.
Back to top
brian at freeswitch.org
Guest





PostPosted: Thu Jan 22, 2009 12:45 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

mod_sndfile can record those too Wink

/b

On Jan 22, 2009, at 11:42 AM, Guillaume Renaud wrote:

Quote:
I use Sun's AU format to make ulaw raw files friendlier, you might
find it usefull.


_______________________________________________
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
Back to top
guillaume.renaud at gm...
Guest





PostPosted: Thu Jan 22, 2009 12:52 pm    Post subject: [Freeswitch-users] Recording ULAW files Reply with quote

I use Sun's AU format to make ulaw raw files friendlier, you might find it usefull.

2009/1/21 Brian West <brian@freeswitch.org (brian@freeswitch.org)>
Quote:
mod_sndfile already registered .ul and .al Wink

/b

On Jan 21, 2009, at 1:05 PM, freeswitch-users@digitaldan.com (freeswitch-users@digitaldan.com) wrote:

Quote:
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.






_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services