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.

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:sippeerssipusersiaxpeersiaxusersvoicemailmusiconholdqueues 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.

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

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.

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.

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.