Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Sun Apr 05, 2020 6:20 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: callback.php trimming wrong
PostPosted: Thu Feb 26, 2009 4:01 am 
Offline

Joined: Sun Aug 17, 2008 1:52 pm
Posts: 93
Hi,


using ereg_replace will replace any 00 in any part of dialed or caller number which will result failure. changing line 50 to following will solve it:


Code:
   if ((substr($called,0,2))=="00") {
      $called=substr($called,2);
   }
   
   if ((substr($calling,0,2))=="00") {
      $calling=substr($calling,2);
   }


good luck


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 3:15 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
You need to brush up on your regexes: the '^' limits matches to the start of the string.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 6:05 pm 
Offline

Joined: Sun Aug 17, 2008 1:52 pm
Posts: 93
stavros wrote:
You need to brush up on your regexes: the '^' limits matches to the start of the string.


I tried it and it will take it from end of it


try a number like : 00123232300

see what happens


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 6:28 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
It works as expected for me:
Code:
$ php -a
Interactive shell

php > $calling = "00123232300";
php > print $calling;
00123232300

php > $calling=ereg_replace("^00","011",$calling);
php > print $calling;
011123232300


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 6:50 pm 
Offline

Joined: Sun Aug 17, 2008 1:52 pm
Posts: 93
nope,
not the line that is replacing 011,
try the line that is replacing 00 to nothing,
I tried form callback.php and i had the bug for sure.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2009 8:12 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
In A2BCustomer_UI/callback.php (current branches/1.3 version) I can't see anything which rewrites '00' to ''. Which file and version are you referring to please?


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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