Search:
OpenSER 1.1.x and SerWEB 0.9.4
OpenSER 1.1.x and SerWEB 0.9.4
To use SerWEB 0.9.4 with OpenSER 1.1.0 you have to apply the patch attached below. First download the serweb from http://ftp.iptel.org/pub/serweb/serweb-0.9.4.tar.gz.
Get the following patch (serweb-0.9.4-openser-1.1.0.patch):
diff -urN serweb-0.9.4.orig/config/config_data_layer.php serweb-0.9.4/config/config_data_layer.php
--- serweb-0.9.4.orig/config/config_data_layer.php 2005-06-28 12:32:24.000000000 +0300
+++ serweb-0.9.4/config/config_data_layer.php 2006-09-18 17:34:16.000000000 +0300
@@ -41,9 +41,9 @@
$i=0;
$config->data_sql->host[$i]['host']="localhost"; //database host
$config->data_sql->host[$i]['port']=""; //database port - leave empty for default
- $config->data_sql->host[$i]['name']="ser"; //database name
- $config->data_sql->host[$i]['user']="ser"; //database conection user
- $config->data_sql->host[$i]['pass']="heslo"; //database conection password
+ $config->data_sql->host[$i]['name']="openser"; //database name
+ $config->data_sql->host[$i]['user']="openser"; //database conection user
+ $config->data_sql->host[$i]['pass']="openserrw"; //database conection password
// If you want to configure additional backup SQL servers, do so below.
/*
@@ -147,7 +147,7 @@
$config->data_sql->table_message_silo="silo";
$config->data_sql->table_voice_silo="voice_silo";
$config->data_sql->table_user_preferences="usr_preferences";
- $config->data_sql->table_user_preferences_types="preferences_types";
+ $config->data_sql->table_user_preferences_types="usr_preferences_types";
$config->data_sql->table_providers="providers";
$config->data_sql->table_admin_privileges="admin_privileges";
$config->data_sql->table_speed_dial="speed_dial";
diff -urN serweb-0.9.4.orig/config/config_paths.php serweb-0.9.4/config/config_paths.php
--- serweb-0.9.4.orig/config/config_paths.php 2005-06-23 16:48:46.000000000 +0300
+++ serweb-0.9.4/config/config_paths.php 2006-09-18 17:58:17.000000000 +0300
@@ -40,7 +40,7 @@
/* serweb talks to SER via FIFO -- this is FIFO's name,
it must have the same value as SER's fifo config param
*/
- $config->fifo_server="/tmp/ser_fifo";
+ $config->fifo_server="/tmp/openser_fifo";
/* values used for names of reply fifos -- they change radnomly
this values shouldn't be changed unless you well know what are
diff -urN serweb-0.9.4.orig/data_layer/method.add_contact.php serweb-0.9.4/data_layer/method.add_contact.php
--- serweb-0.9.4.orig/data_layer/method.add_contact.php 2005-04-26 17:34:25.000000000 +0300
+++ serweb-0.9.4/data_layer/method.add_contact.php 2006-09-18 18:14:54.000000000 +0300
@@ -61,16 +61,7 @@
$contact."\n". //contact
$expires."\n". //expires
$config->ul_priority."\n". // priority
-
- ($config->ul_replication ? // if replication is supported by FIFO
- $replication."\n":
- "").
-
- ($config->ul_flags ? // if flags is supported by FIFO
- $flags."\n":
- "").
-
- "\n";
+ "0\n128\n4294967295\n"; // replication/flags/methods
$message=write2fifo($fifo_cmd, $errors, $status);
if ($errors) return false;
diff -urN serweb-0.9.4.orig/data_layer/method.add_new_alias.php serweb-0.9.4/data_layer/method.add_new_alias.php
--- serweb-0.9.4.orig/data_layer/method.add_new_alias.php 2005-05-03 14:15:02.000000000 +0300
+++ serweb-0.9.4/data_layer/method.add_new_alias.php 2006-09-18 18:16:18.000000000 +0300
@@ -108,16 +108,8 @@
$sip_address."\n". //contact
$expires."\n". //expires
$config->new_alias_q."\n". //priority
+ "0\n128\n4294967295\n"; // replication/flags/methods
- ($config->ul_replication ? // if replication is supported by FIFO
- $replication."\n":
- "").
-
- ($config->ul_flags ? // if flags is supported by FIFO
- $flags."\n":
- "").
-
- "\n";
$message=write2fifo($fifo_cmd, $errors, $status);
if ($errors) return false;
diff -urN serweb-0.9.4.orig/data_layer/method.get_acc_entries.php serweb-0.9.4/data_layer/method.get_acc_entries.php
--- serweb-0.9.4.orig/data_layer/method.get_acc_entries.php 2005-09-19 15:53:36.000000000 +0300
+++ serweb-0.9.4/data_layer/method.get_acc_entries.php 2006-09-18 17:47:17.000000000 +0300
@@ -301,18 +301,15 @@
$q = "(".$this->acc_sql['select_out'].", 'outgoing' as call_type ".
$this->acc_sql['from_1'].
$this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain').
- " and t1.caller_deleted != '1' ".
")";
else
$q = "(".$this->acc_sql['select_out'].", 'outgoing' as call_type ".
$this->acc_sql['from_1'].
$this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain').
- " and t1.caller_deleted != '1' ".
") union (".
$this->acc_sql['select_out'].", 'outgoing' as call_type ".
$this->acc_sql['from_2'].
$this->acc_sql['where_2']." and ".$this->get_indexing_sql_where_phrase($user, 't2.callee_UUID', 't2.username', 't2.domain').
- " and t2.callee_deleted != '1' ".
")";
return $q;
@@ -326,18 +323,15 @@
if ($config->users_indexed_by=='uuid'){
$q[] = "select count(*) ".
$this->acc_sql['from_1'].
- $this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain').
- " and t1.caller_deleted != '1' ";
+ $this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain');
}
else{
$q[] = "select count(*) ".
$this->acc_sql['from_1'].
- $this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain').
- " and t1.caller_deleted != '1' ";
+ $this->acc_sql['where_1']." and ".$this->get_indexing_sql_where_phrase($user, 't1.caller_UUID', 't1.username', 't1.domain');
$q[] = "select count(*) ".
$this->acc_sql['from_2'].
- $this->acc_sql['where_2']." and ".$this->get_indexing_sql_where_phrase($user, 't2.callee_UUID', 't2.username', 't2.domain').
- " and t2.callee_deleted != '1' ";
+ $this->acc_sql['where_2']." and ".$this->get_indexing_sql_where_phrase($user, 't2.callee_UUID', 't2.username', 't2.domain');
}
return $q;
}
diff -urN serweb-0.9.4.orig/html/main_prepend.php serweb-0.9.4/html/main_prepend.php
--- serweb-0.9.4.orig/html/main_prepend.php 2005-07-18 14:22:55.000000000 +0300
+++ serweb-0.9.4/html/main_prepend.php 2006-09-18 17:26:55.000000000 +0300
@@ -38,8 +38,8 @@
require_once 'DB.php';
//require PEAR XML_RPC class
-require_once 'XML/RPC.php';
-require_once ($_SERWEB["serwebdir"] . "xml_rpc_patch.php");
+//require_once 'XML/RPC.php';
+//require_once ($_SERWEB["serwebdir"] . "xml_rpc_patch.php");
//create log instance
if ($config->enable_loging){
External link to this patch http://www.openser-project.org/downloads/serweb-0.9.4-openser-1.1.0.patch.
Untar the serweb-0.9.4.tar.gz and patch it
tar xvfz serweb-0.9.4.tar.gz
cd serweb-0.9.4
patch -p1<serweb-0.9.4-openser-1.1.0.patch
Install serweb following the instructions from its distribution. The database required can be created via 'openser_mysql.sh create'. The default password for initial user is the default one for openser read/write database user.
The patch was not tested too much. Please report any misbehavior devel@openser.org and someone should help to fix it.

Page Changes
