Original: Asterisk real-time add SIP number--sqlite
Asterisk real-time add SIP number--sqlite
Today, I tried to use Asterisk's real-time mode to add a SIP account to SQLite without restarting
Asterisk, no need to reload, you can successfully register a SIP account, the following is on my computer
Test pass, the wrong place, also please correct, welcome Board bricks!
1. Configuration:
Modify Extconfig.conf
#vim/etc/asterisk/extconfig.conf
Add to
Sippeers = Sqlite,general,sip_peers
Explained below:
Sippeers is the code that writes dead, the default keyword
= = Writing format
SQLite Database Engine (Here you can also specify to use other databases such as MYSQL,ODBC, but in advance it must be
To compile the corresponding database)
The general official online is family, as if the default is general, I try to use the other family, unsuccessful
Table names in the Sip_peers database
Remember Reload, re-read extconfig.conf configuration
2. Add a table to the database
SQLite corresponds to the stored files in the/var/lib/asterisk/sqlite.db (the location of this file can also
change, see/ETC/ASTERISK/RES_CONFIG_SQLITE.CONF)
#sqlite/var/lib/asterisk/sqlite/db
Sqlite>create table Sip_peers ("name", "type", "host", "context");
These fields are referenced by the sip.conf file, not very complete
See Http://www.voip-info.org/wiki/view/Asterisk+RealTime
3. A try!
Add a number to SQLite
INSERT INTO Sip_peers ("name", "type", "host", "context")
VALUES ("1234567", "friend", "dynamic", "inbound");
Then find a phone or soft phone registration number 1234567 The password is empty
Asterisk real-time add SIP number--sqlite