Make own interface for calling

Is there a way that, from an app, you can dial a number and display your own calling interface instead of the phone jumping out of the application and into the phones interface.

I know how to already stop the app from going into the background, but it doesnt solve the fact that the call interface is still on the phone interface and not my apps. Any ideas here?


Hi, If I understand correctly you have your app’s interface in the foreground, and then you call to initiate a call, and then the “standard” interface pops up and puts your app in the background. If this is the case you can call digium.foreground(‘yourAppName’); which will put your app back in the foreground. I beleive you will need to set your app not to exit when put in background using “ = false”.

Hope this helps


So then after it loads back up I would then do a window.clear() and then add in whatever calling widget I create to do the calling interface? Eventhough there is another call interface running behind the app from the phone?

Also I have a question about the callHandlers.

When I do:{
‘number’ : 2,
‘handler’ : function (obj) {
How do you save the call handler so that later you can use the:{
‘callHandle’ : ,
‘handler’ : function(obj) {


for the call handle it is returned by so you can do something like this:

var my_call_handle = params);

then use it as the param to hangup:{‘callHandle’ : my_call_handle});

For the other part of your question I’m not sure 100%, but I beleive that something in the phones code will background our apps once in a while. So when you bring it back to the foreground using digium.foreground(‘yourapp’), I think it will have the exact same state as before it was backgrounded.

I’m currently implementing a timer that should keep my app in the foreground at all times. I will update you with the result when I get it working.



looks like its working here is what I’m doing so far:

I create a function like this:
function foregroundMyApp() {

    foreground_timer = setTimeout(function() { foregroundMyApp();}, 8000);


Once my apps main window is created I call the above function which puts my app in the foreground every 8 seconds. Not sure if the clearInterval is necessary but I beleive that the timer only fires a single event but really not sure on this part here, I will be testing it though.



Thanks for the info on the callHandler.

Wouldn’t putting it in the foreground every 8 seconds make it display the “Loading…” and flash the screen every 8 seconds?

probably if you dont set this: = false;

then the app will stop executing when its put in the background.