Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Call a PHP file
Author Message
britchey
Brekeke Junior Member


Joined: 21 May 2016
Posts: 7
Location: PA

PostPosted: Wed Jun 16, 2021 6:17 am    Post subject: Call a PHP file Reply with quote

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
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 241

PostPosted: Thu Jun 17, 2021 10:34 am    Post subject: Reply with quote

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
View user's profile
britchey
Brekeke Junior Member


Joined: 21 May 2016
Posts: 7
Location: PA

PostPosted: Fri Jun 18, 2021 7:04 am    Post subject: Reply with quote

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
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 241

PostPosted: Fri Jun 18, 2021 11:26 am    Post subject: Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1