mozilla
Your Search Results

    MozMobileConnection.setCallForwardingOption()

    This article is in need of a technical review.

    Non-standard
    This feature is not on a current W3C standards track, but it is supported on the Firefox OS platform. Although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to Firefox OS apps.

    This API is available on Firefox OS for internal applications only.

    Summary

    The setCallForwardingOption method is used to configure call forward options.

    Syntax

    var request = navigator.mozMobileConnection.setCallForwardingOption(options);

    Parameters

    options
    An object containing the call forward rule to set. This object expects the same properties as those defined in the MozMobileCFInfo interface except for the active property which has no meaning when setting such a call forward rule.

    Return

    A DOMRequest object to handle the success or error of the method call.

    If the request fails, the request's error will be either RadioNotAvailable, RequestNotSupported, IllegalSIMorME, or GenericFailure.

    Example

    var options = {
      action      : MozMobileCFInfo.CALL_FORWARD_ACTION_ENABLE,
      reason      : MozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL,
      serviceClass: MozMobileConnectionInfo.ICC_SERVICE_CLASS_VOICE,
      number      : alternatePhoneNumber,
      timeSeconds : 5
    };
    
    var setOption = navigator.mozMobileConnection.setCallForwardingOption(options);
    
    setOption.onsuccess = function () {
      console.log('Options successfully set');
    }
    
    setOption.onerror = function () {
      console.log('Unable to set options: ' + this.error.name);
    }
    

    Specification

    Not part of any specification.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, kscarfone, fscholz, Jeremie
    Last updated by: fscholz,
    Hide Sidebar