The current a2billing doesn't support the call forwarding and incoming call rating. Hence, we will have to write our own rating engine and also update the a2billing tables according.
Based on the following SQL, we shall able to identify all the call fowarding traffic but then it has to be match to the individual calling number to determine the account no.
mysql> select calldate, dst, dcontext, dst, billsec, (billsec/60) into outfile "/tmp/DS20141005_04" FIELDS TERMINATED BY '|' from cdr where channel like '%from-internal%' and dcontext = "from-internal" and dst = "60182258257" and calldate > "2014-09-01 00:00:00" and calldate <= "2014-09-30 23:59:59" order by calldate;
Friday, September 26, 2014
Steps to generate new bill for customer (Jinercel)
Login to Jinercel Server
mysql --user=root --password=xxxxxx
use mya2billing;
search for the account id for the customer - refer to the elastix, "Extras", "Calling Cards",
SELECT a.starttime, a.src, a.sessionid, a.calledstation, a.sessiontime, a.sessionbill into outfile "/tmp/VENUS20140926_01" FIELDS TERMINATED BY '|' from cc_call a, cc_card b where b.id = a.card_id and a.starttime >= "2014-08-01 00:00:00" and a.starttime <= "2014-08-31 23:59:59" and b.username = '1483798503' and a.sessionbill > 0 order by a.starttime;
scp the outfile to the local PC
start up the "wkhtmltopdf TRIAL" instance
login to the instance and cd "/var/tmp/perldev/jinercel/v01"
scp the outfile into this instance
mysql --user=root --password=xxxxxx
use mya2billing;
search for the account id for the customer - refer to the elastix, "Extras", "Calling Cards",
SELECT a.starttime, a.src, a.sessionid, a.calledstation, a.sessiontime, a.sessionbill into outfile "/tmp/VENUS20140926_01" FIELDS TERMINATED BY '|' from cc_call a, cc_card b where b.id = a.card_id and a.starttime >= "2014-08-01 00:00:00" and a.starttime <= "2014-08-31 23:59:59" and b.username = '1483798503' and a.sessionbill > 0 order by a.starttime;
scp the outfile to the local PC
start up the "wkhtmltopdf TRIAL" instance
login to the instance and cd "/var/tmp/perldev/jinercel/v01"
scp the outfile into this instance
Tuesday, September 16, 2014
twilio - aggregated sms gateway
found the twilio when looking for freelancer.
initially, I thought that they provide attractive sms rate of 0.027 but only later found out that this is in US currency which converted to RM is close to 9sen / sms. Much higher than local content provider rate. Hence, the short code option is not viable through twilio.
Nevertheless, please find the following method to test the twilio with their published REST API
Go to 54.254.53.88 (wkhtmltopdf server)
go to /var/tmp/twilio/twilio-php-master
edit test.php
install the twilio-php-master.zip
unzip in the PC and download (winscp) into the server (/var/tmp/twilio/twilio-php-master)
follow the sample code on the twilio website.
require "/var/tmp/twilio/twilio-php-master/Services/Twilio.php";
// set your AccountSid and AuthToken from www.twilio.com/user/account
$AccountSid = "AC637853e1e1201472b91684dbcc88bd87";
$AuthToken = "a080c7872a6a0fe5dccd4784813ec34e";
$client = new Services_Twilio($AccountSid, $AuthToken);
//$message = $client->account->messages->create(array(
// "From" => "66001",
// "To" => "60123836313",
// "Body" => "Test message!",
//));
// Display a confirmation message on the screen
//echo "Sent message {$message->sid}";
$sms = $client->account->messages->sendMessage(
// Step 6: Change the 'From' number below to be a valid Twilio number
// that you've purchased, or the (deprecated) Sandbox number
"+1 717-454-2049",
// the number we are sending to - Any phone number
.....
initially, I thought that they provide attractive sms rate of 0.027 but only later found out that this is in US currency which converted to RM is close to 9sen / sms. Much higher than local content provider rate. Hence, the short code option is not viable through twilio.
Nevertheless, please find the following method to test the twilio with their published REST API
Go to 54.254.53.88 (wkhtmltopdf server)
go to /var/tmp/twilio/twilio-php-master
edit test.php
install the twilio-php-master.zip
unzip in the PC and download (winscp) into the server (/var/tmp/twilio/twilio-php-master)
follow the sample code on the twilio website.
require "/var/tmp/twilio/twilio-php-master/Services/Twilio.php";
// set your AccountSid and AuthToken from www.twilio.com/user/account
$AccountSid = "AC637853e1e1201472b91684dbcc88bd87";
$AuthToken = "a080c7872a6a0fe5dccd4784813ec34e";
$client = new Services_Twilio($AccountSid, $AuthToken);
//$message = $client->account->messages->create(array(
// "From" => "66001",
// "To" => "60123836313",
// "Body" => "Test message!",
//));
// Display a confirmation message on the screen
//echo "Sent message {$message->sid}";
$sms = $client->account->messages->sendMessage(
// Step 6: Change the 'From' number below to be a valid Twilio number
// that you've purchased, or the (deprecated) Sandbox number
"+1 717-454-2049",
// the number we are sending to - Any phone number
.....
Monday, September 1, 2014
Sample code to send and retrieve Whatsapp
Go to http://blog.philippheckel.com/2013/07/07/send-whatsapp-messages-via-php-script-using-whatsapi/
Login to "wkhtmltopdf TRIAL" amazon server
as root
cd /var/whatsapp/WhatsAPI
change the whatsapp_whatsapi_config.php
Login to "wkhtmltopdf TRIAL" amazon server
as root
cd /var/whatsapp/WhatsAPI
change the whatsapp_whatsapi_config.php
How to get whatapps encryption keys
uninstall whatsapp
install whatsapp with new sim details
use titanium backup to backup the whatsapp
uninstall whatsapp again
install with the cracked one - storage/download/folder bla bla/.apk
restore only DATA from titanimum backup
start the whatsapp
check catlog
search for WhatsPwd
Use the http://tomeko.net/online_tools/hex_to_base64.php?lang=en to convert the password
That is !!
install whatsapp with new sim details
use titanium backup to backup the whatsapp
uninstall whatsapp again
install with the cracked one - storage/download/folder bla bla/.apk
restore only DATA from titanimum backup
start the whatsapp
check catlog
search for WhatsPwd
Use the http://tomeko.net/online_tools/hex_to_base64.php?lang=en to convert the password
That is !!
Subscribe to:
Posts (Atom)