Initiate repeating page from 3rd party windows application

freepbx
Tags: #<Tag:0x00007fafc148e0e0>

(Aaron Fry) #1

Can someone point me in the direction of how I would create an api call from a third party app that would initiate a page in FreePBX that would repeat until issuing a stop command? Or at least initiate a page that would repeat for say 3-5 minutes.

Thanks!


(Dave Burgess) #2

That’s a lot of cat to skin…

From a Windows App? Do you have control over the Windows app? Since it’s third party, I’m going to guess not. How does the program intend to initiate such a transaction? What choices are there in the system to make this thing start our thing?

If you can send it to an arbitrary web page, you could use ARI.
If you can send a file to the server, you could use a call file.
If you have to set up a receiver, you could do one or the other.

The tricky part after that is the repeating until an event. Does the program terminate the event? How? Do you need to write an app on the phone server to terminate the event?

Lots of cat to skin here.


(Aaron Fry) #3

Yes, I can configure the app. Call scripts, SQL scripts or queries, run commands. Send a file to the server? That one sounds interesting. What can you tell me about that?


(Dave Burgess) #4

The process is called “Call Files” and it’s basically a command file (using the same basic syntax as an ARI interface call) that initiates a call. You write it into the /usr/tmp directory, set the creation time on the file to when you want it to “go off”, then ‘mv’ the file to /usr/spool/asterisk/outbound (I think, you’re going to have to double-check that). As soon as the file arrives, the ‘date’ on the file is checked. If the date is NOW, or in the past, the file is run and a call to “whatever” (in this case, your page group) is initiated. How the call goes is dependent on a few things, but in general, it’s going to happen once.


(Aaron Fry) #5

Cool! So the repetition could be set on the initiating side in the script. Repeating N times at 15 second intervals or something. Nice. I will look into “Call Files”. Thank you!!


(Lorne Gaetz) #6

With paging pro you can trigger a scheduled page from the cli with

 fwconsole pagingpro --execute xxx

Where x’s is page grp number


(system) closed #7

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