Asterisk: Unsupported SDP media type in offer: video 0 RTP/AVP 0
I'm trying to use open source Java SIP client Jitsi to do video chat. To eliminate all network and proxy issues, I've setup my own SIP proxy Asterisk and both the clients are on the same LAN. I also configured Asterisk to either relay the RTP packets or do direct communications between the peers.
The above error is from Asterisk and on chan_sip.c:8915 (asterisk-10.0.0-beta). The Asterisk code checks against port 0.
I was stuck with the above problem. I can try to modify Jitsi code to not use port 0, but wondering if there's a better way and if port 0 is 开发者_如何学Pythona legal value to start with.
BTW, I was successful having 2 Xlite (commercial software from CounterPath) to transmit H263 videos between each other. I could not get Xlite to do so with Jitsi, nor to have both Jitsi clients send video.
I want to use a Java client as I'm much more adapt at Java. And I'm also hoping to be able to reuse the same codebase for Android in the future.
Port set to 0 is perfectly legal and part of SDP offer/answer model. In fact, it probably means that there was something wrong with your SDP offer. For example, if you support PCMA codec and the peer only support PCMU, he will reject the SDP offer with the port set to 0. There can be quite some reasons with the offer was rejected but codec incompatibility is probably the most common.
To really debug this if you want, you may need to look at the packets (with Wireshark for example).
You asked "... but wondering if there's a better way and if port 0 is a legal value to start with."
Port 0 is perfectly legal in SDP. In particular, SIP's offer/answer model in RFC 3264 section 5.1 says that
A port number of zero in the offer indicates that the
stream is offered but MUST NOT be used.
精彩评论