asterisk配置实现sip服务器,进行sip视频通话

配置asterisk

1.下载asterisk

sudo apt-get install asterisk

2.配置sip.conf文件

sip.conf文件的目录默认在/etc/asterisk/下,修改之前最好备份一下,在/etc/目录下执行:

sudo cp ./asterisk/ ./asteriskbak -rf

在sip.conf文件中修改:

[general]
context=default 
; Note that the TCP and TLS support for chan_sip is currently considered
; experimental.  Since it is new, all of the related configuration options are
; subject to change in any release.  If they are changed, the changes will
; be reflected in this sample configuration file, as well as in the UPGRADE.txt file.
;
tcpenable=yes                    ; Enable server for incoming TCP connections (default is no)
;compactheaders = yes           ; send compact sip headers.
;
;videosupport=yes               ; Turn on support for SIP video. You need to turn this

文件最后添加用户:

[505]
videosupport=always
type = friend
username=505
secret = 505
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = mailbox
transport = udp
nat=yes
videosupport=always
maxcallbitrate=384
canreinvite=no
disallow=all
allow = ulaw
allow=alaw
allow=h263
allow=h264 
context=default
[506]
videosupport=always
type = friend
username=506
secret = 506
host = dynamic
canreinvite = no
dtmfmode = rfc2833
mailbox = mailbox
transport = udp
nat=yes
videosupport=always
maxcallbitrate=384
canreinvite=no
disallow=all
allow = ulaw
allow=alaw
allow=h263
allow=h264
context=default

中间省略了无需修改的内容。

2.配置extensions.conf文件

在extensions.conf文件中修改为:

[default]
;
; By default we include the demo.  In a production system, you
; probably don't want to have the demo there.
;
include => demo
exten => 505,1,Dial(SIP/505)
exten => 506,1,Dial(SIP/506)

3.启动asterisk

执行以下命令:

sudo asterisk

配置sip客户端

1.下载MicroSIP客户端

MicroSIP为windows运行程序

https://www.microsip.org/downloads

在这里插入图片描述

2. 配置MicroSIP客户端

点击图示,选择添加账号
在这里插入图片描述

之后的页面如图:

在这里插入图片描述
配置完之后如图,显示在线状态
在这里插入图片描述

域名和sip服务器一样都是,我的服务器IP为192.168.1.9,sip服务器端口一般都为5060
密码也是505,就是sip.conf中配置用户名密码。
相同的配置,在找局域网中的其他电脑将MicroSIP配置成506的账号即可
在这里插入图片描述
输入506点击红色方框进行视频通话

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值