简体   繁体   English

无法使用星号服务器实时进行 SIP 呼叫

[英]Unable to make SIP calls using realtime with asterisk server

I am unable to make SIP calls to a Realtime SIP peer,but i am able to receive calls from them.I have made some test users using the sip.conf file,the calling operations work fine when i use them.But when i call a realtime sip peer the server disconnects by itself.我无法向实时 SIP 对等方进行 SIP 呼叫,但我能够接听他们的呼叫。我使用 sip.conf 文件创建了一些测试用户,当我使用它们时,呼叫操作可以正常工作。但是当我打电话时服务器自行断开连接的实时 sip 对等点。

My sip peer is as follows:我的 sip peer 如下:

id 7006编号 7006
name edwin埃德温
canreinvite yes canreinvite 是的
context internal上下文内部
host dynamic主机动态
nat force_rport NAT force_rport
port 63806端口 63806
qualify no没有资格
secret 123秘密 123
type friend键入朋友
disallow all全部禁止
allow g729允许 g729
allow ilbc允许 ILBC
allow gsm允许GSM
allow ulaw允许法律
allow alaw允许阿拉
regseconds 1577676814 regseconds 1577676814
ipaddr 192.168.123.122 ipaddr 192.168.123.122
cancallforward yes cancallforward 是
avpf yes avpf 是的
allowguest no不允许客人
allowoverlap no允许重叠否
srvlookup yes srvlookup 是
localnet 192.168.1.0/255.255.255.0本地网 192.168.1.0/255.255.255.0
bindport 5060绑定端口 5060
bindaddr 0.0.0.0绑定地址 0.0.0.0
soft_skill 32软技能 32
rtcachefriends yes rtcachefriends 是
alwaysauthreject yes alwaysauthreject 是
session-timers refuse会话计时器拒绝

When i call this user from the user i made in my sip.conf file(shown below) the server disconnects automatically:当我从我在 sip.conf 文件(如下所示)中创建的用户那里调用这个用户时,服务器会自动断开连接:

[general]
context=internal
allowguest=no
allowoverlap=no
srvlookup=yes
bindport=5060
bindaddr=0.0.0.0
allow=ulaw
alwaysauthreject=yes
canreinvite=no
nat=force_rport
session-timers=refuse
localnet=192.168.1.0/255.255.255.0

[7001]
type=friend
host=dynamic
secret=123
qualify=yes
context=internal


[7002]
type=friend
host=dynamic
secret=456
qualify=yes
context=internal


[7003]
type=friend
host=dynamic
secret=789
qualify=yes
context=internal

I have enabled logging and the output is as follows:我已启用日志记录,输出如下:

console dial edwin@internal [Dec 30 03:40:46] WARNING[18968]: chan_oss.c:498 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory [Dec 30 03:40:46] NOTICE[18968]: console_video.c:136 console_video_start: voice only, console video support not present pranav*CLI> Disconnected from Asterisk server Asterisk cleanly ending (0).控制台拨号 edwin@internal [12 月 30 日 03:40:46] 警告 [18968]:chan_oss.c:498 setformat:无法重新打开 DSP 设备 /dev/dsp:没有这样的文件或目录 [12 月 30 日 03:40: 46] 通知 [18968]:console_video.c:136 console_video_start:仅语音,控制台视频不支持 pranav*CLI> 从 Asterisk 服务器断开连接 Asterisk 干净地结束 (0)。 Executing last minute cleanups执行最后一分钟清理

My Extensions table in my psql table is:我的 psql 表中的扩展表是:

"2";"internal";"edwin";2;"Dial";"SIP/edwin,60"
"1";"internal";"edwin";1;"Answer";" "
"3";"internal";"edwin";3;"Playback";"vm-nobodyavail"
"4";"internal";"edwin";4;"Hangup";" "

So,how do i fix this so that i can receive calls using the user 'edwin'?那么,我该如何解决这个问题,以便我可以使用用户“edwin”接听电话?

First of all, probably you are running a VM or said machine does not have a sound card, So it is not appropriate to use the console dial command .首先,可能你正在运行一个虚拟机或者说机器没有声卡,所以不适合使用控制台拨号命令 Instead dial from a softphone or use originate command like而是从软电话拨号或使用原始命令,如

originate SIP/edwin application wait 11

If it does not solve your problem then there are multiple things which can make a user unreachable.如果它不能解决您的问题,那么有多种因素会使用户无法访问。

  1. Ping both machines from each other to check if network is reachable互相ping两台机器以检查网络是否可达
  2. Make sure that can register option is enabled in client/softphone确保在客户端/软件电话中启用了可以注册选项
  3. Also test that asterisk can write to peer table.还要测试星号是否可以写入对等表。 these entries should be changed on every new registration attempt (try from different hosts)这些条目应该在每次新的注册尝试时更改(尝试从不同的主机)
port 63806
ipaddr 192.168.123.122
regseconds 1577676814
  1. Set qualify=yes to keep the registration/connection alive设置qualify=yes以保持注册/连接有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM