sip.conf
中的注册语句允许您的Asterisk服务器向提供商注册。
是否可以将此注册语句放入实时数据库并实时更新?
我建议你阅读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)最后写下面的代码,或者你可以把值放在文件/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=是,如下所示
rtcachefriends=yes
;rtsavesysname=yes
rtupdate=yes
rtautoclear=yes