2016-03-24 102 views
0

如何從sipML5中的SIP邀請中刪除不必要的數據? 現在它發送到我的服務器時太大(只需要音頻)。它將接受最多1,500字節,並且它必須在UDP上。如何從SIP邀請中刪除不必要的數據在sipML5中

你能告訴我該怎麼做嗎?如何刪除一些編解碼器等?我對此一無所知,只是現在學習sipML。在其他職位有喜歡刪除編解碼器的答案,但沒有答案怎麼辦呢:)

我的邀請:

SEND: INVITE sip:[email protected]_address SIP/2.0 
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKRyhpzJOIUVBDwgMLxDIq1CAmXFZo2HkD;rport 
From: <sip:[email protected]_address>;tag=hpGTFTQ0Kpt6JFgsn8Bc 
To: <sip:[email protected]_address> 
Contact: "undefined"<sip:[email protected];rtcweb-breaker=no;click2call=no;transport=ws> 
Call-ID: 558d80b1-b383-344e-dea1-b95ddbe9dc3f 
CSeq: 30366 INVITE 
Content-Type: application/sdp 
Content-Length: 2247 
Max-Forwards: 70 

v=0 
o=- 3717615351353762000 2 IN IP4 127.0.0.1 
s=Doubango Telecom - chrome 
t=0 0 
a=group:BUNDLE audio 
a=msid-semantic: WMS HMFRvujnzsUIWdP6940nngmFOxrtVbMeG8nr 
m=audio 52548 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126 
c=IN IP4 91.241.5.1 
a=rtcp:11803 IN IP4 91.241.5.1 
a=candidate:2002913928 1 udp 2122260223 192.168.81.65 52691 typ host generation 0 
a=candidate:2002913928 2 udp 2122260222 192.168.81.65 58663 typ host generation 0 
a=candidate:4129950780 1 udp 1686052607 91.241.5.1 52548 typ srflx raddr 192.168.81.65 rport 52691 generation 0 
a=candidate:4129950780 2 udp 1686052606 91.241.5.1 11803 typ srflx raddr 192.168.81.65 rport 58663 generation 0 
a=candidate:971110008 1 tcp 1518280447 192.168.81.65 9 typ host tcptype active generation 0 
a=candidate:971110008 2 tcp 1518280446 192.168.81.65 9 typ host tcptype active generation 0 
a=candidate:4129950780 1 udp 1686052607 91.241.5.1 44693 typ srflx raddr 192.168.81.65 rport 52691 generation 0 
a=candidate:4129950780 2 udp 1686052606 91.241.5.1 47874 typ srflx raddr 192.168.81.65 rport 58663 generation 0 
a=candidate:4129950780 1 udp 1686052607 91.241.5.1 22880 typ srflx raddr 192.168.81.65 rport 52691 generation 0 
a=candidate:4129950780 2 udp 1686052606 91.241.5.1 19665 typ srflx raddr 192.168.81.65 rport 58663 generation 0 
a=ice-ufrag:FOoiTf25RFgO/bOx 
a=ice-pwd:ANc8oBQwW5zwBMd9lK2slJNN 
a=fingerprint:sha-256 78:A2:A4:13:11:A2:74:25:6E:B8:D4:9E:F3:1B:71:7E:A5:10:38:39:01:CC:93:C1:74:B3:96:25:71:C8:D2:5D 
a=setup:actpass 
a=mid:audio 
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level 
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time 
a=sendrecv 
a=rtcp-mux 
a=rtpmap:111 opus/48000/2 
a=fmtp:111 minptime=10; useinbandfec=1 
a=rtpmap:103 ISAC/16000 
a=rtpmap:104 ISAC/32000 
a=rtpmap:9 G722/8000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:8 PCMA/8000 
a=rtpmap:106 CN/32000 
a=rtpmap:105 CN/16000 
a=rtpmap:13 CN/8000 
a=rtpmap:126 telephone-event/8000 
a=maxptime:60 
a=ssrc:1519941870 cname:s8rO7shwZbHh0wyw 
a=ssrc:1519941870 msid:HMFRvujnzsUIWdP6940nngmFOxrtVbMeG8nr 38192f79-8fcc-45c9-b812-55e01c26364e 
a=ssrc:1519941870 mslabel:HMFRvujnzsUIWdP6940nngmFOxrtVbMeG8nr 
a=ssrc:1519941870 label:38192f79-8fcc-45c9-b812-55e01c26364e 

回答

0

不建議修改此就從JavaScript客戶端。您的服務器或WebRTC到SIP網關應自動解決此問題(通過在TCP上轉發或刪除不必要的行(如果只能在UDP上轉發))。

+0

因此,據我瞭解,我應該使網關連接sipML5與我的SIP服務器,並在我的網關,我將能夠從我的邀請中刪除不必要的線? (現在我只有sipML5到沒有任何網關的SIP服務器) –

+0

如果您的SIP服務器可以處理webrtc,那麼不需要網關。在這種情況下,如果SIP服務器必須在UDP上轉發,那麼它應該能夠轉換SIP信令。 – Istvan

+0

因此,當我沒有任何訪問SIP服務器,我得到的邀請'消息太大'的迴應,我需要一個網關的權利?或者也許有其他的可能性,使這個邀請更小使用sipML或改變它的tSDP? (不知道怎麼做tSDP) –

相關問題