Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sat May 15, 2021 11:53 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Restricted numbers - failing for all on removeinterprefix
PostPosted: Fri Jan 27, 2012 4:06 pm 
Offline

Joined: Fri Jan 27, 2012 3:59 pm
Posts: 4
Hi Guys,

Just wanted to report a bug which I believe is still present even on the latest code on git.

it is related to this bug http://www.asterisk2billing.org/cgi-bin ... ticket/837 and the fix presented.

If customer A has restricted numbers set, and customer B has restricted numbers set, then you both sets of restricted numbers applied to both customers. The fix in ticket 837 resolved that.

BUT,

if you have removeinterprefix set (i.e. remove 00 before matching rate), then the behaviour, even after the fix in ticket 837 was still broken,

original code from 837 fix
$QUERY = "SELECT * FROM cc_restricted_phonenumber WHERE id_card='".$this->id_card."' AND '".$this->destination."' LIKE number";
if ($this->removeinterprefix) {
$QUERY .= " OR '". $this -> apply_rules ($this->destination)."' LIKE number;

it breaks after the OR statement and forgets (again) to check card id.

The code I am proposing:
$QUERY = "SELECT * FROM cc_restricted_phonenumber WHERE (id_card='".$this->id_card."' AND '".$this->destination."' LIKE number)";
if ($this->removeinterprefix) {
$QUERY .= " OR (id_card='".$this->id_card."' AND '". $this -> apply_rules ($this->destination)."' LIKE number)";

I will test this later, but I believe it will fix this issue.


Top
 Profile  
 
 Post subject: Re: Restricted numbers - failing for all on removeinterprefix
PostPosted: Sun Jan 29, 2012 4:08 pm 
Offline

Joined: Fri Jan 27, 2012 3:59 pm
Posts: 4
ok, implemented this fix and it is working for me...individual customers now get individual account restricted numbers even when removeinterprefix is set to yes
8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group