Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 397de169 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Android Git Automerger
Browse files

am fae5e289: am 6f67e7bf: am 2e383bc6: Merge "Making it possible to call SIP...

am fae5e289: am 6f67e7bf: am 2e383bc6: Merge "Making it possible to call SIP calls with special allowed chars."

* commit 'fae5e289':
  Making it possible to call SIP calls with special allowed chars.
parents 37c1bbb5 fae5e289
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import com.android.internal.telephony.PhoneNotifier;

import java.text.ParseException;
import java.util.List;
import java.util.regex.Pattern;

/**
 * {@hide}
@@ -386,8 +387,8 @@ public class SipPhone extends SipPhoneBase {
        Connection dial(String originalNumber) throws SipException {
            String calleeSipUri = originalNumber;
            if (!calleeSipUri.contains("@")) {
                calleeSipUri = mProfile.getUriString().replaceFirst(
                        mProfile.getUserName() + "@",
                String replaceStr = Pattern.quote(mProfile.getUserName() + "@");
                calleeSipUri = mProfile.getUriString().replaceFirst(replaceStr,
                        calleeSipUri + "@");
            }
            try {
+6 −2
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.List;
import java.util.regex.Pattern;

import javax.sip.ClientTransaction;
import javax.sip.Dialog;
import javax.sip.DialogTerminatedEvent;
@@ -215,9 +217,11 @@ class SipHelper {
            String tag) throws ParseException, SipException {
        FromHeader fromHeader = createFromHeader(userProfile, tag);
        ToHeader toHeader = createToHeader(userProfile);

        String replaceStr = Pattern.quote(userProfile.getUserName() + "@");
        SipURI requestURI = mAddressFactory.createSipURI(
                userProfile.getUriString().replaceFirst(
                userProfile.getUserName() + "@", ""));
                userProfile.getUriString().replaceFirst(replaceStr, ""));

        List<ViaHeader> viaHeaders = createViaHeaders();
        CallIdHeader callIdHeader = createCallIdHeader();
        CSeqHeader cSeqHeader = createCSeqHeader(requestType);