Goodwy / Dialer

GNU General Public License v3.0
64 stars 15 forks source link

Detect numbers with country code and without country code #46

Closed eblis closed 4 days ago

eblis commented 2 months ago

The app doesn't detect numbers with country code as belonging to contacts that have numbers configured without country code. For example I might have a contact with number 0123456789, and if I'm roaming in a different country and get a call from that number, the incoming phone number will be listed as +99123456789 and the app thinks it's an unknown number calling, it won't list the contact that is calling me, even though the number is the same, it's just that the country code was added to the number because I'm roaming.

It would be very nice if the app detected numbers with the country code added as belonging to the contact that has the same "partial" number, the same number, but without the country code.

eblis commented 2 months ago

I tried to reproduce this issue now and couldn't. I have 2 phones, each with a SIM from a different country.

I added the other phone's number in each phone as a contact, but added the number without any country code, just the normal local number.

When I call one phone from the other (and since they're SIMs from different countries it will always include the calling country code) it correctly identifies the calling number, even though the local contact does not have the country code assigned to the number.

Goodwy commented 2 months ago

If the caller number is greater than 7 characters, we look for a partial match in contacts, if 7 or less, the caller number must exactly match the contact number. Previously, this number was smaller and we often encountered incorrect contact identification. If now there are incorrect definitions, you can try to make this number 6.