asterisk realtime 之静态SIP篇(2)

测试环境:
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)
注册成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值