voip4share เขียน:เช็คว่า Register ได้หรือเปล่าครับ เช็คโดยเข้า Asterisk Console แล้วพิมพ์คำสั่ง sip show registry ถ้ารีจิสเตอร์ไม่ได้ก็อาจเป็นที่ใส่ Username/Password ไม่ถูก
อาการ "Forbidden" นี่เกิดได้ 2 สาเหตุครับ ขั้นตอนการเช็คนะครับ
1 ถ้ายังไม่เคยโทรออกได้เลยแม้แต่ครั้งเดียว เกิดจากตอนคอนฟิก Trunk ของ True NetTalk ในไฟล์ sip.conf (หรือไฟล์อื่นที่ถูก include) ไม่ครบถ้วน โดยเฉพาะ 5 บรรทัดต่อไปนี้
fromdomain=61.90.255.132
outboundproxy=61.90.255.132
insecure=port,invite
realm=huawei
fromuser=98000003669
2 ถ้าเคยโทรออกได้แล้ว ก็อาจเป็นที่ใช้งานเกินที่เขาลิมิตไว้ครับ คือได้แค่ 1 concurrent ต่อ 1 account
ลองดูครับน่าจะเกิดจากสาเหตุใดสาเหตุหนึ่ง ลองเช็คทุกอย่างแล้วคิดว่าถูกต้อง แต่ยังไม่ได้อีก ก็รบกวนโพสต์มาใหม่นะครับ
[general]
context=default
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
tlsenable=no
tlsbindaddr=0.0.0.0
srvlookup=yes
maxexpiry=300
minexpiry=60
defaultexpiry=120
disallow=all
allow=g729
allow=g723
allow=alaw
allow=ulaw
canreinvite=no
nat=yes
realm=chokdeedimsum.com
callerid=chokdeedimsum
useragent=chokdeedimsum
sdpsession=chokdeedimsum
usereqphone=yes
dtmfmode=rfc2833
videosupport=no
t38pt_udptl=yes
t38pt_usertpsource=yes
registertimeout=60
registerattempts=0
canreinvite=no
pedantic=yes
#include sip_registers.conf
#include sip_trunks.conf
#include sip_clients.conf
[TrueVOIP]
host=61.90.255.132
fromdomain=61.90.255.132
outboundproxy=61.90.255.132
insecure=port,invite
realm=huawei
port=5060
username=98100006478
secret=password
type=peer
disallow=all
allow=g729
allow=g723
dtmfmode=rfc2833
fromuser=98100006478
context=default
call-limit=1
qualify=yes
[TrueVOIP2]
host=61.90.255.132
fromdomain=61.90.255.132
outboundproxy=61.90.255.132
insecure=port,invite
realm=huawei
port=5060
username=98100006479
secret=password
type=peer
disallow=all
allow=g729
allow=g723
dtmfmode=rfc2833
fromuser=98100006479
context=default
call-limit=1
qualify=yes[from-trunk-true-nettalk]
exten => _8X.,1,Goto(from-internal,100,1)
exten => _8X.,n,Hangup
exten => _9X.,1,Goto(from-internal,100,1)
exten => _9X.,n,Hangup
exten => _50X.,1,Dial(SIP/${EXTEN:1}@TrueVOIP,30,tT)
exten => _50X.,n,Dial(SIP/${EXTEN:1}@TrueVOIP2,30,tT)
exten => _50X.,n,Goto(1)
exten => _59[89]XXXXXXXXXX,1,Dial(SIP/${EXTEN:1}@true_nettalk,30,tT)
exten => _59[89]XXXXXXXXXX,n,Hangup
torsakj เขียน:ลองจาก Softphone สามารถใ้ช้งานได้ตามปกติครับ
มีอีกข้อสังเกตุนิดนึงครับ ผมลอง Sip reload แล้วดู sip show registry มันก็ register ปกติ
แต่ว่าดูผ่าน Wireshark มันขึ้นอย่างนี้ครับ
4105.210671 192.168.0.8 -> 61.90.255.132 SIP Request: REGISTER sip:61.90.255.132
4105.240938 61.90.255.132 -> 192.168.0.8 SIP Status: 200 OK (1 bindings)
4106.219975 192.168.0.8 -> 61.90.255.132 SIP Request: OPTIONS sip:61.90.255.132
4106.257595 61.90.255.132 -> 192.168.0.8 SIP Status: 403 Forbidden
4106.319903 192.168.0.8 -> 61.90.255.132 SIP Request: OPTIONS sip:61.90.255.132
4106.350186 61.90.255.132 -> 192.168.0.8 SIP Status: 403 Forbidden
qualify = yesU 192.168.0.8:5060 -> 61.90.255.132:5060
INVITE sip:0863278001@61.90.255.132 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.8:5060;branc
h=z9hG4bK018bdf39;rport..From: "170" <sip:98100006478@61.90.255.132>;tag=as22ab0025.
.To: <sip:0863278001@61.90.255.132>..Contact: <sip:98100006478@192.168.0.8>..Call-ID
: 2fd90c580e9a07dd278d9a2269313959@61.90.255.132..CSeq: 102 INVITE..User-Agent: VoIP
4Share..Max-Forwards: 70..Date: Tue, 09 Mar 2010 09:06:12 GMT..Allow: INVITE, ACK, C
ANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Content-Type: ap
plication/sdp..Content-Length: 303....v=0..o=root 4527 4527 IN IP4 192.168.0.8..s=se
ssion..c=IN IP4 192.168.0.8..t=0 0..m=audio 18836 RTP/AVP 18 4 101..a=rtpmap:18 G729
/8000..a=fmtp:18 annexb=no..a=rtpmap:4 G723/8000..a=fmtp:4 annexa=no..a=rtpmap:101 t
elephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendr
ecv..
#
U 61.90.255.132:5060 -> 192.168.0.8:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.0.8:5060;received=124.157.137.171;branc
h=z9hG4bK018bdf39;rport=23610..From: "170" <sip:98100006478@61.90.255.132>;tag=as22a
b0025..To: <sip:0863278001@61.90.255.132>..Call-ID: 2fd90c580e9a07dd278d9a2269313959
@61.90.255.132..CSeq: 102 INVITE....
#
U 61.90.255.132:5060 -> 192.168.0.8:5060
SIP/2.0 403 Forbidden..Via: SIP/2.0/UDP 192.168.0.8:5060;received=124.157.137.171;br
anch=z9hG4bK018bdf39;rport=23610..From: "170" <sip:98100006478@61.90.255.132>;tag=as
22ab0025..To: <sip:0863278001@61.90.255.132>;tag=aprqngfrt-r754cn10000c6..Call-ID: 2
fd90c580e9a07dd278d9a2269313959@61.90.255.132..CSeq: 102 INVITE....
#
U 192.168.0.8:5060 -> 61.90.255.132:5060
ACK sip:0863278001@61.90.255.132 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.8:5060;branch=z
9hG4bK018bdf39;rport..From: "170" <sip:98100006478@61.90.255.132>;tag=as22ab0025..To
: <sip:0863278001@61.90.255.132>;tag=aprqngfrt-r754cn10000c6..Contact: <sip:98100006
478@192.168.0.8>..Call-ID: 2fd90c580e9a07dd278d9a2269313959@61.90.255.132..CSeq: 102
ACK..User-Agent: VoIP4Share..Max-Forwards: 70..Content-Length: 0....
#
U 192.168.0.8:5060 -> 61.90.255.132:5060
INVITE sip:0863278001@61.90.255.132 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.8:5060;branc
h=z9hG4bK625a0c80;rport..From: "170" <sip:98100006479@61.90.255.132>;tag=as42577f55.
.To: <sip:0863278001@61.90.255.132>..Contact: <sip:98100006479@192.168.0.8>..Call-ID
: 6810e7c06d02603121f2e87f11906df4@61.90.255.132..CSeq: 102 INVITE..User-Agent: VoIP
4Share..Max-Forwards: 70..Date: Tue, 09 Mar 2010 09:06:12 GMT..Allow: INVITE, ACK, C
ANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Supported: replaces..Content-Type: ap
plication/sdp..Content-Length: 303....v=0..o=root 4527 4527 IN IP4 192.168.0.8..s=se
ssion..c=IN IP4 192.168.0.8..t=0 0..m=audio 13384 RTP/AVP 18 4 101..a=rtpmap:18 G729
/8000..a=fmtp:18 annexb=no..a=rtpmap:4 G723/8000..a=fmtp:4 annexa=no..a=rtpmap:101 t
elephone-event/8000..a=fmtp:101 0-16..a=silenceSupp:off - - - -..a=ptime:20..a=sendr
ecv..
#
U 61.90.255.132:5060 -> 192.168.0.8:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP 192.168.0.8:5060;received=124.157.137.171;branc
h=z9hG4bK625a0c80;rport=23614..From: "170" <sip:98100006479@61.90.255.132>;tag=as425
77f55..To: <sip:0863278001@61.90.255.132>..Call-ID: 6810e7c06d02603121f2e87f11906df4
@61.90.255.132..CSeq: 102 INVITE....
#
U 61.90.255.132:5060 -> 192.168.0.8:5060
SIP/2.0 403 Forbidden..Via: SIP/2.0/UDP 192.168.0.8:5060;received=124.157.137.171;br
anch=z9hG4bK625a0c80;rport=23614..From: "170" <sip:98100006479@61.90.255.132>;tag=as
42577f55..To: <sip:0863278001@61.90.255.132>;tag=aprqngfrt-u1c52730000c6..Call-ID: 6
810e7c06d02603121f2e87f11906df4@61.90.255.132..CSeq: 102 INVITE....
#
U 192.168.0.8:5060 -> 61.90.255.132:5060
ACK sip:0863278001@61.90.255.132 SIP/2.0..Via: SIP/2.0/UDP 192.168.0.8:5060;branch=z
9hG4bK625a0c80;rport..From: "170" <sip:98100006479@61.90.255.132>;tag=as42577f55..To
: <sip:0863278001@61.90.255.132>;tag=aprqngfrt-u1c52730000c6..Contact: <sip:98100006
479@192.168.0.8>..Call-ID: 6810e7c06d02603121f2e87f11906df4@61.90.255.132..CSeq: 102
ACK..User-Agent: VoIP4Share..Max-Forwards: 70..Content-Length: 0....ย้อนกลับไปยัง Asterisk SIP Server
กำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และ บุคคลทั่วไป 0 ท่าน