If an inbound audio stream is using the G.711 mu-law codec, in what format should I record a message so G.711 mu-law is the codec used in the resultant audio files?
Also, If the above format is not .wav, what kind of performance hit should one expect when recording an incoming G.711 mu-law audio stream as a .wav file?
Thanks,
James
222
333wav format
by clagos, Tuesday 11 of July, 2006 [18:00:53 UTC]
Asterisk records wav files in 16bits, signed. Is there any way of recording in 8bits, unsigned? I hope someone can help me. Thanks
222
333Anotger example
by , Tuesday 13 of April, 2004 [13:12:24 UTC]
I use this for recording samples, it is still a bit clunky, but offers the ability to re-record if you need to, and also to record a bunch of prompts in one hit (instead of needing to go and re-name the file after each recording).
Just paste this to your extensions.conf and include the recordings context for your line. If this breaks, you can keep both parts, if you fix it, please leave a comment here, and/or let me know...
recordings exten => 500,1,Festival,Please record your message
exten => 500,2,Record,mymessage:gsm
exten => 500,3,Festival,You said
exten => 500,4,Playback,mymessage
exten => 500,5,Festival,Press 1 to continue or 2 to change your message
exten => 500,6,ResponseTimeout,3
exten => t,1,Festival,Sorry, I did not get that
exten => t,2,Goto,500|5
exten => i,1,Festival,Sorry, that is an invalid choice
exten => i,2,Goto,500|5
exten => 1,1,System,/bin/mv /var/lib/asterisk/sounds/mymessage.gsm /var/lib/asterisk/sounds/local/`date +%s`.gsm
exten => 1,2,Festival,Thank you, your recording has been saved.
exten => 1,3,Festival,Press 3 to record another file or 4 to hang up
exten => 2,1,Goto,500|1
exten => 3,1,Goto,500|1
exten => 4,1,Hangup
Hmmm, newer versions of asterisk include a variable with current unixtime, I wrote this ages ago.
probably your asterisk binary is not within $PATH variable. Try 'whereis asterisk'. System will show you full path to binary. It's probably something like /usr/bin/asterisk, or maybe /usr/sbin/asterisk. Anyway- you should use 'sudo $fullpath_to_asterisk_binary -r', or write needed directory to $PATH environment variable, and use 'sudo asterisk -r'.
Hi, I am trying to install Asterisk 1.4 on Centos 4.8, basically following the steps in the O'Reilly book. If I go to /etc/rc.d/init.d/asterisk status, it returns "asterisk (pid12730) is running...", but I cannot execute "asterisk -r" anywhere. All that ever returns is a "bash: asterisk: command not found" Am I doing something wrong?
This is a strange request, I think - trying to scale down my hardware at home, I've removed my VoIP server (TrixBox). I'm now thinking this may have been a mistake, as I seem to be having difficulty in connecting my FXO to my VoIP hardware. This may even be impossible, I'm not sure.
...
Comments
333Recording a G.711 mu-law stream to avoid transcoding
If an inbound audio stream is using the G.711 mu-law codec, in what format should I record a message so G.711 mu-law is the codec used in the resultant audio files?
Also, If the above format is not .wav, what kind of performance hit should one expect when recording an incoming G.711 mu-law audio stream as a .wav file?
Thanks,
James
333wav format
333Anotger example
Just paste this to your extensions.conf and include the recordings context for your line. If this breaks, you can keep both parts, if you fix it, please leave a comment here, and/or let me know...
recordings
exten => 500,1,Festival,Please record your message
exten => 500,2,Record,mymessage:gsm
exten => 500,3,Festival,You said
exten => 500,4,Playback,mymessage
exten => 500,5,Festival,Press 1 to continue or 2 to change your message
exten => 500,6,ResponseTimeout,3
exten => t,1,Festival,Sorry, I did not get that
exten => t,2,Goto,500|5
exten => i,1,Festival,Sorry, that is an invalid choice
exten => i,2,Goto,500|5
exten => 1,1,System,/bin/mv /var/lib/asterisk/sounds/mymessage.gsm /var/lib/asterisk/sounds/local/`date +%s`.gsm
exten => 1,2,Festival,Thank you, your recording has been saved.
exten => 1,3,Festival,Press 3 to record another file or 4 to hang up
exten => 2,1,Goto,500|1
exten => 3,1,Goto,500|1
exten => 4,1,Hangup
Hmmm, newer versions of asterisk include a variable with current unixtime, I wrote this ages ago.