Call files using the API? possible?

I want to create a web form that initiates callbacks. I am aware of freepbx’s commercial module, because I currently use it in an office and it works well.
In a new installation I cannot have the webserver open to the outside world so I would like to use a cloud based webserver hosting the form which in turn can create a call file on the local pbx using the API. Opening a port for the rest API is allowed :man_shrugging: . Is it possible to use the API to create and move the call file? I’ve been looking at the endpoints but can’t seem to find anything like this.
any help will be appreciated.
thanks.

So you want anyone on the Internet to have the capability to drop a random call file onto your server and have it dial the call? I’m not sure that’s an idea that’s been thought out completely.

What API are you wanting to use? There is a REST API that can do some limited stuff, plus there ARI and AMI, both of which can be used to manage the server.

Note that none of these methods are nearly secure enough to expose to the Wild West that is the Internet.

Historically, when you want to do something like this, you’d use AMI or ARI and let that initiate your calls. You don’t have to create a callfile that way. If you are really interested in creating callfiles for this application, you will need code running on the PBX, since it will need ‘root’ access to the server file system.

You should be good to go after that.

Hi Dave, thanks for the info.
I assumed that the REST API could include some type of authentication or in a worst case scenario we could set up some type of VPN with the cloud-based web server.
If that is not possible, the cloud-based server could maybe open an ssh connection and execute some scripts?

The intention is to use a web form to initiate a call back to the end user and then to put this call in a queue while avoiding having to open the FreePBX included web server to the outside world.

As far as resources, I have the freepbx distribution server, a cloud based machine, and their respective firewalls including VPNs if necessary. I also have access to people at the office who could write the required scripts, firewall rules, etc. What I am looking for, is tips on what the best way to build the solution would be. My idea was to use the API and callfiles but you’ve made it pretty clear that wasn’t a smart idea.

Any suggestions and tips are appreciated.
thanks in advance for any help you might provide.
amcoit

PS.- on a second stage, using freepbx VQPlus module I plan on having these web initiated callbacks use the virtual queue so that the end user doesnt have to wait on hold.

VQPlus does not work with web callback, there’s a separate module for that.

https://wiki.freepbx.org/display/FPG/Web+CallBack

Hi Itzik, I am not sure I understand what you mean. You mention there is a separate module for that, but the link you provide is to the web callback module…which doesnt mention viritual queues.
I dont see why queue pro (vqplus) would care how the call was initiated…whether with the web callback module or otherwise.
can you please clarify? I am kind of confused.
thanks.

I was referring to the part that you want a web page where customers can request a call.

Rest API module is not commercial.

I was referring to the web callback module.

I know the API is not commercial, I am just trying to figure out how to use it to generate a call.
thanks

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.