Trigger https call in flow

Hi Guru’s!

Would it be possible in the GUI to place a https call before a misc destination is called. So we would know that the PBX system called a misc destination and we can trigger other systems based on the https call.

Kind regards,

Inbound Route → Custom Destination → Return Destination → Misc Destination

;extensions_custom.conf
[trigger-http]
exten => s,1,Noop(Entering user defined context in extensions_custom.conf)
exten => s,n,Set(response=${SHELL(curl mydomain.con/somthing/${CALLERID(num)})})
exten => s,n,Return()
1 Like

Can also be done in the GUI with Dynamic Routes.

1 Like

https://wiki.freepbx.org/display/FPG/Dynamic+Routes+User+Guide

Thanks for your help I now build it like this:
The inbound route brings the caller to the dynamic route.
The dynamic route uses the source type url where I pass the [Number] and the [Input]
Then in my external system I put that into a log file and do some other things and return the [Input] in the body to PBX.
Then in the dynamic route I use the return body value to match and if it matches to ‘xxxx’ I trigger a misc destination.
When it doesn’t match I hangup

Cool solution thanks for your help!

1 Like