sip.conf
中的注册语句允许您的Asterisk服务器向提供商注册。
是否可以将此寄存器语句放入实时数据库并实时更新?
答案 0 :(得分:2)
我建议您阅读extconfig.conf文件,特别是用于此文件:
;
; Static and realtime external configuration
; engine configuration
;
; See https://wiki.asterisk.org/wiki/display/AST/Realtime+Database+Configuration
; for basic table formatting information.
;
[settings]
;
; Static configuration files:
;
; file.conf => driver,database[,table[,priority]]
;
; maps a particular configuration file to the given
; database driver, database and table (or uses the
; name of the file as the table if not specified)
;
;uncomment to load queues.conf via the odbc engine.
;
;queues.conf => odbc,asterisk,ast_config
;extensions.conf => sqlite,asterisk,ast_config
此致 米尔科
答案 1 :(得分:1)
我建议你按照这一切步骤进行操作。
1)最后写下面的代码,或者你可以把[general]部分的值放在文件/etc/asterisk/res_config_mysql.conf中
[general]
dbhost = 127.0.0.1
dbname = [dbname]
dbuser = root
dbpass = [dbpass]
dbport = 3306
2)在/etc/asterisk/extconfig.conf中写下以下代码
iaxusers => mysql,general,cc_iax_buddies
iaxpeers => mysql,general,cc_iax_buddies
sipusers => mysql,general,cc_sip_buddies
sippeers => mysql,general,cc_sip_buddies
3)检查mysql状态
cli> realtime mysql status
4)如果未添加模块,则从源文件添加如下
cd /root/download/asterisk/asterisk-1.8.1.12.1 (Path of asterisk source)
make menuselect
*app-mysql
*res_config_mysql.conf
exit(esc)
make
make install
5)/etc/asterisk/sip.conf 取消注释rtcachefriends = yes如下
rtcachefriends=yes
;rtsavesysname=yes
rtupdate=yes
rtautoclear=yes