Search code examples
javascriptfirefoxmobilefirefox-os

How to make call on firefox OS phone programmatically


I'm getting started on firefox OS phone and I need a way to make a phone call programmatically.

I was going through the updated quick start guide https://developer.mozilla.org/en-US/Apps/Quickstart and there is no mention of how I could make a call programmatically.

Is there any part of the developer documents that covers this topic?


Solution

  • What about this code:

    var call = navigator.mozTelephony.dial('+1555332134');
    call.addEventListener('connected', function() {
       call.hangUp();
    });
    

    I got this from the book "Firefox OS in Action":

    http://manning.com/jongboom/FirefoxOSiA_MEAP_CH01.pdf