format - This is for the format of the file. It can be g723, g729, gsm, h263, ulaw, alaw, vox, wav or WAV silence - It is optional. This is the maximum period of time silence after which the recording will stop. maxduration - it is optional. This is the maximum period of time for recording. option - It is optional. There are two possible options:
skip - the application will return immediately if the line is down noanswer - the application will try to record the voice even if the line is down
Purpose and usage
This application can be used for recording a message.
It allows you to limit the duration of the record. Also you can set the filename, the format of the sound file and the location where you would like the file to be stored.
To see how the application works we recommend to use our IAX softphone Idefisk. You can download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.
Asterisk PBX configurations
NOTE: This is only an example of what for you can use this application. Of course you can use it and for other things.
We need one registered user in iax.conf file. This is because we are going to use the IAX2 protocol. If you want to use other protocol such as SIP or MGCP, you have to do the configurations below respectively in sip.conf or mgcp.conf.
So, we have registered the user user1
Type=friend means that this user can make and receive calls. Host=dynamic means that the IP is not static but dynamic through a DHCP server. Allow=all means that the line which this user will use, could support all audio codecs. Context=test - this shows that this user is working with the extensions in this context of the configuration file extensions.conf.
So, in our example when somebody dials 12345, the call will be answered by the Answer application. The next executed extension will be the one which contains the Record application. As you can see we want to save our record in the file named proba with extension gsm. The file will be saved in the directory /tmp. Please, pay attention, that between the filename and the extension gsm, the character is not ".", but ":". This is very important - otherwise the Asterisk PBX will return to you an error message.
The digit 5 means, that if the system detects five seconds of silence, the recording will stop. The next digit is 20. This digit is for the maximum duration of the record. In our example we will have 20 seconds to record our message. The last option is skip. It will make the application to return immediately if the line is down. The options have to be separated by the "|" character.
Then we have an extension with the Wait application. Thanks to it we will set a short period of time for waiting. In our example this is 3 seconds.
When the wait time expires, the next extension will be executed. This is the extension with Playback application. By the help of it we can hear the sound file proba.gsm. So we can check what we have recorded. Please, pay attention, that in the brackets of the Playback application, we write the path to the file plus the filename, but we do not write the extension of the file. In our example we will write /tmp/proba.
NOTE: When you are going to use the Record application with the SIP channel there is one option, which you have to set in the sip configuration file sip.conf. The option is canreinvite. By default it is set to canreinvite=yes. You have to set it to canreinvite=no.
You can stop the record process at any time by pressing the pound key (#). The recording will also stop if you hang up the line or when the maximum duration time, set in the brackets of the application, expire.
2. Screenshots of what you can see on the CLI of the Asterisk PBX
3. Additional information
For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.
This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.
If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX
keflex 500 mg tablet (lucretia dot bradshaw at lm360 dot us) 05 July 2020 15:54:23 keflex 500 mg tablet https://keflex.webbfenix.com/
keflex antibiotic for cats (florine dot praed at lm360 dot us) 03 July 2020 22:11:08 keflex antibiotic for cats https://keflex.webbfenix.com/
AAssusHATKaws (serbFerswrendy at clifors dot xyz) 21 June 2020 19:09:19 <a href="https://cialisle.com/">cialis 20 mg</a>
Leoembege (leosweath at avmail dot xyz) 28 April 2020 07:32:31 Delayed Allergic Reaction To Amoxil https://buyciallisonline.com/# - buy cialis and viagra online Cialis 5mg Canada <a href=https://buyciallisonline.com/#>Cialis</a> Amlopres
Rubensnake (temptest3977772 at gmail dot com) 19 April 2020 09:13:22 SportsBook 5Bintang Kasino http://www.5bintangkasino.com/sportsbook/ - Show more!
Rubensnake (temptest3977772 at gmail dot com) 07 April 2020 16:26:58 Deposit 918Kiss 5Bintang Kasino http://www.5bintangkasino.com/deposit-918kiss/ - More info>>>
DennisVoill (temptest261214990 at gmail dot com) 29 November 2019 11:39:35 xe-88.asia Official XE-88 Online Casino Website http://www.xe-88.asia/ - Click here...
tess (tesnim_ab at yahoo dot fr) 14 June 2007 16:42:33 Should this option be used only in the extentions.conf ?
I would like to use a program in C in witch We ask the caller to record a message .
Thank you
Lacho (support at asteriskguru dot com) 10 October 2005 11:31:32 Michael, you were right. It`s my mistake! I`ve fixed it. 10x for your post.
Michael J. Mann (mjmann at ptci dot com) 06 October 2005 23:14:51 This example works well for basic recording of custom messages or prompts. However the text does not match the sample extensions.conf screen shot. The |5|20|skip represents 5 seconds of silence, 20 seconds of record time, and skip if the line is down. I tested this scheme and it works.
Michael J. Mann (mjmann at ptci dot com) 06 October 2005 20:47:06 This example works well for basic recording of custom messages or prompts. However the text does not match the sample extensions.conf screen shot. The |5|20|skip represents 5 seconds of silence, 20 seconds of record time, and skip if the line is down. I tested this scheme and it works.