https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration#RealtimeDatabaseConfiguration-Notesonuseofthesipregsfamily
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/I_section12_tt1465.html
https://wiki.asterisk.org/wiki/display/AST/Setting+up+PJSIP+Realtime
http://www.open-voip.org/index.php?title=Asterisk_Full_RealTime_example
mysql> INSERT INTO asterisk.sippeers ( NAME, defaultuser, secret, context, HOST, nat, qualify, TYPE) VALUES ( '1005', '1005', '0111234', 'from-internal', 'dynamic', 'yes', 'no', 'friend');
Query OK, 1 row affected (0.00 sec)
523 cd ..
524 cd ..
525 cd ast-db-manage/
526 ls
527 nano config.ini.sample
528 nano config.ini.sample
529 clear
530 cp config.ini.sample config.ini
531 alembic -c config.ini upgrade head
532 pip install alembic
533 alembic -c config.ini upgrade head
534 mysql -u root -p -D asterisk
/etc/asterisk/extconfig
;iaxusers => odbc,asterisk
;iaxpeers => odbc,asterisk
sippeers => odbc,asterisk
;sipregs => odbc,asterisk ; (avoid sipregs if possible, e.g. by using a view)
;ps_endpoints => odbc,asterisk
;ps_auths => odbc,asterisk
;ps_aors => odbc,asterisk
;ps_domain_aliases => odbc,asterisk
;ps_endpoint_id_ips => odbc,asterisk
;voicemail => odbc,asterisk
;extensions => odbc,asterisk
;meetme => mysql,general
;queues => odbc,asterisk
;queue_members => odbc,asterisk
;queue_rules => odbc,asterisk
;acls => odbc,asterisk
;musiconhold => mysql,general
;queue_log => mysql,general
res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk-mysql
username => root
password => 12223
pre-connect => ye
/etc/asterisk/sip.conf
[general]
switch => Realtime
cd /usr/src/asterisk-13.8.1/contrib/realtime/mysql
mysql -p1234 asterisk < mysql_config.sql