Call a PHP file

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
britchey
Posts: 7
Joined: Sat May 21, 2016 7:47 pm
Location: PA

Call a PHP file

Post by britchey »

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
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

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")}
britchey
Posts: 7
Joined: Sat May 21, 2016 7:47 pm
Location: PA

Post by britchey »

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 Pattern
$request=^Invite
To = sip:(111)@

Deploy Pattern
To = %{$webget("http://host.com/script.php")}
britchey
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

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?
Post Reply