Creating Phone Alarm and Message

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

Creating Phone Alarm and Message

Postby lyled » Wed Jul 29, 2015 11:57 am

I have been charged with creating an app for our Digium Phone system. At the same time each day, the phone is supposed to ring, display a specific message, then shut itself off. Before I dive into this and get lost in CodeLand, I am wondering if such a process is even POSSIBLE with this system? I've seen numerous articles on handling incoming calls, but none on a phone calling itself. Could someone with more experience than I let me know if I am chasing a lost cause here? Thanks!
lyled
Newsterisk
 
Posts: 2
Joined: Wed Jul 29, 2015 11:41 am

Re: Creating Phone Alarm and Message

Postby sruffell » Wed Jul 29, 2015 3:15 pm

Hmm... This sounds similar to the ringout test that petehanson did:

https://github.com/petehanson/ringout_test

Is that sort of the same thing you want to do? The tone you're going to play is because you dialed an extension that will auto answer and play the tone?
sruffell
Oldsterisk
 
Posts: 200
Joined: Fri Jan 07, 2011 2:02 pm

Re: Creating Phone Alarm and Message

Postby lyled » Fri Aug 07, 2015 6:33 am

It is a place to start. It looks as though this only dials one number, however, and I need this app to dial a whole series of numbers. Is there a way to pass an array of numbers, or perhaps use a loop to dial each number one after another?

window.setSoftkey(1, 'Test', function() {
// extension we're calling, either another line or a configured sound to play
var number = 404;
util.debug("calling number " + number);
// While we're placing this call, make sure we do not exit when put into the
// background. As soon as we're back in the foreground after placing the
// call we will clear this state so we shutdown normally.
digium.app.exitAfterBackground = false;

digium.event.observe({
'eventName': 'digium.app.foreground',
'callback': function(params) {
digium.event.stopObserving({'eventName' : 'digium.app.foregrond'});
digium.app.exitAfterBackground = true;
}
})
;

I'm sorry if these are obvious questions, but I'm from VB.NET land, and java is new to me...
lyled
Newsterisk
 
Posts: 2
Joined: Wed Jul 29, 2015 11:41 am


Return to Digium Phone API

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest