Asterisk19 动态配置PJSIP

  • Post author:
  • Post category:其他


一、准备工作

1.配置ODBC

vi /etc/odbcinst.ini

[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
UsageCount = 2

2.配置连接

vi /etc/odbc.ini

[asterisk]
Driver = MySQL
Description = MySQL connection to ‘asterisk’ database
Server = 192.168.3.136
Port = 3306
Database = asterisk
UserName = asterisk1
Password = asterisk1
Socket = /var/run/mysqld/mysqld.sock

二、配置res_odbc.conf

注意这里的dsn为odbc.ini文件的头

[asterisk]
enabled => yes
dsn => asterisk
username => asterisk1
password => asterisk1
pre-connect => yes

三、验证odbc是否正常工作

启动asterisk 使用odbc show 命令

四、创建相关表和相关测试数据

asteri



版权声明:本文为axibazZ原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。