Merge "Support INVITE w/o SDP."
This commit is contained in:
@@ -26,6 +26,7 @@ import android.net.sip.SimpleSessionDescription.Media;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -400,6 +401,7 @@ public class SipAudioCall {
|
||||
@Override
|
||||
public void onRinging(SipSession session,
|
||||
SipProfile peerProfile, String sessionDescription) {
|
||||
// this callback is triggered only for reinvite.
|
||||
synchronized (SipAudioCall.this) {
|
||||
if ((mSipSession == null) || !mInCall
|
||||
|| !session.getCallId().equals(
|
||||
@@ -730,6 +732,7 @@ public class SipAudioCall {
|
||||
}
|
||||
|
||||
private SimpleSessionDescription createAnswer(String offerSd) {
|
||||
if (TextUtils.isEmpty(offerSd)) return createOffer();
|
||||
SimpleSessionDescription offer =
|
||||
new SimpleSessionDescription(offerSd);
|
||||
SimpleSessionDescription answer =
|
||||
|
||||
@@ -1007,7 +1007,13 @@ class SipSessionGroup implements SipListener {
|
||||
throws SipException {
|
||||
// expect ACK, CANCEL request
|
||||
if (isRequestEvent(Request.ACK, evt)) {
|
||||
establishCall(false);
|
||||
String sdp = extractContent(((RequestEvent) evt).getRequest());
|
||||
if (sdp != null) mPeerSessionDescription = sdp;
|
||||
if (mPeerSessionDescription == null) {
|
||||
onError(SipErrorCode.CLIENT_ERROR, "peer sdp is empty");
|
||||
} else {
|
||||
establishCall(false);
|
||||
}
|
||||
return true;
|
||||
} else if (isRequestEvent(Request.CANCEL, evt)) {
|
||||
// http://tools.ietf.org/html/rfc3261#section-9.2
|
||||
|
||||
Reference in New Issue
Block a user