Initiating calls thru cli or rest

Hello,

at the moment we use a Asterisk based system that has some features we want to keep after switching to FreePBX Distro 14 with Asterisk 13.
First funtion: We can initiate calls from our intranet. All Co-Workers are listet and we can just click on their number to call them. The intranet sends a command via restapi to the system and the system sets up a call and activates the telephone.
Second function: We can set call forwarding to co-workers or our cellphones thru the intranet. We can just click on a button and the intranet commands the system to set a CF.

Is this possible with Asterisk ARI, CLI or the freepbx rest api?

There are lots of ways to do this, including ARI and AMI calls. You can also set it up through the REST API. How you are doing it now may require minor tweaks or may require a wholesale rewrite. It depends on what you are doing now.

You can do this through several interfaces, including AMI/ARI/REST or UCP. You have a surfeit of solutions. What matters most is how you do it now.

In the large - anything you can do with a custom interface to Asterisk can be done the same way in FreePBX. FreePBX has Asterisk as its base, same as most of the rest of the solutions, so replicating some functionality from an existing Asterisk installation to FreePBX should be imminently possible.

So at the moment we are using REST API. Its a whole site where we can login and do a lot of things with GET and POST. We would like to stay on REST due to configuration we made already, but we just cant find similar functionality.
Example I can open my browser and go to asterisksystem.domain.de/services/extension/?target=313
and I will get a JSON with the Username etc.
How do I achieve this? I’m pretty sure that this is not possible with the system as it is today.

Not to put too fine a point on it, but where did you get the system you are using now, because it isn’t part of Asterisk. It’s an add-on that you got from somewhere.

If it was me (since I understand programming and how to make modules), I’d copy and paste the entire /var/www/html/services directory from your old system and put it on the new system. The worst that can happen is error messages. See what works, and see what doesn’t.

Right now, your point is “My custom proprietary system that is probably covered by a copyright has never been duplicated by anybody, but I won’t tell you where I got it or how it works. Give me something that’s the same.” It’s a pretty high bar to clear. We have no idea how you implemented the first system, so helping you with a new one is going to be a challenge.

Having said that, it also appears that you haven’t tried any of the options FreePBX has to offer. For example, UCP might be a good start to where you want to go. It might not do everything you need, but there’s no real good way for us to know that.

To be clear: FreePBX is an Open Source system that been used as the basis for many successful deployments over the past 10+ years. Companies that have stopped supporting their customers entirely have come and gone, and yet we’re still here. There is almost no reason why the system you are using now can’t be modified to work with the new Asterisk within the FreePBX GUI.

I dont want to put them on the spot here.
We bought our current system and we are paying a yearly fee for an amount of users. Soon they will change their license concept and we do not want to pay twice as much so…nuff said.
I like that copy and paste idea. I will give it a try.
I know its a pretty high bar but my first thought was: “It is an asterisk based system so how hard can it be to get these functions”. For Example the redirect/call forwarding function is simply one page where I can see all current active CF’s. If I want add one I just click “Add” and enter the 2 extention numbers.
UCP findmefollow works but only in user context. I havent found a way to set this upo as an admin.
We dont want to add User interaction at all. At the moment we are focusing on REST API / ARI and maybe Asterisk CLI over php.

Cool. There is a counter-argument to be made that telling them you are not willing to pay twice as much for the same level of service might also be a good choice, but that’s all cool.

They aren’t hard - there are just a thousand places where you can find attempts at this functionality. The form often follows a particular vendor’s interface requirements - in fact, that’s how UCP became the thing that it is.

Much of the FreePBX GUI is for administrators. A few User-level functions are exposed in UCP, but most of the things it sounds like you need are already available through the PBX’s GUI (which is little more than a management interface for Asterisk). Anything that you might need to extend the functionality of the “base” system is available through commercial modules and through other “GitHub” extensions that can be added to the system as the end-administrator.

We, in the community, form a strong alliance that operates independently of Sangoma. Many of us have worked on projects to extend the system in new and exciting ways that make the system better. In fact, some community projects have been picked up and extended as commercial modules or have been donated to the system. If you have a specific need (after you’ve looked at the FreePBX functionality), come and ask. Someone here with usually offer either a pointed to a specific commercial module, point you at a GitHub repo that does what you need, or help you build it. The rest of the folks here are pretty cool when it comes to helping out with “short-term” little projects like some of the things you are asking about.

So far I still dont know where to start.

I know what I want but I really dont know how to search github and add stuff to it. Im focusing on call forwarding thru php or ARI but I cant find real solutions to this.

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