Freepbx https call via virtual extension or custom destination?

Running FreePBX at the moment and i want to know if its possible todo an url call somehow.
I want to call this url from a button on the phone.
We are running a Gira Homeserver that has endpoints enabled and i call those like this:

https://{ipserver}/endpoints/[email protected]_5_0&method=set&value=1&user={user}&pw={pw}

Now 2 questions:

  1. Is it possible to do this from Freepbx/Asterisk?
  2. The Homeserver has a self signed certificate, will Freepbx do that? or block it?

Nothing to it, you want a Custom Destination. Add something like the following to extensions_custom.conf:

exten => s,1,Noop(Entering user defined context [from-internal-Dujith] in extensions_custom.conf)
exten => s,n,Set(result=${CURL(url_goes-here)})
exten => s,n,Return

The create a Custom Destination with a goto string of from-internal-Dujith,s,1, select the return option and choose the destination where the call goes next after the URL is loaded. If you need a dialable feature code, that’s a Misc Application

Certs on the PBX are irrelevant. The only uncertainty in my mind is the special characters in the URL, the @ and {} may need to be escaped by preceding each with a \ character. .


I believe that you do have to disable certificate verification. See
search for ssl_verifypeer

@Stewart1 @lgaetz
Thank you very much i’ll get to work with this.

I had to add the line
same => n,Set(CURLOPT(ssl_verifypeer)=0)
to get it to accept the selfsigned cert. Thanks for the tip

That worked like a charm (with the ssl adjustment), i was wondering if there was a way to end this with a nice beep or something? right now it will just hangup.

Edit: Found it, still getting head wrapped around the non-gui stuff. But after rephrasing my question in google found this:
exten => s,n,Playback(confbridge-leave)
exten => s,n,Hangup

Thanks for the help! reading up on macro’s and stuff like that.

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