我有星號11.7.0在CentOS配置了以下sip.conf
配置6.4 x64系統:Asterisk的呼出失敗
[general]
register =>mynumber:[email protected]
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
[email protected]
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
當我嘗試從撥打我的手機號碼IP電話我在Asterisk CLI中看到以下輸出:
-- Executing [[email protected]:1] Dial("SIP/XXX-00000002", "SIP/VoIPProvider/XXXXXXXXX") in new stack
WARNING[19884][C-00000003]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'SIP/XXX-00000002' status is 'CHANUNAVAIL'
現在,我知道cause 20 - Subscriber absent
的含義,但我確信我的手機號碼存在並且可以接通,因爲當我從手機(來電)撥打IP電話的號碼時,它可以正常工作。
有什麼建議嗎?
謝謝,我覺得這會爲現在的工作,我會嘗試明天因爲我無法直接訪問VOIP電話,我正在通過遙控器上的控制檯進行檢查。 在控制檯錯誤消失,所以我認爲這是確切的建議。 – astralmaster
現在它總是不起作用。可能是我必須在主機和fromdomain中輸入不同的值? – astralmaster