According to XEP-176, <transport/> element in session-initiate may be empty of <candidates/>. It fixes call establishment with Psi+ client.

cusax-fix
Sebastien Vincent 15 years ago
parent de836f72c6
commit d160aba9c6

@ -279,12 +279,6 @@ public void processOffer(List<ContentPacketExtension> offer)
List<RTPExtension> rtpExtensions = intersectRTPExtensions(
offeredRTPExtensions, supportedExtensions);
// stream target
MediaStreamTarget target
= JingleUtils.extractDefaultTarget(content);
int targetDataPort = target.getDataAddress().getPort();
// transport
/*
* RawUdpTransportPacketExtension extends
@ -295,6 +289,17 @@ public void processOffer(List<ContentPacketExtension> offer)
= content.getFirstChildOfType(
IceUdpTransportPacketExtension.class);
// stream target
MediaStreamTarget target
= JingleUtils.extractDefaultTarget(content);
// according to XEP-176, transport element in session-initiate
// "MAY instead be empty (with each candidate to be sent as the
// payload of a transport-info message)".
int targetDataPort = (target == null && transport != null) ? -1 :
(target != null) ? target.getDataAddress().getPort() : 0;
/*
* TODO If the offered transport is not supported, attempt to
* fall back to a supported one using transport-replace.

Loading…
Cancel
Save