To make the webhook when any incoming call per trunk.

freepbx
Tags: #<Tag:0x00007f7025dde018>

(Vntivanov) #1

Good afternoon. Is it possible with standard tools Freepbx to make webhook with callerid(curl && get || wget) when any incoming call per trunk? If not, what do we need extension? Thank you!


(Lorne Gaetz) #2

You can do this with Callerid Superfecta by configuring the “Send to URL” lookup source.


(Vincent) #3

After the webhook URL is pasted, How can i get the PBexct to fill in the fields where there are X’s.
I want to put the incoming phone number where the X’s are.
Example
https://domainname-api-1.service.windows.net/KEYSTRINGDATAHERE/dapi/IncomingCall?number=XXXXXXXXX&line=1

Thank you Igaetz and any others for your help with this and other past issues you helped with.


(Lorne Gaetz) #4

Tool tip tells you …

image

https://domain:port/KEYSTRINGDATAHERE/dapi/IncomingCall?number=[NUMBER]&line=1

(Vincent) #5

Thank you so much for your quick response.
I put that info in the inbound routes Zulu, link to url. but it didnt work.
I also have a cid superfetcha with send to URL active.
somehow the URL isn’t being executed by the pbx.
when i put my own cell phone number in place of [NUMBER] it doesnt work, but when i put the same url in my browser, my practice management software brings up the account asap.
Is there something I am missing for my PBexact to execute the URL when an inbound call happens?

https://wiki.freepbx.org/display/ZU/Call+Popups

${CALLERID(num)} <-- this seems to be the one to use
I tried with and without $, I tried the [NUMBER] token

what commands can I put into SSH to track if the system is trying to push out the data to that URL?


(Vincent) #6

How can I view what type of data is being sent to the webhook if at all any data?


(Vincent) #7

Update, Im not sure why it didnt work before, but now it does work. the [NUMBER] does send a 11 digit number. Now I am stuck on removing the 1 prefix and making it a 10 digit number my software understands.
I read this https://wiki.freepbx.org/display/FPG/CID+Superfecta+User+Guide
And tried different ways to change the CID Rules but am still troubleshooting this one.

I cant get the incoming zulu send to url to work, so Im just using cid superfetcha with send to URL.

Last update, I got it to work!
need to add this line in CID Rules 1|NXXXXXXXXX
then the 11 digit number is changed to a 9 digit number in the usa where 1 is usually the prefix. now it works! took a little troubleshooting.


(Lorne Gaetz) #8

Nice, I was just about to post the fix. Once you’ve defined a CID rule, then ALL inbound calls are required to match a rule or the scheme won’t be run. You prob want to throw in a catchall rule at the end:

1|NXXNXXXXXX
X.

(Vincent) #9

why the catchall rule “X.” If all phone numbers where I am start with 1, if i dont want any international calls, should I still use “X.”?


(Lorne Gaetz) #10

If you don’t want the Superfecta scheme to act on any other calls, you are fine to leave as is.