value - The value, which you want to set in the database family/key - in which family/key the value to be retrieved.
Purpose and usage
This function will allow you to store a value in the Asterisk’s database. This function has absolutely the same effect as the CLI command - database put <familiy> <key> <value>.
However, it gives you more flexibility, because you could manage the Asterisk’s database in your extensions.conf file.
To see how the application works we recommend you to use our IAX softphone Idefisk. You could download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.
Asterisk PBX configurations
iax.conf Configurations
We need to create one user in the 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.
On the picture above you could see our extensions.conf file.
In this example, when somebody dials 100, the call will be answered by the Answer application.
The next executed extension will be the one which contains the Set application. As arguments in its brackets we have set the following - DB(data/test)=122.
DB is the name of the function.
Then we have data, which will be the family in the Asterisk’s database and test, which will be the key. 122 is the value.
NOTE: The function DB is case sensitive. You always have to write it in your dialplans with capital letters.
You can verify that the command is executed correctly, by entering the command database show on the CLI of your Asterisk PBX system.
In order to be sure that the Asterisk PBX will hang up the line, when the conversation is over, it is a good idea to use the Hangup application.
2. Screenshots of what you could 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
order viagra without prescription (cooper dot kinsella47 at drizat dot xyz) 11 July 2020 17:35:42 order viagra without prescription https://cleverviagra.com/
Davidnut (thincariper1989ytavip at yandex dot ru) 04 February 2019 00:02:06 cialis on cnbc
expired cialis side effects
<a href="http://kaivanrosendaal.com">cialis generic</a>
cialis consegna 24 ore
cialis side effects testimonials
<a href=http://kaivanrosendaal.com>Cialis Cheap Buy Online</a>
buy cialis united states
cialis black v cialis
http://kaivanrosendaal.com/#cialis-generic-availability
Alpay (mt4vfy9qff at yahoo dot com) 20 December 2015 19:07:37 Tesco are using the Freshtel servers in OZ for their <a href="http://wcpffr.com">servcie</a>. Any call quality problems could be down to the default codec they use,swithing to alaw or ulaw improoves the quality. Lots of free softphones that support iax2 and run on windows, macs and Linux. More iax2 compatible hardware becomming available and this is a much better protocol than Sip.If you see make me wireless in Australia say hello from me.Tom
Arun Nandha Kumar (chozhavendan at gmail dot com) 26 April 2006 11:07:46 how can we increase the time delay between feed of input?
pandiyarajan (tellpandi at gmail dot com) 22 April 2006 11:20:36 using DB() is it possible to store array of variables??