原帖由 yhfung 於 2009-7-7 09:29 發表 
單邊聲音問題,用nat=yes去解決
因為bubblestar兄的話機單邊聲音問題,我特意把我的SPA2100做factory reset後,PC port沒有做Bridge mode,沿用NAT mode,然後我用fixed IP接入SPA2100 WAN口。
在sip.conf文體裡,nat=no或者na ...
如果有用asterisk, 建議從以下方式解決
在asterisk console輸入
sip set debug on
rtp set debug on
在通話時, console會不斷出 訊息, 在哪個ip收到rtp訊息, 正常來說, 雙方通話時會應有兩個ip...
(for no re-invite only)
以下為example:
Sent RTP packet to 192.168.0.250:16422 (type 00, seq 030272, ts 186016, len 000160)
Got RTP packet from 192.168.0.250:16422 (type 00, seq 005591, ts 275746554, len 000160)
Sent RTP packet to 202.85.241.100:19930 (type 00, seq 061008, ts 275746552, len 000160)
Got RTP packet from 202.85.241.100:19930 (type 00, seq 014329, ts 1394316638, len 000080)
Got RTP packet from 202.85.241.100:19930 (type 00, seq 014330, ts 1394316718, len 000080)
Sent RTP packet to 192.168.0.250:16422 (type 00, seq 030273, ts 186176, len 000160)
Got RTP packet from 192.168.0.250:16422 (type 00, seq 005592, ts 275746714, len 000160)
Sent RTP packet to 202.85.241.100:19930 (type 00, seq 061009, ts 275746712, len 000160)
Got RTP packet from 202.85.241.100:19930 (type 00, seq 014331, ts 1394316798, len 000080)
Got RTP packet from 202.85.241.100:19930 (type 00, seq 014332, ts 1394316878, len 000080)
Sent RTP packet to 192.168.0.250:16422 (type 00, seq 030274, ts 186336, len 000160)
Got RTP packet from 192.168.0.250:16422 (type 00, seq 005593, ts 275746874, len 000160)
Sent RTP packet to 202.85.241.100:19930 (type 00, seq 061010, ts 275746872, len 000160)
Got RTP packet from 202.85.241.100:19930 (type 00, seq 014333, ts 1394316958, len 000080)
從以上得知, 192.168.0.250 和 202.85.241.100 (pennytel) 都能夠成功發送/接收asterisk發出的rtp資料..(岩岩順便試過用pccw/hkbn tracert 202.85.241.100, pccw連線能力及穩定性遠較hkbn好)
在sip header 中也會看到如下...
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 276
v=0
o=root 152398553 152398554 IN IP4 [SERVER PUBLIC IP]
s=LamSoft PBX
c=IN IP4 [SERVER PUBLIC IP]
t=0 0
m=audio 20006 RTP/AVP 0 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
asterisk 會正確告訴給peers知道用甚麼ip進行rtp訊息交換, 這兒那個[SERVER PUBLIC IP]不可能會是internal IP, 如果是的話, 要修改sip.conf的設定了 |