Search in sources :

Example 1 with SipException

use of android.net.sip.SipException in project XobotOS by xamarin.

the class SipPhone method dialInternal.

private Connection dialInternal(String dialString) throws CallStateException {
    clearDisconnected();
    if (!canDial()) {
        throw new CallStateException("cannot dial in current state");
    }
    if (foregroundCall.getState() == SipCall.State.ACTIVE) {
        switchHoldingAndActive();
    }
    if (foregroundCall.getState() != SipCall.State.IDLE) {
        //we should have failed in !canDial() above before we get here
        throw new CallStateException("cannot dial in current state");
    }
    foregroundCall.setMute(false);
    try {
        Connection c = foregroundCall.dial(dialString);
        return c;
    } catch (SipException e) {
        Log.e(LOG_TAG, "dial()", e);
        throw new CallStateException("dial error: " + e);
    }
}
Also used : CallStateException(com.android.internal.telephony.CallStateException) Connection(com.android.internal.telephony.Connection) SipException(android.net.sip.SipException)

Aggregations

SipException (android.net.sip.SipException)1 CallStateException (com.android.internal.telephony.CallStateException)1 Connection (com.android.internal.telephony.Connection)1