try to always indicate the address of the destination to the media service so that it could choose the most suitable local address for the sdp advertisement.

cusax-fix
Emil Ivov 20 years ago
parent 9734b860d2
commit 565f9b7516

@ -227,8 +227,33 @@ private CallSipImpl createOutgoingCall(Address calleeAddress)
.createCallSession(callParticipant.getCall());
((CallSipImpl)callParticipant.getCall())
.setMediaCallSession(callSession);
//if possible try to indicate the address of the callee so that the
//media service can choose the most proper local address to
//advertise.
javax.sip.address.URI calleeURI = calleeAddress.getURI();
InetAddress intendedDestination = null;
if(calleeURI.isSipURI())
{
String host = ((SipURI)calleeURI).getHost();
try
{
intendedDestination = InetAddress.getByName(host);
invite.setContent(
callSession.createSdpOffer(intendedDestination)
, contentTypeHeader);
}
catch (UnknownHostException ex)
{
logger.warn("Failed to obtain an InetAddress for "
+ host
, ex);
}
}
invite.setContent(
callSession.createSdpOffer()
callSession.createSdpOffer(intendedDestination)
, contentTypeHeader);
}
catch (ParseException ex)

Loading…
Cancel
Save