You are told by e-mail.
Moderator: Brekeke Support Team
You are told by e-mail.
1. Brekeke Product Name and version:
Brekeke SIP Server 2.4.8.6
2. Java version:
1.7.0_05
3. OS type and the version:
Linu 2.6.32-279.1.1.el6.x86_64
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
pattern1
6. Your problem:
Japanese was translated into English with translation software.
I think that there is a miswritten word.
Please read by warm heart.
:)
http://204.200.204.196/bbs_jp/viewtopic.php?t=8
When someone is called and there is no response, how to mail that there was a call is considered.
Made from PHP.
Will be displayed as "ERROR."
Brekeke SIP Server 2.4.8.6
2. Java version:
1.7.0_05
3. OS type and the version:
Linu 2.6.32-279.1.1.el6.x86_64
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :
pattern1
6. Your problem:
Japanese was translated into English with translation software.
I think that there is a miswritten word.
Please read by warm heart.
:)
http://204.200.204.196/bbs_jp/viewtopic.php?t=8
When someone is called and there is no response, how to mail that there was a call is considered.
Made from PHP.
Will be displayed as "ERROR."
Re: You are told by e-mail.
If "http://[userid]:[password]@localhost:[port]/path?query" is inputted by URL, it will be compulsorily sent to "http://localhost:[port]/gate?bean=sipadmin.web.Login".
* The right way of writing.
* The site etc. which are consulted.
Please let me know.
Thank you.
* The right way of writing.
* The site etc. which are consulted.
Please let me know.
Thank you.
Do you want to receive an e-mail notification if a callee doesn't pick a call?
I know the following Brekeke PBX's API allows you to create such a feature.
http://www.brekeke-sip.com/download/bpb ... _db_en.pdf
I know the following Brekeke PBX's API allows you to create such a feature.
http://www.brekeke-sip.com/download/bpb ... _db_en.pdf
> Do you want to receive an e-mail notification if a callee doesn't pick a call?
Yes.
> I know the following Brekeke PBX's API allows you to create such a feature.
Thank you for your information.
However, there is not MySQL in a SIP call log.
thinks by the method of running by PHP.
[code]
<?php
function http($url="http://[userid]:[password]@localhost:[port]/path?query", $method="GET", $headers="Brekeke", $post=array(""))
{
$URL = parse_url($url);
if (isset($URL['query'])) {
$URL['query'] = "?".$URL['query'];
} else {
$URL['query'] = "";
}
if (!isset($URL['port'])) $URL['port'] = 80;
$request = $method." ".$URL['path'].$URL['query']." HTTP/1.0\r\n";
$request .= "Host: ".$URL['host']."\r\n";
$request .= "User-Agent: PHP/".phpversion()."\r\n";
if (isset($URL['user']) && isset($URL['pass'])) {
$request .= "Authorization: Basic ".base64_encode($URL['user'].":".$URL['pass'])."\r\n";
}
$request .= $headers;
if (strtoupper($method) == "POST") {
while (list($name, $value) = each($post)) {
$POST[] = $name."=".urlencode($value);
}
$postdata = implode("&", $POST);
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: ".strlen($postdata)."\r\n";
$request .= "\r\n";
$request .= $postdata;
} else {
$request .= "\r\n";
}
$fp = fsockopen($URL['host'], $URL['port']);
if (!$fp) {
die("ERROR\n");
}
fputs($fp, $request);
$response = "";
while (!feof($fp)) {
$response .= fgets($fp, 4096);
}
fclose($fp);
$DATA = split("\r\n\r\n", $response, 2);
echo "<!--\n".$request."\n-->\n";
echo "<!--\n".$DATA[0]."\n-->\n";
echo $DATA[1];
}
http("http://localhost:[port]/gate?bean=sipadmin.web.LogViewer&operation=html&ymd=20120903");
?>
[/code]
Yes.
> I know the following Brekeke PBX's API allows you to create such a feature.
Thank you for your information.
However, there is not MySQL in a SIP call log.
thinks by the method of running by PHP.
[code]
<?php
function http($url="http://[userid]:[password]@localhost:[port]/path?query", $method="GET", $headers="Brekeke", $post=array(""))
{
$URL = parse_url($url);
if (isset($URL['query'])) {
$URL['query'] = "?".$URL['query'];
} else {
$URL['query'] = "";
}
if (!isset($URL['port'])) $URL['port'] = 80;
$request = $method." ".$URL['path'].$URL['query']." HTTP/1.0\r\n";
$request .= "Host: ".$URL['host']."\r\n";
$request .= "User-Agent: PHP/".phpversion()."\r\n";
if (isset($URL['user']) && isset($URL['pass'])) {
$request .= "Authorization: Basic ".base64_encode($URL['user'].":".$URL['pass'])."\r\n";
}
$request .= $headers;
if (strtoupper($method) == "POST") {
while (list($name, $value) = each($post)) {
$POST[] = $name."=".urlencode($value);
}
$postdata = implode("&", $POST);
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: ".strlen($postdata)."\r\n";
$request .= "\r\n";
$request .= $postdata;
} else {
$request .= "\r\n";
}
$fp = fsockopen($URL['host'], $URL['port']);
if (!$fp) {
die("ERROR\n");
}
fputs($fp, $request);
$response = "";
while (!feof($fp)) {
$response .= fgets($fp, 4096);
}
fclose($fp);
$DATA = split("\r\n\r\n", $response, 2);
echo "<!--\n".$request."\n-->\n";
echo "<!--\n".$DATA[0]."\n-->\n";
echo $DATA[1];
}
http("http://localhost:[port]/gate?bean=sipadmin.web.LogViewer&operation=html&ymd=20120903");
?>
[/code]
> Please explain how the code works.
Thank you for your replay.
OK.
For example, suppose that I call you.
01: I => You
02: However, you are absent.
You is not answered.
03: PHP reads call log of Brekeke SIP Server.
PHP finds Cancel or Time out by result of call log.
04: PHP tells you about "makoto call you, September 11." by e-mail.
05: You could know the call from me by E-mail.
Thank you for your replay.
OK.
For example, suppose that I call you.
01: I => You
02: However, you are absent.
You is not answered.
03: PHP reads call log of Brekeke SIP Server.
PHP finds Cancel or Time out by result of call log.
04: PHP tells you about "makoto call you, September 11." by e-mail.
05: You could know the call from me by E-mail.
[code]
<?php
/*
$url : URL which begins from http://( http://user:pass@host:port/path?query )
$method : GET, POST, or HEAD (a default is GET)
$headers : Arbitrary additional headers
$post : Arrangement which stored the data transmitted at the time of POST ("variable identifier" => "value")
*/
[/code]
<?php
/*
$url : URL which begins from http://( http://user:pass@host:port/path?query )
$method : GET, POST, or HEAD (a default is GET)
$headers : Arbitrary additional headers
$post : Arrangement which stored the data transmitted at the time of POST ("variable identifier" => "value")
*/
[/code]
[code]
function http($url="http://[userid]:[password]@localhost:[port]/path?query", $method="GET", $headers="Brekeke", $post=array(""))
{
/* URL is decomposed */
$URL = parse_url($url);
/* Query */
if (isset($URL['query'])) {
$URL['query'] = "?".$URL['query'];
} else {
$URL['query'] = "";
}
/* A default port is 80 */
if (!isset($URL['port'])) $URL['port'] = 80;
/* Request line */
$request = $method." ".$URL['path'].$URL['query']." HTTP/1.0\r\n";
/* Request header */
$request .= "Host: ".$URL['host']."\r\n";
$request .= "User-Agent: PHP/".phpversion()."\r\n";
/* The header for Basic attestation */
if (isset($URL['user']) && isset($URL['pass'])) {
$request .= "Authorization: Basic ".base64_encode($URL['user'].":".$URL['pass'])."\r\n";
}
/* An additional header */
$request .= $headers;
/* A header is added at the time of POST.
The data which carried out URL encoding is attached to an end. */
if (strtoupper($method) == "POST") {
while (list($name, $value) = each($post)) {
$POST[] = $name."=".urlencode($value);
}
$postdata = implode("&", $POST);
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: ".strlen($postdata)."\r\n";
$request .= "\r\n";
$request .= $postdata;
} else {
$request .= "\r\n";
}
/* Connects with a WEB server */
$fp = fsockopen($URL['host'], $URL['port']);
/* Processing when connection goes wrong */
if (!$fp) {
die("ERROR\n");
}
/* Demand data transmission */
fputs($fp, $request);
/* Response data reception */
$response = "";
while (!feof($fp)) {
$response .= fgets($fp, 4096);
}
/* Connection is ended */
fclose($fp);
/* A header portion and a body section are separated */
$DATA = split("\r\n\r\n", $response, 2);
/* A request header is commented out and it is an output */
echo "<!--\n".$request."\n-->\n";
/* A response header is commented out and it is an output */
echo "<!--\n".$DATA[0]."\n-->\n";
/* A message body is outputted */
echo $DATA[1];
}
http("http://localhost:[port]/gate?bean=sipadmin.web.LogViewer&operation=html&ymd=20120903");
/* Next, the schedule which puts in an e-mail transmitting script */
?>
[/code]
Thank you.
function http($url="http://[userid]:[password]@localhost:[port]/path?query", $method="GET", $headers="Brekeke", $post=array(""))
{
/* URL is decomposed */
$URL = parse_url($url);
/* Query */
if (isset($URL['query'])) {
$URL['query'] = "?".$URL['query'];
} else {
$URL['query'] = "";
}
/* A default port is 80 */
if (!isset($URL['port'])) $URL['port'] = 80;
/* Request line */
$request = $method." ".$URL['path'].$URL['query']." HTTP/1.0\r\n";
/* Request header */
$request .= "Host: ".$URL['host']."\r\n";
$request .= "User-Agent: PHP/".phpversion()."\r\n";
/* The header for Basic attestation */
if (isset($URL['user']) && isset($URL['pass'])) {
$request .= "Authorization: Basic ".base64_encode($URL['user'].":".$URL['pass'])."\r\n";
}
/* An additional header */
$request .= $headers;
/* A header is added at the time of POST.
The data which carried out URL encoding is attached to an end. */
if (strtoupper($method) == "POST") {
while (list($name, $value) = each($post)) {
$POST[] = $name."=".urlencode($value);
}
$postdata = implode("&", $POST);
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-Length: ".strlen($postdata)."\r\n";
$request .= "\r\n";
$request .= $postdata;
} else {
$request .= "\r\n";
}
/* Connects with a WEB server */
$fp = fsockopen($URL['host'], $URL['port']);
/* Processing when connection goes wrong */
if (!$fp) {
die("ERROR\n");
}
/* Demand data transmission */
fputs($fp, $request);
/* Response data reception */
$response = "";
while (!feof($fp)) {
$response .= fgets($fp, 4096);
}
/* Connection is ended */
fclose($fp);
/* A header portion and a body section are separated */
$DATA = split("\r\n\r\n", $response, 2);
/* A request header is commented out and it is an output */
echo "<!--\n".$request."\n-->\n";
/* A response header is commented out and it is an output */
echo "<!--\n".$DATA[0]."\n-->\n";
/* A message body is outputted */
echo $DATA[1];
}
http("http://localhost:[port]/gate?bean=sipadmin.web.LogViewer&operation=html&ymd=20120903");
/* Next, the schedule which puts in an e-mail transmitting script */
?>
[/code]
Thank you.
> Will be displayed as "ERROR."
From your PHP code, it seems the "ERROR" happens if the PHP program can not open the URL.
Make sure the URL is correct.
By the way, it seems your PHP program gets the call result through the web access.
Since PHP access will not be a real-time manner, I recommend you use the plugin which allow you to send an e-mail in real-time.
http://www.brekeke-sip.com/download/bss ... gin_en.txt
You can use "eventSessionEnd()" as a trigger for sending an e-mail.
From your PHP code, it seems the "ERROR" happens if the PHP program can not open the URL.
Make sure the URL is correct.
By the way, it seems your PHP program gets the call result through the web access.
Since PHP access will not be a real-time manner, I recommend you use the plugin which allow you to send an e-mail in real-time.
http://www.brekeke-sip.com/download/bss ... gin_en.txt
You can use "eventSessionEnd()" as a trigger for sending an e-mail.
Very match thank you.
> From your PHP code, it seems the "ERROR" happens if the PHP program can not open the URL.
> Make sure the URL is correct.
I know.
How should it input into URL? It thought.
> By the way, it seems your PHP program gets the call result through the web access.
Yes.
> Since PHP access will not be a real-time manner,
I know.
I'm looking for the software to run the PHP in real time.
> I recommend you use the plugin which allow you to send an e-mail in real-time.
Oh.......
Thank you for your information.
How do I process, such as subject and body etc?
Thank you.
> From your PHP code, it seems the "ERROR" happens if the PHP program can not open the URL.
> Make sure the URL is correct.
I know.
How should it input into URL? It thought.
> By the way, it seems your PHP program gets the call result through the web access.
Yes.
> Since PHP access will not be a real-time manner,
I know.
I'm looking for the software to run the PHP in real time.
> I recommend you use the plugin which allow you to send an e-mail in real-time.
Oh.......
Thank you for your information.
How do I process, such as subject and body etc?
Thank you.
Perhaps, there is a need to create a plug-in, I tried to make Email.java.
[code]
package com.brekeke.net.sip.sv.session.plugins;
import com.brekeke.net.sip.sv.session.*;
import com.brekeke.net.sip.sv.session.plugins.*;
public void eventSessionEnd( EventStat evstat )
int sid;
String callid;
String username;
String usernameAuth;
String urlCaller;
String tagCaller;
AddrPort apCaller;
String urlCallee;
String tagCallee;
AddrPort apCallee;
String methodStart;
long seqStart;
String methodEnd;
long seqEnd;
int senderEnd;
long timeSessionStart;
long timeSessionEnd;
long timeTalkStart;
long timeTalkEnd;
int result;
int errorcode;
[Class name]......
[/code]
If i make it this way is correct, what may be the same as PHP is more writing this?
And this E-mail.java may be saved at a plug-in folder?
Dial plan is......
Matching Patterns:
$request = ^INVITE
Deploy Patterns:
$session = [Class name]
$continue = true
[code]
package com.brekeke.net.sip.sv.session.plugins;
import com.brekeke.net.sip.sv.session.*;
import com.brekeke.net.sip.sv.session.plugins.*;
public void eventSessionEnd( EventStat evstat )
int sid;
String callid;
String username;
String usernameAuth;
String urlCaller;
String tagCaller;
AddrPort apCaller;
String urlCallee;
String tagCallee;
AddrPort apCallee;
String methodStart;
long seqStart;
String methodEnd;
long seqEnd;
int senderEnd;
long timeSessionStart;
long timeSessionEnd;
long timeTalkStart;
long timeTalkEnd;
int result;
int errorcode;
[Class name]......
[/code]
If i make it this way is correct, what may be the same as PHP is more writing this?
And this E-mail.java may be saved at a plug-in folder?
Dial plan is......
Matching Patterns:
$request = ^INVITE
Deploy Patterns:
$session = [Class name]
$continue = true
This is the Session Plugin document.
http://www.brekeke-sip.com/download/bss ... gin_en.txt
This is JavaMail API.
http://www.oracle.com/technetwork/java/ ... index.html
http://www.brekeke-sip.com/download/bss ... gin_en.txt
This is JavaMail API.
http://www.oracle.com/technetwork/java/ ... index.html
> This is the Session Plugin document.
http://www.brekeke-sip.com/download/bss ... gin_en.txt
> This is JavaMail API.
http://www.oracle.com/technetwork/java/ ... index.html
Thank you for guidance to site.
In these two, it will be beyond my understanding.
If it is you when good, do you show me "how it advances, makes and sets up" and the example of description, and get them?
I learn based on this example of description.
http://www.brekeke-sip.com/download/bss ... gin_en.txt
> This is JavaMail API.
http://www.oracle.com/technetwork/java/ ... index.html
Thank you for guidance to site.
In these two, it will be beyond my understanding.
If it is you when good, do you show me "how it advances, makes and sets up" and the example of description, and get them?
I learn based on this example of description.
If difficult, as suited first, it will be coped with by PHP.
How should it input in URL so that it can log in by "http://[localhost]:[port]/gate?bean=sipadmin.web.Login" without entering ID and a password? Please let me know.
Ex)
http://[ID].[Password]@[localhost]:[port]/gate?bean=sipadmin.web.Login
Thank you.
How should it input in URL so that it can log in by "http://[localhost]:[port]/gate?bean=sipadmin.web.Login" without entering ID and a password? Please let me know.
Ex)
http://[ID].[Password]@[localhost]:[port]/gate?bean=sipadmin.web.Login
Thank you.