为什么我的星号PBX没有注册扩展名,而是从sip.provider.ca注册sip行

时间:2015-06-02 16:31:19

标签: asterisk pbx

当从手机拨打到SIP外线号码416XXXXXXX时,呼叫将直接转到Ext语音邮件,然后发送到电子邮件。通话记录显示以下内容:

[2015-06-02 13:52:49] WARNING[13331][C-00000003]: func_channel.c:538 func_channel_read: Unknown or unavailable item requested: 'reversecharge'
[2015-06-02 13:52:49] WARNING[13331][C-00000003]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)

即使SIP提供商编号似乎注册正常,看起来我的注册扩展名。如果SIP线路注册但扩展没有注册,是否有明显的原因?请帮忙! THX!

"
asterisk-CLI> sip show registry 
Host                    dnsmgr Username       Refresh State    Reg.Time                 
sip.provider.ca:5060    N      416XXXXXXX     105 Registered   Tue, 02 Jun 2015 12:27:17
"
asterisk-CLI> sip show peers
Name/username             Host          Dyn Forcerport Comedia    ACL Port     Status                            
288                       (Unspecified) D   Yes        Yes         A  0        UNKNOWN                                      
in_416xxxxxxx/416xxxxxxx  209.x.x.x         Yes        Yes            5060     OK (26 ms)                                   
out_416xxxxxxx/416xxxxxxx 209.x.x.x         Yes        Yes            5060     OK (26 ms)

查看sip调试的日志,看起来像是获取CHANNEL扩展注册的问题。

cat debug_call_final | grep CHAN

"
-- Executing [416XXXXXXX@from-pstn:6] Set("SIP/in_416XXXXXXX-00000002", "CHANNEL(musicclass)=default") in new stack
-- Executing [s@macro-user-callerid:34] Set("SIP/in_416XXXXXXX-00000002", "CHANNEL(language)=en") in new stack
-- Executing [s@macro-dial-one:33] ExecIf("SIP/in_416XXXXXXX-00000002", "1?Set(CHANNEL(musicclass)=default)") in new stack
-- Executing [s@macro-dial-one:47] GosubIf("SIP/in_416XXXXXXX-00000002", "0?s-CHANUNAVAIL,1()") in new stack
-- Executing [s@macro-exten-vm:17] Set("SIP/in_416XXXXXXX-00000002", "SV_DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s@macro-exten-vm:20] Set("SIP/in_416XXXXXXX-00000002", "DIALSTATUS=CHANUNAVAIL") in new stack
-- Executing [s@macro-exten-vm:22] GotoIf("SIP/in_416XXXXXXX-00000002", "0?s-CHANUNAVAIL,1") in new stack
-- Executing [s@macro-exten-vm:23] Macro("SIP/in_416XXXXXXX-00000002", "vm,288,CHANUNAVAIL,") in new stack
-- Executing [s@macro-user-callerid:34] Set("SIP/in_416XXXXXXX-00000002", "CHANNEL(language)=en") in new stack
-- Executing [vmx@macro-vm:2] Set("SIP/in_416XXXXXXX-00000002", "MMODE=CHANUNAVAIL") in new stack
-- Executing [vmx@macro-vm:10] GotoIf("SIP/in_416XXXXXXX-00000002", "0?s-CHANUNAVAIL,1") in new stack
-- Executing [vmx@macro-vm:14] GotoIf("SIP/in_416XXXXXXX-00000002", "1?s-CHANUNAVAIL,1") in new stack
-- Goto (macro-vm,s-CHANUNAVAIL,1)
-- Executing [s-CHANUNAVAIL@macro-vm:1] Macro("SIP/in_416XXXXXXX-00000002", "get-vmcontext,288") in new stack
-- Executing [s-CHANUNAVAIL@macro-vm:2] VoiceMail("SIP/in_416XXXXXXX-00000002", "288@default,u") in new stack
== Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/in_416XXXXXXX-00000002' in macro 'vm'
"

2 个答案:

答案 0 :(得分:0)

(cause 20 - Subscriber absent)

这意味着您尝试发送呼叫的SIP电话未连接到Asterisk PBX。很明显,因为你正在接听电话,所以后备箱工作正常。

请在此处发布手机配置,以便我们查看。同时发布结果:

sip show peers

...在PBX CLI。

答案 1 :(得分:0)

当然可以! /etc/asterisk/sip_additional.conf

[250]
deny=0.0.0.0/0.0.0.0
secret=*****
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=pai
type=friend
nat=force_rport,comedia
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/250
permit=0.0.0.0/0.0.0.0
callerid=250-demo <250>
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[251]
deny=0.0.0.0/0.0.0.0
secret=*****
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=pai
type=friend
nat=force_rport,comedia
port=5060
qualify=yes
qualifyfreq=60
transport=udp,tcp,tls
avpf=no
force_avp=no
icesupport=no
encryption=no
callgroup=
pickupgroup=
dial=SIP/251
mailbox=251@default
permit=0.0.0.0/0.0.0.0
callerid=Softphone <251>
callcounter=yes
faxdetect=no
cc_monitor_policy=generic