API call *xxx

Hi, i am running Freepbx 2.11.0.43 (i know its old)
looking for a way to run an API call for example when i dial *222 .

in my case it will trigger my front door to unlock in my access control system.
this can be done by calling a URL. (GET API CALL)

maybe a misc Destination or something like that?

or is there a better way to do this?

here you go

its about as old as your PBX so should work :slight_smile:

1 Like

Custom destination below you would use with a dial string of: open-door,s,1

[open-door]
exten => s,1,noop(Entering user defined context [open-door] as defined in extensions_custom.conf)
exten => s,n,Set(bar=${CURL(https://url_goes_here.com))
exten => s,n,NoOp(API RESPONSE: ${bar})
exten => s,n,Hangup
2 Likes

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