Centos 来电失败星号

Centos 来电失败星号,centos,sip,voip,asterisk,pbx,Centos,Sip,Voip,Asterisk,Pbx,我在CentOS 6.4 x64上配置了星号11.7.0,配置如下sip.conf [general] register =>mynumber:mypass@xxx.xxx.xxx.xxx registertimeout=20 context=incoming allowoverlap=no bindport=5060 bindaddr=192.168.0.3 srvlookup=no subscribecontext=from-sip ; The SIP provider [VoIPP

我在CentOS 6.4 x64上配置了星号11.7.0,配置如下
sip.conf

[general]
register =>mynumber:mypass@xxx.xxx.xxx.xxx
registertimeout=20
context=incoming
allowoverlap=no
bindport=5060
bindaddr=192.168.0.3
srvlookup=no
subscribecontext=from-sip

; The SIP provider
[VoIPProvider]
canreinvite=no
username=mynumber
fromuser=mynumber
secret=mypass
context=incoming
type=friend
fromdomain=xxx.xxx.xxx.xxx
host=xxx.xxx.xxx.xxx
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
nat=yes
insecure=very

; ext 100
[100]
type=friend
host=dynamic
secret=MyPass123
context=internal
mailbox=100@default
callgroup=1
pickupgroup=1
dtmfmode=rfc2833
canreinvite=no

; ext 200
[200]
type=friend
host=dynamic
secret=MyPass123
context=internal
callgroup=1
pickupgroup=1
dtmfmode=rfc2833
canreinvite=no
以及下面的
extensions.conf

[incoming]
; Ring on extension 100, 200 and the mobile phone.
exten => s,1,Answer()
exten => s,n,Dial(SIP/100&SIP/200&SIP/VoIPProvider/*320423456789,150,r,t,)

; Pass unanswered call to a mobile phone
exten => s,n,Dial(SIP/VoIPProvider/*320423456789,150,r)

; Still not answered? Pass unanswered calls to voicemail
exten => s,n,Voicemail(100,u)
exten => s,n,Hangup

[outgoing]
exten => _XXXXXXXXXXXXXXX,1,Dial(SIP/VoIPProvider/${EXTEN})
exten => _XXXXXXXXXX,1,Dial(SIP/VoIPProvider/${EXTEN})
exten => _XXXXXX,1,Dial(SIP/VoIPProvider/${EXTEN})

[internal]
exten => _XXX,1,Dial(SIP/${EXTEN})

; Calls to ext 100
exten => 100,1,Dial(SIP/100,20)
exten => 100,n,VoiceMail(100,u)
exten => 100,n,Hangup

; Calls to ext 200
exten => 200,1,Dial(SIP/100,20)
exten => 200,n,Hangup
每当我用手机拨打我的号码时,我都会收到拒绝信号。当我检查wireshark日志时,我看到三个SIP数据包:

MySipProvider->Me:邀请sip:s@192.168.0.3:5060 Me->MySipProvider:401未经授权 MySipProvider->Me:ACK-sip:s@192.168.0.3:5060


这就是全部。会发生什么?谢谢。

看来您的星号服务器正在请求对您的提供商的来电进行身份验证。我想这是因为sip.conf中“VoIPProvider”条目上的“host”值与调用的IP地址匹配。您可以通过临时注释掉“host”值并查看传入呼叫是否工作来检查是否存在问题。如果是这样的话,您需要对“VoIPProvider”条目进行调整,使其仅与呼出电话相匹配,而不是与呼入电话和呼出电话相匹配(您以前是通过设置“type”来实现这一点的,但我现在不了解最新的操作方式)。

使用寄存器字符串,如下所示: 寄存器=>urusername:urpassword@IPaddress/提供者名称

比如你的情况:

寄存器=>mynumber:mypassword@X.X.X.X/VoIPProvider


试一试我想这会解决问题:)

要解决传出问题,您的用户上下文在internal中,传出未包含在其中,请在extension.conf的context internal下添加以下行

[内部] 包含=传出


以便您的用户可以拨打SIP中继。:)

我这样做了,现在来电不会引起问题,现在还有另一个问题:--执行[XXXXXXXXX@outgoing:1]在新堆栈中拨号(“SIP/XXX-00000002”、“SIP/VoIPProvider/XXXXXXXX”)[Jan 4 08:17:48]警告[19884][C-00000003]:应用程序拨号。C:2437拨号执行程序已满:无法创建“SIP”类型的频道(原因20-用户缺席)==此时每个人都很忙/拥挤(1:0/0/1)--自动故障排除,通道“SIP/XXX-00000002”状态为“CHANUNAVAIL”localhost*CLI>,这意味着,当我在某处呼叫时,命令行写入此文本并结束呼叫。。。有什么建议吗?谢谢