summaryrefslogtreecommitdiffstats
path: root/voip
diff options
context:
space:
mode:
authorrepo sync <cywang@google.com>2011-06-28 04:50:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-28 04:50:33 -0700
commitd9f10ab6fe10a4eb42bd0ed59d2abbe5816164dc (patch)
tree6126ddf13d46d3460d6e2317edadb0c1184a8cd1 /voip
parent4687cbc48d710069d65086c7e8b600edb01e1255 (diff)
parent2093561a58e602450f6e4f2aae4831edd1b840f4 (diff)
downloadframeworks_base-d9f10ab6fe10a4eb42bd0ed59d2abbe5816164dc.zip
frameworks_base-d9f10ab6fe10a4eb42bd0ed59d2abbe5816164dc.tar.gz
frameworks_base-d9f10ab6fe10a4eb42bd0ed59d2abbe5816164dc.tar.bz2
Merge "Support INVITE w/o SDP."
Diffstat (limited to 'voip')
-rw-r--r--voip/java/android/net/sip/SipAudioCall.java3
-rw-r--r--voip/java/com/android/server/sip/SipSessionGroup.java8
2 files changed, 10 insertions, 1 deletions
diff --git a/voip/java/android/net/sip/SipAudioCall.java b/voip/java/android/net/sip/SipAudioCall.java
index 2666b69..c1affa6 100644
--- a/voip/java/android/net/sip/SipAudioCall.java
+++ b/voip/java/android/net/sip/SipAudioCall.java
@@ -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 =
diff --git a/voip/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java
index 6304369..c0c1b28 100644
--- a/voip/java/com/android/server/sip/SipSessionGroup.java
+++ b/voip/java/com/android/server/sip/SipSessionGroup.java
@@ -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