缺少音频/视频SDP问题

时间:2017-12-05 14:47:20

标签: ios audio video voip

我正在使用linphone iphone sdk开发IOS VOIP应用程序。

我也使用Asterisk PBX 12.6.1作为VOIP服务器。

我从A到B进行了音频通话。

我已经从星号服务器确认了SIP日志,而且Asterisk完全只获得了音频SDP。

但是当NAT发送给对等方的邀请消息时,我会看到来自邀请消息的视频SDP。

这意味着,当Invite消息通过NAT时,视频SDP被添加到Invite消息。

所以我拨打了电话,但被叫知道这是视频会议,因为存在视频SDP。

我如何找到解决方案?

谢谢。

以下是我看到的SIP日志。

INVITE sip:8611111111@myvoip.com SIP/2.0
Via: SIP/2.0/UDP 192.168.1.101:63787;branch=z9hG4bK.g2B2Eb9kT;rport
From: "8615524541202" <sip:8615524541202@myvoip.com>;tag=Z9ZmQR1UW
To: "xiu20170508" <sip:8611111111@myvoip.com>
CSeq: 20 INVITE
Call-ID: TmNmS3XX2H
Max-Forwards: 70
Supported: replaces, outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Content-Type: application/sdp
Content-Length: 763
Contact: <sip:8615524541202@NATIP:63787;transport=udp>;+sip.instance="<urn:uuid:ccc94acb-59d0-4048-8ccf-4795a8510248>"
User-Agent: iPhone.6.Plus_iOS10.3.3/3.16.4-83-g47dba0d2 (belle-sip/1.6.1)

v=0
o=8615524541202 4023 1235 IN IP4 NATIP
s=Talk
c=IN IP4 NATIP
b=AS:512
t=0 0
a=ice-pwd:2aa3fb71d33aaeabd9b709c5
a=ice-ufrag:11ed9d27
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
m=audio 7268 RTP/AVPF 96 0 8 18 101 97
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/48000
a=rtpmap:97 telephone-event/8000
a=candidate:1 1 UDP 2130706431 192.168.1.101 7268 typ host
a=candidate:1 2 UDP 2130706430 192.168.1.101 7269 typ host
a=candidate:2 1 UDP 1694498815 NATIP 7268 typ srflx raddr 192.168.1.101 rport 7268
a=candidate:2 2 UDP 1694498814 NATIP 7269 typ srflx raddr 192.168.1.101 rport 7269
a=rtcp-fb:* trr-int 5000
a=rtcp-fb:* ccm tmmbr


Found RTP audio format 96
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 18
Found RTP audio format 101
Found RTP audio format 97
Found audio description format opus for ID 96
Found unknown media description format telephone-event for ID 101
Found audio description format telephone-event for ID 97
Capabilities: us - (slin|g729|speex|h264|opus|vp8), peer - audio=(ulaw|alaw|g729|opus)/video=(nothing)/text=(nothing), combined - (g729|opus)


Reliably Transmitting (NAT) to NATIP:38594:
INVITE sip:8611111111@192.168.1.106:38594;transport=udp SIP/2.0
Via: SIP/2.0/UDP myvoip.com:5060;branch=z9hG4bK291104a5;rport
Max-Forwards: 70
From: "8615524541202" <sip:8615524541202@myvoip.com>;tag=as112aacc0
To: <sip:8611111111@192.168.1.106:38594;transport=udp>
Contact: <sip:8615524541202@myvoip.com:5060>
Call-ID: 7d258c10070c820c6da8c9632fb00067@myvoip.com:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.6.1
Date: Tue, 05 Dec 2017 14:26:53 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 1454

v=0
o=root 533584201 533584201 IN IP4 myvoip.com
s=Asterisk PBX 12.6.1
c=IN IP4 myvoip.com
b=CT:384
t=0 0
m=audio 10156 RTP/AVP 96 110 10 18 97
a=rtpmap:96 opus/48000/2
a=fmtp:96 maxplaybackrate=48000;sprop-maxcapturerate=48000;minptime=10;maxaveragebitrate=20000;stereo=0;sprop-stereo=0;cbr=0;useinbandfec=0;usedtx=0
a=rtpmap:110 speex/8000
a=rtpmap:10 L16/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=ptime:20
a=maxptime:60
a=ice-ufrag:1849182226f511bd0c82b340773eb664
a=ice-pwd:4078b4a75c3730c13ed92aa85e317bce
a=candidate:Hac1f1be6 1 UDP 2130706431 stunip 10156 typ host
a=candidate:S3642e9ba 1 UDP 1694498815 myvoip.com 10156 typ srflx
a=candidate:Hac1f1be6 2 UDP 2130706430 stunip 10157 typ host
a=candidate:S3642e9ba 2 UDP 1694498814 myvoip.com 10157 typ srflx
a=sendrecv
m=video 13866 RTP/AVP 100 99
a=ice-ufrag:364315c202baf54c125f661f1f1a1bf1
a=ice-pwd:50974e571f2e161023905c2540f88ec0
a=candidate:Hac1f1be6 1 UDP 2130706431 stunip 13866 typ host
a=candidate:S3642e9ba 1 UDP 1694498815 myvoip.com 13866 typ srflx
a=candidate:Hac1f1be6 2 UDP 2130706430 stunip 13867 typ host
a=candidate:S3642e9ba 2 UDP 1694498814 myvoip.com 13867 typ srflx
a=rtpmap:100 VP8/90000
a=rtcp-fb:* ccm fir
a=rtpmap:99 H264/90000
a=fmtp:99 redundant-pic-cap=0;parameter-add=0;packetization-mode=0;level-asymmetry-allowed=0
a=sendrecv

1 个答案:

答案 0 :(得分:0)

我解决了上述问题,我修复了星号服务器代码。

这是链接。

https://issues.asterisk.org/jira/browse/ASTERISK-27151