Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 11:45 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 4 posts ] 

What should be done about remove_prefixes()
Poll ended at Sat Oct 20, 2007 1:31 am
Remove it completely, the prefixes have already been stripped 80%  80%  [ 4 ]
Remove it and make calls use apply_rules() instead 0%  0%  [ 0 ]
Make it configurable with a new config option international_prefixes_display 20%  20%  [ 1 ]
Total votes : 5
Author Message
 Post subject: Prefix stripping
PostPosted: Wed Oct 10, 2007 1:31 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Last month I made an existing feature configurable, as it was interfering with customers dialing local numbers in the UK that start with 011 (Reading, Sheffield, Leeds, etc.)

After adding 'international_prefixes = 000,00' to my config the AGI now sends 0118xxx to the UK, rather than rewriting it to 8xxx and calling some random country. It's fixed. Sweet.

Not entirely. The cc_call table is now storing the unmolested dial string in the field 'calledstation', and in the call report in the admin interface everything looks great. Unfortunately, when logged in as a customer the 011 prefixes are being stripped off before they reach the screen. Investigating this lead me to find the function remove_prefix() in Misc.php. This is a different function than I improved last month, but seems intended to accomplish almost exactly the same task.

I think remove_prefix() is being called from all over the place via the framework with things like:
Code:
$FG_TABLE_COL[]=array (gettext("Destination"), "destination", "18%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix");
and
$HD_Form -> AddViewElement(gettext("CalledNumber"), "calledstation", "15%", "center", "SORT", "30", "", "", "", "", "", "remove_prefix");


Can anyone suggest a good reason for the existance of this function? I propose we remove this function and calls to it entirely. I haven't yet studied in detail everywhere it is invoked, but of the few cases I've looked at IMHO all of them would be improved if the number was used unchanged.

Please add your thoughts.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 10, 2007 4:07 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Hello Stravos,

I think that we should remove the international prefix completely. The main reason is very simple. The international prefix is a localized parameter used during a dialing sequence. In North America, it's 011, in Europe and most parts of Africa it's 00, and God knows what it is elsewhere. My point is, it is not part of the actual phone number. It is only used in order to access international trunks. But I am sure that you already know that.

Now, let's consider the business I am starting to run. We are planning to go global, and as global as it gets. That's why, we will be instructing our customers to dial the country code + the rest of the number. We will take care of adding the appropriate international prefix depending on the provider the call is going to be sent through. Even when someone dial an international prefix, we strip them all off. So far, it's working well.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 10, 2007 4:19 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
asiby wrote:
I think that we should remove the international prefix completely.
That wasn't really the question. I'm not suggesting we remove the ability to strip prefixes. As I explained I have recently made the list of prefixes to be stripped configurable per agi-confX section, rather than hard-coded, to help in this regard.

The question is: does anyone know a good reason for just '011' to be stripped again later on at display/invoice time by a different function?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 10, 2007 4:23 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
:oops: Oops.

Well I am not sure why.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 
VoIP Billing solution


All times are UTC


Who is online

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