配置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客户端
点击图示,选择添加账号
之后的页面如图:
配置完之后如图,显示在线状态
文章来源:https://www.toymoban.com/news/detail-819083.html
域名和sip服务器一样都是,我的服务器IP为192.168.1.9,sip服务器端口一般都为5060
密码也是505,就是sip.conf中配置用户名密码。
相同的配置,在找局域网中的其他电脑将MicroSIP配置成506的账号即可
输入506点击红色方框进行视频通话文章来源地址https://www.toymoban.com/news/detail-819083.html
到了这里,关于asterisk配置实现sip服务器,进行sip视频通话的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!