Asterisk API - call forward, speed dial, etc

General discussions about Asterisk.

Moderators: Moderator, Support

Asterisk API - call forward, speed dial, etc

Postby voipmuch » Mon Jan 04, 2016 10:46 pm

Hello,

I have searched everywhere and have not been able to find any details...

Please tell me there is an Asterisk Rest API that will allow us to get/set things like Call Forward (busy, no answer, unconditional), speed dial, voicemail password, etc...
voipmuch
Newsterisk
 
Posts: 8
Joined: Mon Feb 13, 2012 3:33 pm

Re: Asterisk API - call forward, speed dial, etc

Postby ambiorixg12 » Tue Jan 05, 2016 9:28 am

I dont know exactly what you are trying to do but :

AGI is analogous to CGI in Apache. AGI provides an interface between the Asterisk dialplan and an external program that wants to manipulate a channel in the dialplan. In general, the interface is synchronous - actions taken on a channel from an AGI block and do not return until the action is completed.


AMI provides a mechanism to control where channels execute in the dialplan. Unlike AGI, AMI is an asynchronous, event driven interface. For the most part, AMI does not provide mechanisms to control channel execution - rather, it provides information about the state of the channels and controls about where the channels are executing.


If you need something more powerful take look to ARI https://wiki.asterisk.org/wiki/pages/vi ... d=29395573
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic

Re: Asterisk API - call forward, speed dial, etc

Postby voipmuch » Tue Jan 05, 2016 9:45 am

Hi ambiorixg12,

Thanks for the reply.

We are not looking for any channel related function... I have found those details.

We are looking to get/set an user/extension call forward details.
We are looking to get/set an user/extension speed dial details.
We are looking to get/set an user/extension voicemail password.
etc..

Basically all user/extension based functions.
voipmuch
Newsterisk
 
Posts: 8
Joined: Mon Feb 13, 2012 3:33 pm

Re: Asterisk API - call forward, speed dial, etc

Postby ambiorixg12 » Tue Jan 05, 2016 9:57 am

RealTime with a web interface you can allow customers limited ability to edit their own dialplan without needing a reload.

RealTime support is currently available for the following families:
sippeers
sipusers
iaxpeers
iaxusers
voicemail
musiconhold
queues and queue_members (used together for the Queue application).
extensions NOTE: The family name for RealTime extensions can be whatever you want. Please read Asterisk RealTime Extensions for more info.

Take a look at http://www.voip-info.org/wiki/view/Asterisk+RealTime
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic

Re: Asterisk API - call forward, speed dial, etc

Postby malcolmd » Tue Jan 05, 2016 12:08 pm

voipmuch wrote:Hi ambiorixg12,

Thanks for the reply.

We are not looking for any channel related function... I have found those details.

We are looking to get/set an user/extension call forward details.
We are looking to get/set an user/extension speed dial details.
We are looking to get/set an user/extension voicemail password.
etc..

Basically all user/extension based functions.


I'll cut out the back-and-forth.

No, Asterisk's REST API does not provide calls that allow manipulating call forward, speed dial, or voicemail password.

Cheers
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Asterisk API - call forward, speed dial, etc

Postby voipmuch » Tue Jan 05, 2016 11:04 pm

Thank you for the replies.

OK... so to confirm, there is no way to set a call forward for a user except for the user to physically pickup the phone connected to Asterisk and dial the associated * feature?

Portals like Elastic and FreePBX seem to be able to do this somehow.
voipmuch
Newsterisk
 
Posts: 8
Joined: Mon Feb 13, 2012 3:33 pm

Re: Asterisk API - call forward, speed dial, etc

Postby ambiorixg12 » Tue Jan 05, 2016 11:44 pm

malcolmd wrote:

No, Asterisk's REST API does not provide calls that allow manipulating call forward, speed dial, or voicemail password.

Cheers


I think you can store the call forward details on a DataBase, then before dial to the extension query the database check if fwd is active, Based on the result you can do some GotoIf() or ExecIf() logic, also you can do something more sophisticated adding DEVICE_STATE() function
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic

Re: Asterisk API - call forward, speed dial, etc

Postby voipmuch » Tue Jan 05, 2016 11:55 pm

Thanks.... that would mean that the existing * codes to call forward already do that (or there would be no way for the phone * codes and the webportal to be in sync with each other. I will check the current .conf files and see where the * feature codes store and lookup this information, and go from there.
voipmuch
Newsterisk
 
Posts: 8
Joined: Mon Feb 13, 2012 3:33 pm

Re: Asterisk API - call forward, speed dial, etc

Postby malcolmd » Wed Jan 06, 2016 7:56 am

voipmuch wrote:Thank you for the replies.

OK... so to confirm, there is no way to set a call forward for a user except for the user to physically pickup the phone connected to Asterisk and dial the associated * feature?

Portals like Elastic and FreePBX seem to be able to do this somehow.


Because they're implementing logic inside of Asterisk's dialplan to accomplish it. You asked about a REST API. The REST API provided by Asterisk is designed to provide primitives to allow you to perform your own call control outside of the dialplan. If you're building your own call control, you're in charge of the features that you provide.
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Asterisk API - call forward, speed dial, etc

Postby malcolmd » Wed Jan 06, 2016 7:57 am

voipmuch wrote:Thanks.... that would mean that the existing * codes to call forward already do that (or there would be no way for the phone * codes and the webportal to be in sync with each other. I will check the current .conf files and see where the * feature codes store and lookup this information, and go from there.


If you're curious about whether or not Elastix or FreePBX implement external, REST API access to the various PBX features that they implement, it'd be better to look to those projects. I don't believe that they currently do.
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 4 guests