测试环境:
proxmox 1.7
centos 5.2 standard 5.2.1
asterisk 1.8.24
mysql
步骤:
1:mv sip.conf sip_bak.conf
2:
# phpMyAdmin SQL Dump
# version 2.5.6
# http://www.phpmyadmin.net
#
# 主机: localhost
# 生成日期: 2011 年 07 月 12 日 06:07
# 服务器版本: 5.0.91
# PHP 版本: 5.2.16
#
# 数据库 : `asterisk`
#
# --------------------------------------------------------
#
# 表的结构 `ast_config`
#
CREATE TABLE `ast_config` (
`id` int(11) NOT NULL auto_increment,
`cat_metric` int(11) NOT NULL default '0',
`var_metric` int(11) NOT NULL default '0',
`commented` int(11) NOT NULL default '0',
`filename` varchar(128) NOT NULL default '',
`category` varchar(128) NOT NULL default 'default',
`var_name` varchar(128) NOT NULL default '',
`var_val` varchar(128) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `filename_comment` (`filename`,`commented`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
#
# 导出表中的数据 `ast_config`
#
INSERT INTO `ast_config` VALUES (3, 0, 0, 0, 'sip.conf', '868', 'type', 'friend');
INSERT INTO `ast_config` VALUES (4, 0, 0, 0, 'sip.conf', '868', 'secret', '868');
INSERT INTO `ast_config` VALUES (5, 0, 0, 0, 'sip.conf', '868', 'qualify', 'yes');
INSERT INTO `ast_config` VALUES (6, 0, 0, 0, 'sip.conf', '868', 'port', '5060');
INSERT INTO `ast_config` VALUES (7, 0, 0, 0, 'sip.conf', '868', 'pickupgroup', '');
INSERT INTO `ast_config` VALUES (8, 0, 0, 0, 'sip.conf', '868', 'mailbox', '868@device');
INSERT INTO `ast_config` VALUES (9, 0, 0, 0, 'sip.conf', '868', 'host', 'dynamic');
INSERT INTO `ast_config` VALUES (10, 0, 0, 0, 'sip.conf', '868', 'dtmfmode', 'rfc2833');
INSERT INTO `ast_config` VALUES (11, 0, 0, 0, 'sip.conf', '868', 'dial', 'SIP/868');
INSERT INTO `ast_config` VALUES (12, 0, 0, 0, 'sip.conf', '868', 'context', 'from-internal');
INSERT INTO `ast_config` VALUES (13, 0, 0, 0, 'sip.conf', '868', 'canreinvite', 'no');
INSERT INTO `ast_config` VALUES (14, 0, 0, 0, 'sip.conf', '868', 'callerid', '868 <868>');
INSERT INTO `ast_config` VALUES (15, 0, 0, 0, 'sip.conf', '868', 'call-limit', '50');
3:vi extconfig.conf
sip.conf => mysql,general,ast_config ; edit by tolooney
4:vi res_config_mysql.conf
[general]
dbhost = 192.168.1.62
dbname = asterisk
dbuser = asteriskuser
dbpass = yourpassword
dbport = 3306
5:注册868分机
outcall-ast1*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
868/868 192.168.1.104 D 34646 OK (104 ms)
注册成功
asterisk realtime 之静态SIP篇(2)
最新推荐文章于 2024-12-28 09:00:00 发布