Since we implemented A2Billing here, we've run into a minor issue for which there is an easy fix.
The issue we had was that some of our existing customers had many SIP phones (our most important customer has 12 phones), and a single DID dialled them all. Asterisk has no trouble dialling very long dial strings in the Dial() command, but PHP and MySQL requires a limit on the length of this string. I increased the length of the allowable dial string from 100 chars to 300, both in the HTML and the MySQL database. I see no reason why future versions of A2Billing can't have this too, so here's the diff:
in admin/Public/form_data/FG_var_did_destination.inc
111c115
< "size=50 maxlength=120",
---
> "size=80 maxlength=300",
In MySQL you can execute the following code to make the change:
Code:
> ALTER TABLE cc_did_destination MODIFY destination varchar(301);
In the MySQL table definitions file DataBase/mysql-5.x/a2billing-schema-v1.4.0.sql the size of the destination field is *far* too small at 50 chars. It should look like this:
Code:
CREATE TABLE IF NOT EXISTS `cc_did_destination` (
`id` bigint(20) NOT NULL auto_increment,
`destination` varchar(301) NOT NULL,
`priority` int(11) NOT NULL default '0',
`id_cc_card` bigint(20) NOT NULL,
`id_cc_did` bigint(20) NOT NULL,
`creationdate` timestamp NOT NULL default CURRENT_TIMESTAMP,
`activated` int(11) NOT NULL default '1',
`secondusedreal` int(11) default '0',
`voip_call` int(11) default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;