Author |
Message |
britchey Brekeke Junior Member
Joined: 21 May 2016 Posts: 7
Location: PA
|
Posted: Wed Jun 16, 2021 6:17 am Post subject: Call a PHP file |
|
|
1. Brekeke Product Name and Version: 3.7.5.0 advanced
2. Java version: Version 8 (build 1.8.0_201-b09)
3. OS type and the version: Windows Server
4. UA (phone), gateway or other hardware/software involved:
5. Your problem: Is there a way to "call" execute a php file from a web server in the deploy pattern? _________________ britchey |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 242
|
Posted: Thu Jun 17, 2021 10:34 am Post subject: |
|
|
How about $webget?
https://docs.brekeke.com/sip/webget
It is a Matching Patterns's method but can be called from Deploy Pattern with %{$webget(HTTP-URI)}
For example, %{$webget("http://host.com/script.php")} |
|
Back to top |
|
britchey Brekeke Junior Member
Joined: 21 May 2016 Posts: 7
Location: PA
|
Posted: Fri Jun 18, 2021 7:04 am Post subject: |
|
|
Thanks for the reply. Would the dial plan look like this? Not sure how to configure the dial plan if a call is received by a specific ext, call the php file
Matching Patterns | $request = ^Invite To = sip:(111)@
| Deploy Patterns | To = %{$webget("http://host.com/script.php")}
|
_________________ britchey |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 242
|
Posted: Fri Jun 18, 2021 11:26 am Post subject: |
|
|
Put $webget in Matching Patterns. It will be called only if To-URI indicates sip:111@.
Matching Patterns | $request = ^Invite To = sip:(111)@ $webget("http://host.com/script.php") = (.*)
|
Do you need to use a result of PHP? |
|
Back to top |
|
|