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.