This is what I understand I have to do on each step. Please understand I am not very familiar with Linux yet.
-
Quote:
change your current working directory in /etc/asterisk
-
- Could you explain what to do here?
-
-
Quote:
create another context in extensions.conf, poiting to another a2billing agi script,
something like, for example:
[a2billing2]
exten => _X.,1,DeadAGI,a2billing2.php
exten => _X.,2,Wait,2
exten => _X.,3,Hangup
-
- I copy this to extensions.conf
-
Quote:
clone the a2b database
-
echo "GRANT ALL PRIVILEGES ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;" | mysql -ppassw0rd
mysqladmin create mya2billing2 -u a2billinguser -pa2billing
mysql mya2billing2 -u a2billinguser -pa2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.3.0.sql
-
-
Quote:
touch and give write access to the web server user to /etc/asterisk/additional_a2billing_sip2.conf and /etc/asterisk/additional_a2billing_iax2.conf
-
- touch /etc/asterisk/additional_a2billing_sip2.conf
- touch /etc/asterisk/additional_a2billing_iax2.conf
-
- chmod 666 /etc/asterisk/additional_a2billing_sip2.conf
- chmod 666 /etc/asterisk/additional_a2billing_iax2.conf
-
-
Quote:
copy /var/lib/asterisk/agi-bin/libs_a2billing in /var/lib/asterisk/agi-bin/libs_a2billing2
- Copied
-
Quote:
change the includes in /var/lib/asterisk/agi-bin/a2billing2.php from line 27 to 32
include_once (dirname(__FILE__)."/libs_a2billing/db_php_lib/Class.Table.php");
include (dirname(__FILE__)."/libs_a2billing2/Class.A2Billing.php");
include (dirname(__FILE__)."/libs_a2billing2/Class.RateEngine.php");
include (dirname(__FILE__)."/libs_a2billing2/phpagi_2_14/phpagi.php");
include (dirname(__FILE__)."/libs_a2billing2/phpagi_2_14/phpagi-asmanager.php");
include (dirname(__FILE__)."/libs_a2billing2/Misc.php");
-
Quote:
change the define in /var/lib/asterisk/agi-bin/libs_a2billing2/Class.A2Billing.php on line 21
define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');
-
-
-
Quote:
copy /var/www/A2Billing_UI in /var/www/A2Billing_UI2
- /var/www/html/A2Billing_UI copied to /var/www/html/A2Billing_UI2
-
Quote:
change the define in /var/www/A2Billing_UI2/lib/Class.A2Billing.php on line 21
define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');
-
Quote:
change the load_conf in /var/www/A2Billing_UI2/lib/defines.php on line 9
$A2B -> load_conf($agi, AST_CONFIG_DIR."a2billing2.conf", 1);
-
-
Quote:
copy /var/www/A2BCustomer_UI in /var/www/A2BCustomer_UI2
-
- /var/www/html/A2BCustomer_UI copied to /var/www/html/A2BCustomer_UI2
-
Quote:
change the define in /var/www/A2BCustomer_UI2/lib/Class.A2Billing.php on line 21
-
define('DEFAULT_A2BILLING_CONFIG', AST_CONFIG_DIR . '/a2billing2.conf');
-
Quote:
change the load_conf in /var/www/A2BCustomer_UI2/lib/defines.php on line 10
-
$A2B -> load_conf($agi, AST_CONFIG_DIR."a2billing2.conf", 1);
-
-
Quote:
add the lines:
#include additional_a2billing_sip2.conf
and
#include additional_a2billing_iax2.conf
to the /etc/asterisk/sip.conf file
- Added
-
-
Quote:
copy /etc/asterisk/a2billing.conf in /etc/asterisk/a2billing2.conf
- Copied
-
Quote:
and change the database section to point to the newly created a2b database
clone.
-
[database]
dbname = mya2billing2
-
Quote:
You may also want to change the 'backup_path' option,
buddy_sip_file and buddy_iax_file to something like
/etc/asterisk/additional_a2billing_sip2.conf and /etc/asterisk/additional_a2billing_iax2.conf,
-
- Don’t see this on the backup section
-
Quote:
force the 'context' option in the 'peer_friend' section to something like
'a2billing2'
-
context = a2billing2
-
Quote:
and, in general, change the other options to make them point to the new
clone.
- you may also want to force in 'readonly' some fields in the a2b customer
back-end,
to prevent them being changed by the reseller.
For example, if you want to force the context field of the sip friend, you can
add the 'readonly' attribute to the
/var/www/A2BCustomer_UI2/Public/form_data/FG_var_friend.inc file on line 296,
like that:
"size=40 maxlength=40 $CONTEXT_default readonly",
- Can’t find this in 1.3.3
-
-
Quote:
And, for example, if you want to change to 'readonly' also the buying
price field of all the rates,
you can change the
/var/www/A2BCustomer_UI2/Public/form_data/FG_var_def_ratecard.inc file on
line 130 like this:
"size=30 maxlength=20 readonly",
then do the same on lines 139 and 148
-
- Can’t find this in 1.3.3
-
-
Quote:
harden the a2b login routine, by editing, in every clone, the file:
~A2Billing_UI*/lib/module.access.php
and force a2b to re-check the credentials in every page, by adding,
around line 135, just before the "FUNCTIONS" part, this:
$DBHandle = DbConnect();
$return = login ($_SESSION["pr_login"], $_SESSION["pr_password"]);
if (!is_array($return) || $return[1]==0 ) {
header ("HTTP/1.0 401 Unauthorized");
Header ("Location: index.php?error=1");
die();
}
- Added
-