Giter Club home page Giter Club logo

star2billing / a2billing Goto Github PK

View Code? Open in Web Editor NEW
180.0 40.0 175.0 38.64 MB

A2Billing is a telecom switch and billing system capable of providing and billing a range of telecom products and services to customers such as calling card products, residential and wholesale VoIP termination, DID resale and callback services.

Home Page: www.asterisk2billing.org

License: Other

PHP 66.93% Shell 0.23% Python 1.01% SQLPL 0.03% PLpgSQL 28.92% Smarty 1.02% HTML 0.02% CSS 1.38% JavaScript 0.43% PLSQL 0.01%

a2billing's Introduction

https://github.com/Star2Billing/a2billing/raw/master/common/images/logo/a2billing.png

A2Billing is a free and Open Source telecom switch and billing system capable of providing and billing a range of telecom products and services to customers such as calling card products, residential and wholesale VoIP termination, DID resale and callback services.

A2Billing is commercially supported by Star2Billing S.L, where installation services, consultancy and support is available.

see http://www.star2billing.com/ for more details

https://github.com/Star2Billing/a2billing/raw/master/a2billing_dashboard.png

Info

License

Copyright (c) 2004-2015 Star2Billing S.L. <[email protected]>

A2Billing is licensed under AGPL: http://www.gnu.org/licenses/agpl.html

Support

Star2Billing S.L. offers consultancy including installation, training and customisation

Please email us at [email protected] for more information

a2billing's People

Contributors

andres-moya avatar areski avatar argeorge avatar cmpcs avatar dtucny avatar fureszpeter avatar i-tom avatar jonathan-roper avatar marvin01 avatar mattclements avatar miken32 avatar navlinks avatar rampa069 avatar s-mcf avatar sutaburosu avatar tombii avatar ulisesarcidiacono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a2billing's Issues

Invoices---> configuration formatting

The drop down box on the invoices configuration page for selecting "Display Account Number" displays differently from the rest of the drop down boxes in A2Billing. I've tried in both Chrome and IE.

Display account number dropdown:
formatting_error

Correctly formatted dropdown menu:
correctly_formatted

On-net rates are disregarded in Rates Simulator

On-net rates are disregarded in Rates Simulator.

  1. Create DID 1234567 and set on-net charge of 0.05 per minute for it;

  2. Attach DID to the first customer;

  3. Create RateCard and add 1 Rate with prefix set to 1234567 and set sell rate of 0.33;

  4. Attach rate to the second customer's call plan;

  5. Test call from first customer to the number 1234567. Simulator will show 0.33 per minute;

  6. Make a real call to 1234567. The customer will be charged for 0.05 per minute.

add new field

how can we add/remove new field in a2billing registration page
please help me......................

DID lists

When DIDs are entered in A2Billing, they need to automatically populate in numerical order. Please correct this as it makes it difficult when you have to search for one DID among hundreds when you are adding destinations.

Error : cannot load conf : load_conf_db

Ubuntu Server 12.04 LTS

While installing A2billing 2 according to INSTALL.rst at the end of "2.6. Step 5: Install web-based Graphical interfaces" got this error when I tried to visit http://<ip-addr>/a2billing/admin:

Error : cannot load conf : load_conf_db

What does it mean?

Undefined variable: listdestination in v.2.0.6

Hello,
After upgrade to v.2.0.6, I see several lines in my log, as:

Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 2 21:30:20 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.RateEngine.php[1116]: Undefined index:
Oct 3 06:12:23 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.A2Billing.php[1936]: Undefined variable: listdestination
Oct 3 07:19:08 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.A2Billing.php[1936]: Undefined variable: listdestination
Oct 3 08:10:30 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.A2Billing.php[1936]: Undefined variable: listdestination
Oct 3 08:52:45 my-switch php: /var/lib/asterisk/agi-bin/lib/Class.A2Billing.php[1426]: Use of undefined constant VoiceMail - assumed 'VoiceMail'

For your consideration, where I'm running PHP 5.4.20 ;)
Chers,

usedratecard is not set if the call fail

Hello,

version 2.0.4

usedratecard is not set if the call fail,

the default value of usedratecard is an empty string line 75 file Class.RateEngine.php

$this->usedratecard = '';<<< line 75

$K = $this->usedratecard; << line 1018 in Class.RateEngine.php , set $K to an empty string

and all reference to $this->ratecard_obj[$K] doesn't work

I add this lines in the file Class.RateEngine.php in the line 1492 to fix the problem

$this->usedratecard = $k;
$A2B->debug(DEBUG, $agi, FILE, LINE, "[USEDRATECARD - FAIL =" . $this->usedratecard . "]");

Regards
Karel

PostgreSQL support

The last migration for PostgreSQL is UPDATE-a2billing-v1.6.2-to-v1.7.0.sql while fo MySQL it is for version 2.0.

Do you still support PostgreSQL?

Subscription service blank page

I created a few subscription service on the customer signup page, and it shows. But when I remove them all, the customer sign up page still shows a subscription page with no choices. I suppose if there is no subscription service available, the sign up page should go back to normal.

Henry

Problem with CDRs Report page

Hello,

for some large numbers that I call, in the CALL REPORTS Menu -> CDRs, on the destination column, appear 2147483647 instead of the name of destination.

Strangely this number is the same that return this asterisk console command:

CLI> sip show inuse

  • Peer name In use Limit
    1000 0/0/0 2147483647

CDR Call Archiving

Hi,

Would be nice if the CDR in Call Reports allows to see and export old calls archived (We are using A2Billing in environments with more than 200 concurrent calls with a several calls per second and we are moving yesterday calls from cc_call running INNODB to cc_call_archive using MyISAM) so the cc_call remains small.

Thanks!

language option not work

this code is missing in new version and cause language option not work

customer.defines.php
admin.defines.php
agent.defines.php

/*

  •  GLOBAL POST/GET VARIABLE
    
    */
    getpost_ifset (array('form_action', 'atmenu', 'action', 'stitle', 'sub_action', 'IDmanager', 'current_page', 'order', 'sens', 'mydisplaylimit', 'filterprefix', 'ui_language', 'cssname', 'popup_select', 'popup_formname', 'popup_fieldname', 'exporttype', 'msg'));

if (!isset($_SESSION)) {
session_start();
}

Import Cards doesnt work

Import customers in new version 2.06 does not work properly, it does not accept additional fields in CVS files.

Inbound DID billing not working

Function bill_did_aleg in Class.A2Billing.php needs $A2B to be declared so it can check the status of answer_call.

--- Class.A2Billing.php 2012-01-13 15:50:42.000000000 -0800
+++ Class.A2Billing.php 2012-01-13 15:52:09.000000000 -0800
@@ -1801,7 +1801,8 @@
     */
    function bill_did_aleg ($agi, $inst_listdestination, $b_leg_answeredtime = 0)
    {
-       
+       global $A2B;
+
        $start_time = $this -> G_startime;
        $stop_time = time();
        $timeinterval = $inst_listdestination[19];

Promotion Package causes account to go negative

I have discovered that up till now, my customers have actually been charged for the 300 free seconds in package offer. Very dangerous bug in the Class.RateEngine.php

Around line 814, cost of call is calculated :

Code:
$cost -= ($callduration/60) * $rateinitial;

So if a customer has $1 balance with a 300 free seconds package offer and dials a destination costing 0.14USD/min ( 60 seconds billing increment), his $callduration calculated by Class.RateEngine.php will be 420 seconds ( 7 minutes ).

So his $cost will be - 3.15 USD. Now when his balance is updated at the end of the call, he will end up with a balance of -2.15USD.

This is wrong.

We need to subtract the 300 free seconds from $callduration before calculating the cost of the call. So i added the following if statement to do that.

Code:
if ($this -> freetimetocall_used <= $callduration)
{
$callduration = $callduration - $this->freetimetocall_used;
}
$cost -= ($callduration/60) * $rateinitial;

Below are logs i captured showing the above scenario :

a2billing.php,1: file:Class.RateEngine.php - line:1274 - uniqueid:1344958630.134 - DIAL SIP/###/##########|60|HL(420000:60000:00000)
a2billing.php,1: file:Class.RateEngine.php - line:1157 - uniqueid:1344958630.134 - [TRUNK STATUS UPDATE : UPDATE cc_trunk SET inuse=inuse-1 WHERE id_trunk='8']
a2billing.php,1: file:Class.RateEngine.php - line:1422 - uniqueid:1344958630.134 - -> dialstatus : ANSWER, answered time is 420
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:1426 - uniqueid:1344958630.134 - [USEDRATECARD=0]
a2billing.php,1: file:Class.RateEngine.php - line:959 - uniqueid:1344958630.134 - :[sessiontime:420 - id_cc_package_offer:2 - package2apply:Array]
a2billing.php,1:
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:736 - uniqueid:1344958630.134 - [CC_RATE_ENGINE_CALCULCOST: K=0 - CALLDURATION:420 - freetimetocall_used=300 - freetimetocall_left=300]
a2billing.php,1: file:Class.RateEngine.php - line:814 - uniqueid:1344958630.134 - [TEMP - CC_RATE_ENGINE_CALCULCOST: 1. COST: -3.15]:[ (420/60) * 0.45 ]
a2billing.php,1: file:Class.RateEngine.php - line:899 - uniqueid:1344958630.134 - [CC_RATE_ENGINE_CALCULCOST: K=0 - BUYCOST:-0.63 - SELLING COST:-3.15]
a2billing.php,1: file:Class.RateEngine.php - line:1000 - uniqueid:1344958630.134 - :[ID_CARD_PACKAGE_OFFER CREATED : 1259]:['620', '2', '300']
a2billing.php,1:
a2billing.php,1:
a2billing.php,1:
a2billing.php,1:
a2billing.php,1: file:Class.RateEngine.php - line:1042 - uniqueid:1344958630.134 - [CC_RATE_ENGINE_UPDATESYSTEM: usedratecard K=0 - (sessiontime=420 :: dialstatus=ANSWER :: buycost=0.63 :: cost=-3.15 : signe_cc_call=+: signe=-)]
a2billing.php,1: file:Class.RateEngine.php - line:1107 - uniqueid:1344958630.134 - [CC_asterisk_stop : SQL: DONE : result=1]
a2billing.php,1: file:Class.RateEngine.php - line:1108 - uniqueid:1344958630.134 - [CC_asterisk_stop : SQL: INSERT INTO cc_call (uniqueid, sessionid, card_id, nasipaddress, starttime, sessiontime, real_sessiontime, calledstation, terminatecauseid, stoptime, sessionbill, id_tariffgroup, id_tariffplan, id_ratecard, id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination) VALUES ('1344958630.134', 'SIP/didforsale_Config1B-00000086', '620', '', SUBDATE(CURRENT_TIMESTAMP, INTERVAL 420 SECOND) , '420', '420', '##########', 1, now() , '+3.15', '1', '44', '1448122', '8', '##########', '0', '0.63', '1259', '##########', '#####')]
a2billing.php,1: file:Class.RateEngine.php - line:1132 - uniqueid:1344958630.134 - [CC_asterisk_stop 1.2: SQL: UPDATE cc_card SET credit= credit-3.15 , lastuse=now(), firstusedate=now(), nbused=nbused+1 WHERE username='7635008738']
a2billing.php,1: file:Class.RateEngine.php - line:1137 - uniqueid:1344958630.134 - UPDATE cc_trunk SET secondusedreal = secondusedreal + 420 WHERE id_trunk='8'
a2billing.php,1: file:Class.RateEngine.php - line:1141 - uniqueid:1344958630.134 - UPDATE cc_tariffplan SET secondusedreal = secondusedreal + 420 WHERE id='44'
a2billing.php,1: file:a2billing.php - line:588 - uniqueid:1344958630.134 - [a2billing account stop]
a2billing.php,1: file:a2billing.php - line:193 - uniqueid:1344958630.134 - [CHANNEL STATUS : 6 = Line is up]
a2billing.php,1: [CREDIT : -2.15][CREDIT MIN_CREDIT_2CALL : 0]
a2billing.php,1: file:a2billing.php - line:396 - uniqueid:2344958630.134 - TARIFF ID -> 1
-- Playing 'prepaid-no-enough-credit-stop' (escape_digits=#) (sample_offset 0)
a2billing.php,1: file:a2billing.php - line:403 - uniqueid:2344958630.134 - [STOP STREAM FILE prepaid-no-enough-credit-stop]
a2billing.php,1: file:a2billing.php - line:427 - uniqueid:2344958630.134 - [SET MAIL REMINDER - NOT ENOUGH CREDIT]
-- <SIP/######>AGI Script a2billing.php completed, returning 4
== Spawn extension (call-a2billing, #######, 3) exited non-zero on 'SIP/#####

service fee charge problems

Looks like 2 bugs..

1 Bug that can exclude some accounts from being charged due to race conditions

Change Cronjobs/a2billing_batch_process.php

    // RULES
    if ($rule == 3) {
            $filter .= " -- card last run date <= period
                         (remove line)   AND UNIX_TIMESTAMP(servicelastrun) <= UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - $oneday * $period \n";
                         (fixed line)       AND UNIX_TIMESTAMP(servicelastrun) <= UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - $oneday * $period + $time_checks *60 \n";
    }

For list of services all is fine.

2 Unable to charge account from more then 1 service fee - servicelastrun is updated by the first applicable Service Fee entry (with biggest id). So for the 2nd service fee this account has already paid for this period of time.

Seems that overall scheme is not compatible with multiple service fee.

Alarms has not been created

One of the table names for alarms is 'maxvalue' which in the latest release of MySQL is a reserved SQL word. Getting SQL syntax error with this name in the SQL command.

rate cards and call history

When deleting rate cards, the call history is deleted also. Please fix it so that the call history remains intact as rate cards for my providers update every 2 weeks and I have to delete the old rate cards to have space for the new ones.

word "description" changed in email templates

When modifying the "new ticket" or "modify ticket" email templates, the word "description" is replaced with the word "Deion" upon saving.

Example:
"$ticket_description$: Ticket Description" becomes "$ticket_deion$: Ticket Deion"

"$comment_description$: Comment Description" becomes "$comment_deion$: Comment Deion"

I've tried modifying the templates in both Chrome and Opera with the same result.

I'm running version 2.01

Incorrect displaying of VOIP-PROVIDER parameter in TRUNKS

ver2.0.1

  1. Create new Provider with PROVIDER NAME = Goodbye PSTN

  2. Create new Trunk and set VOIP-PROVIDER parameter to NOT DEFINED.

  3. List all available Trunks.

  4. Click Edit on the last created trunk.

  5. Make sure that VOIP-PROVIDER parameter is still NOT DEFINED.

  6. Go back to list all available Trunks.

  7. Click Delete on the last created trunk.

  8. Look at VOIP-PROVIDER parameter. It should be NOT DEFINED but it equals Goodbye PSTN.

reload asterisk

When i create SIP account on a2billing that i have to use reload asterisk, can i skip that option? Need help

Customer Page

Can this page be changed to automatically populate in alphabetical order as new customers are added and to stay this way?

Translations when vieweing invoices

V1.9.4.0

This change allows VAT to be properly translated regardless of the tax rate.

--- admin/Public/A2B_invoice_view.php (revision 64)
+++ admin/Public/A2B_invoice_view.php (working copy)
@@ -274,7 +274,7 @@
$val) { ?>

  •               <td class="two"><?php echo gettext("VAT $key%:") ?></td>
    
  •               <td class="two"><?php echo gettext("VAT ") . "$key%:" ?></td>
                <td class="three"><?php echo number_format(round(amount_convert($val),2),2)." $display_curr"; ?></td>
    

Missing translation for VAT.

@@ -296,7 +296,7 @@

- -

Add DID to account with destination does not work properly

When adding a DID from Customer interface the destination is entered eg "1234567890" but when the destination is checked it shows a random 10 digit number eg 2147483647 which looks like an account number but I have tried to compare that number to anything in the system and have not found out what number it is adding here.

Afterwards I can edit the destination and put in the correct number in the destination field and that corrects the problem so this only happens when a new DID is added to the customer account.

Let me know if you need anything else to find the problem. I am using 1.9.3 Master.

double refills in agent portal

when you refills customers account in agent portal the information is appended in the url as normal form submission. the problem is that when refill is complete, the form data still remains in the url. whenever you reload page or use the back or forward button in the browser, it refills account again over and over as long.

example from demo agent portal
http://demo.asterisk2billing.org/a2b_agent/Public/A2B_entity_card.php?form_action=addcredit&stitle=Card_Refilled&current_page=&order=&sens=&id=157301&cardnumber=enter%20cardnumber&addcredit=2&description=th

Customer ticket reply

customers can not reply support tickets and after viewing the the ticket by customer the view status will not be updated in customer support panel

Customer Balance not decreasing correctly.

I've noticed that my customer balance is increasing instead of decreasing :(

When I go to Customers add:search and look at a customer. I see their BA increase for example from 94.8142 GBP to 95.5072 GBP. This increases when I refresh the page or go to Customers add:search and select the same customer.

The same also happens in the Billing/ Customers balance screen.

I am using very small buy and sell rates 0.00xx in my rate card.

My a2blling version is 2.0.4.

When I download the costed CDR's the sell rates look correct.

My main concern is credit control.

Anyone else experienced this problem and has a fix?

currency recharge

Assuming that main currency is set to USD
customer X has account with EUR
and agent of that customer is also on EUR

  1. On Admin_UI it shows still xyza USD
  2. On Agent_UI it shows all customers with EUR but ,refill will add to the customer 5 usd instead of 5 eur
  3. Customer_UI Simulator still shows USD rates

Package Offer don't work

Hi,

I was trying to use Package Offer but found that an issue with the following SQL query:

The issue is in the file Class.RateEngine.php it's using the ratecard ID value (cc_ratecard.id) for the variable $id_rate and therefore it doesn't find the right rate for the Package Offer. The query I changed is the following:

Change the following query:

                    $query_pakages = "SELECT cc_package_offer.id, packagetype, billingtype, startday, freetimetocall ".
                                        "FROM cc_package_offer,cc_package_rate WHERE cc_package_offer.id= ".$id_cc_package_offer.
                                        " AND cc_package_offer.id = cc_package_rate.package_id AND cc_package_rate.rate_id = ".$id_rate.
                                        " ORDER BY packagetype ASC";

Change it to:

                    $query_pakages = "SELECT cc_package_offer.id, packagetype, billingtype, startday, freetimetocall ".
                                        "FROM cc_package_offer,cc_package_rate WHERE cc_package_offer.id= ".$id_cc_package_offer.
                                        " AND cc_package_offer.id = cc_package_rate.package_id".
                                        " ORDER BY packagetype ASC";

If you want I can provide a diff but can't add an attachment here.

Cheers,
Andres Montalban

Sort DIDs by DID, not by DID ID.

This issue is more of an interface bug than anything.

In Inbound DID->Destination->Add Destination, when our DID database contains hundreds of DIDs, it is far more useful to sort DIDs by the DID than it is to sort by DID, then the DID's database ID (mostly chronological order when entering them into the DB). The reason for this is that typing in the entire 10+ digit DID to find it in the list can be tremendously laborious, especially when it has to be re-done several times because the browser timeout for doing so is too short. Typing the first 7 numbers gets the user to the general area in the list where they can find the rest of the DID.

The fix is easy. In /a2billing/admin/Public/form_data/FG_var_did_destination.inc, find the code block starting with:

$HD_Form -> AddEditElement (gettext("DID")

(Near line number 135 of this file) Then change the "order by" field from "did, id" to "did". In the code in this particular place, the "order by" field is number 9, although I know for certain that the '$value' field is data for several different variables in $HD_Form, so this may change in the future.

initblock not accounted for on call

i have an issue that the initblock is not taken into account when a customer initiates a call. please see scenario below.

a customer with a credit of 0.01 cent called a number which WOULD BE 15sec for 0.01 cent. in the rate-card i have an initblock set of 60 sec which makes the call cost 0.04 cent. a2billing still does allow the customer to make the call, it cuts off at 15 sec but because the call cost would be 0.04 cent it should not have allowed the call in the 1st place. now the customer is billed 0.04 cent and is therefore at a -0.03 balance after the call.

regards
Jan

software used: Debian Squeeze, Asterisk 1.6, A2Billing 1.9.4

subscription fee

a2billing_subscription_fee.php +177

           // paid : check if the system have to bill it again
            $unix_bill_time = strtotime($subscription['next_billing_date']);
            $unix_now = strtotime(date("d-m-Y"));
            if ($unix_now>=$unix_limit) {
                $action = "bill";

correct :

           // paid : check if the system have to bill it again
            $unix_bill_time = strtotime($subscription['next_billing_date']);
            $unix_now = strtotime(date("d-m-Y"));
            if ($unix_now>=$unix_bill_time) {
                $action = "bill";

asterisk_version isn't forward-compatible

Setting this to 1_8 or 1_10 will not have the desired effect, there are many places checking for 1_6 only. Since the setting is used to handle certain versions of Asterisk, this patch makes the code do that more sensibly.

--- AGI/a2billing.php   2011-05-31 12:39:39.000000000 -0700
+++ AGI/a2billing.php   2012-02-09 16:12:44.000000000 -0800
@@ -888,7 +888,7 @@

                    $uniqueid = MDP_NUMERIC(5).'-'.MDP_STRING(7);

-                   $sep = ($A2B->config['global']['asterisk_version'] == "1_6")?',':'|';
+                   $sep = ($A2B->config['global']['asterisk_version'] == "1_2" || $A2B->config['global']['asterisk_version'] == "1_4")?'|':',';

                    $variable = "IDCONF=$idconfig".$sep."CALLED=".$A2B ->destination.$sep.$CALLING_VAR.$sep.$MODE_VAR.$sep."CBID=$uniqueid".$sep."LEG=".$A2B -> username;

@@ -1032,7 +1032,7 @@

                    $uniqueid = MDP_NUMERIC(5).'-'.MDP_STRING(7);

-                   $sep = ($A2B->config['global']['asterisk_version'] == "1_6")?',':'|';
+                   $sep = ($A2B->config['global']['asterisk_version'] == "1_2" || $A2B->config['global']['asterisk_version'] == "1_4")?'|':',';

                    $variable = "IDCONF=$idconfig".$sep."CALLED=".$A2B ->destination.$sep."MODE=ALL".$sep."CBID=$uniqueid".$sep."TARIFF=".$A2B ->tariff.$sep."LEG=".$A2B -> username;

@@ -1374,7 +1374,7 @@
                         $account = $A2B -> accountcode;
                         $uniqueid = $callback_uniqueid.'-'.MDP_NUMERIC(5);

-                        $sep = ($A2B->config['global']['asterisk_version'] == "1_6")?',':'|';
+                        $sep = ($A2B->config['global']['asterisk_version'] == "1_2" || $A2B->config['global']['asterisk_version'] == "1_4")?'|':',';

                         $variable = "CALLED=$inst_pn_member".$sep."CALLING=$inst_pn_member".$sep."CBID=$callback_uniqueid".$sep."TARIFF=$callback_tariff".$sep.
                                     "LEG=".$A2B -> accountcode.$sep."ACCOUNTCODE=".$A2B -> accountcode.$sep."ROOMNUMBER=".$room_number;
--- common/lib/Class.A2Billing.php  2011-05-31 12:39:39.000000000 -0700
+++ common/lib/Class.A2Billing.php  2012-02-09 16:12:44.000000000 -0800
@@ -3566,7 +3566,7 @@
     */
    function format_parameters ($parameters)
    {
-       if ($this->agiconfig['asterisk_version'] == "1_6") {
+       if ($this->agiconfig['asterisk_version'] != "1_2" && $this->agiconfig['asterisk_version'] != "1_4") {
            $parameters = str_replace("|", ',', $parameters);
        }
        return $parameters;
--- customer/callback.php   2011-05-31 12:39:39.000000000 -0700
+++ customer/callback.php   2012-02-09 16:12:44.000000000 -0800
@@ -157,10 +157,10 @@
                    $server_ip = 'localhost';
                    $num_attempt = 0;

-                   if ($A2B->config['global']['asterisk_version'] == "1_6") {
-                       $variable = "CALLED=$called,CALLING=$calling,CBID=$uniqueid,LEG=".$A2B->cardnumber;
-                   } else {
+                   if ($A2B->config['global']['asterisk_version'] == "1_2" || $A2B->config['global']['asterisk_version'] == "1_4") {
                        $variable = "CALLED=$called|CALLING=$calling|CBID=$uniqueid|LEG=".$A2B->cardnumber;
+                   } else {
+                       $variable = "CALLED=$called,CALLING=$calling,CBID=$uniqueid,LEG=".$A2B->cardnumber;
                    }

                    $QUERY = " INSERT INTO cc_callback_spool (uniqueid, status, server_ip, num_attempt, channel, exten, context, priority," .
--- webservice/SOAP/soap-callback-server.php    2011-05-31 12:39:39.000000000 -0700
+++ webservice/SOAP/soap-callback-server.php    2012-02-09 16:12:44.000000000 -0800
@@ -308,7 +308,7 @@
                $server_ip = 'localhost';
                $num_attempt = 0;

-               $sep = ($A2B->config['global']['asterisk_version'] == "1_6")?',':'|';
+               $sep = ($A2B->config['global']['asterisk_version'] == "1_2" || $A2B->config['global']['asterisk_version'] == "1_2")?'|':',';

                $variable = "CALLED=$called".$sep."CALLING=$calling".$sep."CBID=$uniqueid".$sep."TARIFF=" . $A2B->tariff;

mass mail r\\n\\r ....

mass mail send to user with : \n\r\ ...
Your login information is as below:\r\n\r\nYour account is 7344523925\r\n\r\ ...

automatic and recurrent email is ok

SIP Permit

I want to setup multiple PERMIT hosts in my SIP CLIENT

I put this in the form in PERMIT field: HOST1, HOST2

I not use Realtime, when i run script that generate the SIP file, the file generate is:

[123456789]

deny=0.0.0.0/0.0.0.0
permit=HOST1,HOST2

Don´t work. So i change this file

/common/lib/Class.Realtime.php, line 106:
if (trim($list_names[$i]) == 'allow') {
to
if (trim($list_names[$i]) == 'allow' || trim($list_names[$i]) == 'permit') {

And the file generate is:

[123456789]

deny=0.0.0.0/0.0.0.0
permit=HOST1
permit=HOST2

It´s work. Please, change this file in project for the next version.

Thanks.

Add DID form field needs to support 31 characters

The add DID form doesn't allow for adding a range of DID's that are 15 digits in length. For example, 8835100xxxxxxxx-8835100xxxxxxxx is 31 characters counting the hyphen and the form field only allows for 30 characters.

Thanks,

Fix per month DID

if customer with 5 credit balance buy a DID with cost of monthly 5 credit

when customer call to did , you have not enough credit played and call will drop

also this scenario occur with zero balance and free did

Can't login with "root" after changed its password

(did't find answer on forum)

ver2.0.1

Making initial setup I changed root password. Then logout.
Then when I try to login with a new or old (default) password I can't login.

mysql> select * from cc_ui_authen where login='root'; shows that pwd_encoded successfully changed after password change.

What can be cause of the problem?

a2billing is causing FAS after asterisk update

After updating from asterisk 1.6.2.18.2 to 1.6.2.19 or to 1.8.4 calls are getting connected instantly without ringing(FAS)
The problem is that "H" in dialcommand_param |60|HRrL(%timeout%:61000:30000) is not somehow supported

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.