Feature #187

unify the way lookup sources are accepting numbers

Added by patrick_elx over 2 years ago. Updated over 2 years ago.

Status:Closed Start:10/04/2009
Priority:High Due date:10/16/2009
Assigned to:patrick_elx % Done:

100%

Category:-
Target version:Caller ID Superfecta Source Files Estimated time:1.00 hour

Description

The dial pattern let use change the number received by our providers to a format acceptable to the source.
However, different sources have different way of accepting numbers and you probably want to use more than one source in the same scheme.

I would suggest that we standardize the way existing and future sources are accepting numbers.

My proposal would be for each source to accept both the national format (ie USA: NXXNXXXXXX; France: 0ZXXXXXXXX) and the international format without the international dialing code (ie USA: 1NXXNXXXXXX; France:33ZXXXXXXXX).
I would also suggest to accept the international format with an international dialing code (ie: 00, +, 011, ...) by just checking the last 11 to 13 digits (depending on the country).

History

Updated by tshif over 2 years ago

  • Due date set to 10/16/2009
  • Status changed from New to Feedback
  • Priority changed from Normal to High

If we do this - what new installation or upgrade behaviours do we have to teach the module to account for complete replacement of all the source files?

It would be very helpful if the new version of the source files would still work for people who havenot yet upgraded to the newest module. I mean - people on 2.2.0 should be able to use the new data source format we are discussing for release with 2.2.1.

Updated by patrick_elx over 2 years ago

I don't think it will change anything for a lot of people as the data source will still be accepting at least one of the previous format it was accepting before.

It will just clear up things when they were using more than one data source that were expecting different input formats.

These mods will only be for the data source. No changes are expected for the core.
However, by publishing this 'standard' it will help new source developer to make it behaving in a similar way.

Updated by tshif over 2 years ago

We actually need to revisit this document anyway. WOuld you be willing to fix this doc to bring it up to talk about the current standards for 2.2 which have probably had new things added that never made it to documentation.

Also - I agree with you about standardization - I think we should move forward with that as a goal for 2.1.1. If we do try to tighten up on the coding standards for 2.2.1, we will need to update the docs as I mentioned for sure.

Updated by patrick_elx over 2 years ago

I've done some minor mods in the docs.
I'll be updating the few sources that are not fully compliant yet.

Updated by tshif over 2 years ago

  • Status changed from Feedback to Assigned
  • Assigned to set to patrick_elx
  • % Done changed from 0 to 20

I tweaked the doc mods slightly for grammer.

I changed this one sentence:
Be careful not to use variables already used by callerid.php (List them here - ).

Would you please list the reserved variables - this will help assured the contributors see it and understand what we mean.

Updated by tshif over 2 years ago

Docs for data source creation have been completed. View here => Creation of New Caller ID Sources

Updated by tshif over 2 years ago

Patrick - I am curious - how many data sources are left to modify to bring them up to most recent standard for format of accepted numbers?

It would be of interest to have you make an entry in estimated time for this case.

Updated by patrick_elx over 2 years ago

Here's the list of the actual sources status

source name, N: national, E: e164, 00: international with 00, 011: international with 011, +: international with +

source-Addresses.php: N
source-Any_Who.php: N
source-AsteriDex.php: will only check digit for digit with the AsteriDex database
source-Asterisk_Phonebook.php: will only check digit for digit with the Asterisk database
source-CanPagesCa.php: N
source-Eniro_SE.php: N
source-Google.php: N
source-Hitta_SE.php: N
source-Infobel.php: N, 00
source-LocalTel_CH.php: N
source-MySQL_DB.php: will only check digit for digit with the MySQL database
source-Open79XX.php: will only check [filter_length] rightmost digit for digit with the Open79xx database
source-PhoneSpamFilter.php: N
source-PhoneSpamFilter_UK.php: N, E
source-SugarCRM.php: will only check [filter_length] rightmost digit for digit with the SugarCRM database
source-Superfecta_Cache.php: will only check digit for digit with the Superfecta database
source-Telco_Data.php: N
source-Trunk_Provided.php: N/A
source-VoIPCNAM.php: N
source-Who_Called.php: N
source-Yellow_Pages.php: N

Updated by tshif over 2 years ago

Excellent data. Is it still your intention to bring these into compliance with the new standard in time for release with 2.2.1?

Updated by patrick_elx over 2 years ago

updated the following in rev156 to accept N, E, 00, 011, +
source-Adresses
source-White_Page
source-PhoneSpamFilter
source-Any_Who
source-CanPagesCa
source-Yellow_Pages

Updated by patrick_elx over 2 years ago

source-PhoneSpamFilter_UK in rev157

Updated by tshif over 2 years ago

Great progress!!

So - if I got it right, heres the current status for all the Data sources:

Legend:
source name, N: national, E: e164, 00: international with 00, 011: international with 011, +: international with +

Sources - Web
source-Addresses.php: N, E, 00, 011, +
source-Any_Who.php: N, E, 00, 011, +
source-CanPagesCa.php: N, E, 00, 011, +
source-Eniro_SE.php: N
source-Google.php: N
source-Hitta_SE.php: N
source-Infobel.php: N, 00
source-LocalTel_CH.php: N
source-PhoneSpamFilter.php N, E, 00, 011, +
source-PhoneSpamFilter_UK.php: N, E, 00, 011, +
source-Telco_Data.php: N
source-VoIPCNAM.php: N
source-White_Pages.php N, E, 00, 011, +
source-Who_Called.php: N
source-Yellow_Pages.php: N, E, 00, 011, +

Sources: DB
source-AsteriDex.php: will only check digit for digit with the AsteriDex database
source-Asterisk_Phonebook.php: will only check digit for digit with the Asterisk database
source-MySQL_DB.php: will only check digit for digit with the MySQL database
source-Open79XX.php: will only check [filter_length] rightmost digit for digit with the Open79xx database
source-SugarCRM.php: will only check [filter_length] rightmost digit for digit with the SugarCRM database
source-Superfecta_Cache.php: will only check digit for digit with the Superfecta database

Sources: Other
source-Trunk_Provided.php: N/A

Updated by patrick_elx over 2 years ago

rev 158. I decided to really check for 011 and 00 instead of ignoring what was in front of the number to avoid possible false match. Also, the + is removed by caller_id.php and never presented to the source lookup. Then any source that accepting e164 is also accepting +

New status:
Legend:
source name, N: national, E: e164 and +, 00: international with 00, 011: international with 011

Sources - Web
source-Addresses.php: N, E, 00, 011
source-Any_Who.php: N, E, 00, 011
source-CanPagesCa.php: N, E, 00, 011
source-Eniro_SE.php: N, E, 00, 011
source-Google.php: N, E, 00, 011
source-Hitta_SE.php: N, E, 00, 011
source-Infobel.php: N, 00
source-LocalTel_CH.php: N
source-PhoneSpamFilter.php N, E, 00, 011
source-PhoneSpamFilter_UK.php: N, E, 00, 011
source-Telco_Data.php: N, E, 00, 011
source-VoIPCNAM.php: N
source-White_Pages.php N, E, 00, 011
source-Who_Called.php: N, E, 00, 011
source-Yellow_Pages.php: N, E, 00, 011

Sources: DB
source-AsteriDex.php: will only check digit for digit with the AsteriDex database
source-Asterisk_Phonebook.php: will only check digit for digit with the Asterisk database
source-MySQL_DB.php: will only check digit for digit with the MySQL database
source-Open79XX.php: will only check [filter_length] rightmost digit for digit with the Open79xx database
source-SugarCRM.php: will only check [filter_length] rightmost digit for digit with the SugarCRM database
source-Superfecta_Cache.php: will only check digit for digit with the Superfecta database

Sources: Other
source-Trunk_Provided.php: N/A

Updated by patrick_elx over 2 years ago

  • % Done changed from 20 to 50
  • Estimated time set to 1.00

a few more in rev159.
Please check VoIPCNAM as I do not have an account with them to fully test it. However the filter part I added seems to work fine.

Updated by tshif over 2 years ago

voipcnam source is having troubles today with their service. I will test the mods as soon as their service is accepting querys again.

Updated by patrick_elx over 2 years ago

  • % Done changed from 50 to 90

rev 160.
Thanks to PiaF forum user HarryHirsch:
Added source-Lokaldelen_SE.
Updated source Infobel (I have coded the mods from Harry for the additional countries DE, AU, ES; however so far it does not seem to work properly with these countries. I'll open another bug for this issue. The other countries are still working on the simple tests I performed).

New status:
Legend:
source name, N: national, E: e164 and +, 00: international with 00, 011: international with 011

Sources - Web
source-Addresses.php: N, E, 00, 011
source-Any_Who.php: N, E, 00, 011
source-CanPagesCa.php: N, E, 00, 011
source-Eniro_SE.php: N, E, 00, 011
source-Google.php: N, E, 00, 011
source-Hitta_SE.php: N, E, 00, 011
source-Infobel.php: N*, E, 00, 011 (* only for the default country entered in the option)
source-LocalTel_CH.php: N, E, 00, 011
source-Lokaldelen_SE.php: N, E, OO, 011
source-PhoneSpamFilter.php N, E, 00, 011
source-PhoneSpamFilter_UK.php: N, E, 00, 011
source-Telco_Data.php: N, E, 00, 011
source-VoIPCNAM.php: N, E, 00, 011
source-White_Pages.php N, E, 00, 011
source-Who_Called.php: N, E, 00, 011
source-Yellow_Pages.php: N, E, 00, 011

Sources: DB
source-AsteriDex.php: will only check digit for digit with the AsteriDex database
source-Asterisk_Phonebook.php: will only check digit for digit with the Asterisk database
source-MySQL_DB.php: will only check digit for digit with the MySQL database
source-Open79XX.php: will only check [filter_length] rightmost digit for digit with the Open79xx database
source-SugarCRM.php: will only check [filter_length] rightmost digit for digit with the SugarCRM database
source-Superfecta_Cache.php: will only check digit for digit with the Superfecta database

Sources: Other
source-Trunk_Provided.php: N/A

Updated by tshif over 2 years ago

Patrick - tremendous! It looks to me as if the entire library has now been upgraded - please correct me if I am wrong about that.

If yes, perhaps its time to move this ticket to QS?

Updated by patrick_elx over 2 years ago

  • Status changed from Assigned to QA Testing

Let's put it in QA except for infobel.

Updated by tshif over 2 years ago

  • Status changed from QA Testing to Closed
  • % Done changed from 90 to 100

QS: Upgraded data-sorce scripts PASS QS

With the great flexibility in source providers that we have now - its getting very hard for a single person to test all the possible data sources. The same porblem is for the local db sources - folks tend not to have one-of-each. :)

So - based on my review of the code, and the fact that I dont detect any bad things when I include these sources in my test CID scheme - Im going to close this case as complete, and accept for inclusion in the 2.2.1 build all the data source file currently in the SVN - not including infobel pending the results from #192.

As you may have seen in the forums - I am asking for beta testers for this release (2.2.1) - mostly for this reason mentioned above. More folks in different locations will be better able to test many of the data sources.

The response to the request for beta testers has been underwhelming so far - but I didnt provide much lead time or notice to the beta test either.

My current thinking is that even if we get no actual beta test volunteers, if the active developers of the project (essentially myself, jjacobs and Patrick) agree is ready for release as scheduled - we will release.

Your toughts are always welcome - but unless someone thinks differently - this ticket is closed. :)

Also available in: Atom PDF