Digium.Phone.Dial isn't working for me

I have hooked up my observer so that I can receive commands from AMI DPMA, and now I can answer a ringing call by sending a message from the server - which is great

The next thing I want to be able to do though is make a call - so the call starts the ‘normal’ way ie from the phone rather than Asterisk making the call and sending it to the phone.

According to the examples etc, the following should work - but it doesnt

var newCall = digium.phone.dial({ ‘number’: ‘240’ });

Also, I dont seem to get anything in the ‘View Debug Log’ window - the window itself shows but it never has anything in it

I have tried using util.debug and also print - neither of them produce any output in the debug log

Unless there is something else going on in your setup, I can see that this works in mine.

For example if I update the helloworld.js app to:

var app = require('app');
var util = require('util');
var screen = require('screen'); screen.clear();
var hello = new Text(0, 0, window.w, Text.LINE_HEIGHT, 'Hello World');

digium.app.exitAfterBackground = false;

digium.phone.dial({number:'1337', handler: function(obj) {util.debug(obj.state);}});

And run it I get the following in a log window:

sruffell@sruffell-desktop:~/digium-phone-apps/helloworld$ ./update.sh log
+Done loading util.js
Could not load app specific language keys for fallback lang: en_us
Could not load app specific language keys for lang: en_us

Does the above work in your environment?

Thanks for your detailed response.

Unfortunately it is still not working for me - the dial doesnt work even though I literally copied your line of code and changed the phone number

Also I still get nothing in the debug log - what browser are you using ?

Just to elaborate, I have other code in my js file which is keeping track of incoming calls and I can send a command through to trigger the digium.phone.answer command and that works fine - so the script is valid and running etc in case you were wondering.

I am running a D40 with 1_4_2_0_63880 firmware, and my browser is chrome but I have tried with IE11 as well

I’m actually not using a browser, but just showing the log in a command window using update.sh in the helloworld example.

Ok, I’ll try it out tomorrow with a D40 and your firmware to see what I can see. The quick test I did above was with a D70 and firmware version 1_3_3_0_55755 which is what I have running on my home desk phone.


Just used curl to see the output - curl works

and once I did that I could see my make call event wasnt even hooked up - damn that case sensitivity

all good now - thanks very much for your efforts and assistance