Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Contact synchronization issue due to phone number format #127

Closed
juergbi opened this issue Oct 6, 2012 · 20 comments
Closed

Contact synchronization issue due to phone number format #127

juergbi opened this issue Oct 6, 2012 · 20 comments

Comments

@juergbi
Copy link

juergbi commented Oct 6, 2012

I've noticed that contact synchronization does not work for phone contacts where the number is stored in the following format: +1 (234) 567 890. Tested with latest CepiPerez build (04102012-1410).

@juergbi
Copy link
Author

juergbi commented Oct 6, 2012

With the following patch, I can sync all my contacts: https://gist.github.com/3844886

There may be a more elegant way to solve this, but it appears to work.

@CODeRUS
Copy link
Contributor

CODeRUS commented Oct 19, 2012

you really have extra symbols in number field in your Contacts and it working?
LOL

sorry, this situation really forced me to laugh some minutes.

@ynohtnalude
Copy link

This issue appear for me now that I just install 0.9.12 from wazzap.im

It didn't have this with the first release and when upgraded to 0.2.7 everything still seemed fine though I'm not sure if it was really working or not. When I put 0.9.12 I deleted my DB file so had to sync everything again.

@jalyst
Copy link

jalyst commented Nov 11, 2012

I don't see why one would have +1 in front of their ph contacts in the 1st place, can't find it in front of any of mine...

@juergbi
Copy link
Author

juergbi commented Nov 11, 2012

That's the international dialing prefix, which is very common as you need it when calling from abroad. However, this is not the issue, all my numbers are stored in the international format. The issue is caused by the parentheses and spaces used to make the phone number more legible.

@jalyst
Copy link

jalyst commented Nov 11, 2012

Yeah I know it's the int. dialing prefix, however personally I don't bother with ensuring all my ph contacts have it in front, heck many of them don't even have the country code in front.

"The issue is caused by the parentheses and spaces used to make the phone number more legible."

Ah I see, thanks...

@ynohtnalude
Copy link

If you travel a lot, the + makes calling people wherever you are a lot easier

@jalyst
Copy link

jalyst commented Nov 11, 2012

Yeah, �I guess...

@CODeRUS
Copy link
Contributor

CODeRUS commented Nov 11, 2012

so, what is your country number for inside?

my country have 89121234567 and +79121234567
if 8 is 7+1 and it same for all countries we can make simple replacement

@juergbi
Copy link
Author

juergbi commented Nov 11, 2012

As I mentioned above, using the international phone number format doesn't appear to cause any issues.

Local phone number formats vary between countries. Many countries use a trunk prefix such as 0 (e.g., many European countries), 1 (e.g., North America), or 8 (e.g., Russia). Other countries don't use a trunk prefix at all.

@ynohtnalude
Copy link

Coderus, to be clear, what needs to happen is the following

phone number entries that contain: spaces, hyphen, periods or parenthesis

wazap needs to remove or ignore them. For example

+1 (604) 123-4567 wazzap should read as +16041234567
+852 1234 5678 wazzap should read as +85212345678
+33.47.56.32.78 wazzap should read as +3347563278

I'm not sure if there are other number formats that use different characters for their number formats.

@knobtviker
Copy link
Contributor

A simple regex that filters out only numbers is easy to find on Internet or write.
However, the plus sign should be handled properly.

@CODeRUS
Copy link
Contributor

CODeRUS commented Nov 11, 2012

sure, i understand about symbols
i asking about not international numbers
i need samples here

@ynohtnalude
Copy link

The + usually replaces local exit codes to dial long distance numbers. like North America is 1 for within North America, outside north america you dial 011

I know in other places like asia or europe you do a single 0 or double 00 sometimes. I don't know if there's a written standard somewhere but our phones normally already know how to handle all situations and understand what are country codes and what is not. Maybe there's a standard database or maybe it's really small. I'm not sure.

For normal whatsapp, I needed to put the country code with the number for it to be detected. 85212345678 where 852 is the country code.

@pablosambuco
Copy link

I just read this issue... is this still active?

The thing here is that there is no standard for the "international call" prefix (the digits you have to dial for calling OUT of the country you are). The ISO standard only establishes codes for "country calling codes".

For example, from Argentina I have to dial '00' to call any other country (complete list here: http://en.wikipedia.org/wiki/International_call_prefix)

For mobile phones, that prefix can be replaced by "+"

So, if you are in ANY country and you need to call (for example) me, it would be +549116369XXXX. where 54 is the country code for Argentina, 9 is for mobile calls, 11 is regional code for Buenos Aires and the rest is my local number.

In Whatsapp my id is 549116369XXXX, while in my friends' contact list I'm registered as 116369XXXX

Wazapp should remove al spaces, dashes, dots, commas, and leading zeros, but I don't think official Whatsapp client is able to handle numbers such as 011(54)9116369XXXX (for calling me from USA).

@CODeRUS
Copy link
Contributor

CODeRUS commented Dec 27, 2012

yes, your friends should add your "wazapp" number as second in your phone profile to be able to see you in wazapp.

@pablosambuco
Copy link

CODeRUS, I was just adding some examples, everything is working flawlessly for me :)

@CODeRUS
Copy link
Contributor

CODeRUS commented Dec 27, 2012

i just agreed about this cases. cant be handled.

@TimmW123
Copy link

TimmW123 commented Jan 8, 2013

Hi,

sorry for bothering - but why it can't be handled ? As ynohtnalude mentioned above already, same holds true for me now when purging 0.2x version and reinstall 0.9.16 - the contacts with the structured phone number format are not sync'ed to WazApp anymore, but it worked in the earlier Version. I also do not want to debate what is the wrong or right format or what are reasons to add symbols/special characters to a number string - but so it is. I guess the solution may just be for WazApp to parse the numbers and get rid of all dots, dashes, spaces, brackets as suggested above.

Just my 2 Cents, I really like this app and the point taht someone to care to make this feature available to teh N9 users, pleas carry on ;-)

@CODeRUS
Copy link
Contributor

CODeRUS commented Jan 8, 2013

#217

@tgalal tgalal closed this as completed in 5f06dfd Jan 10, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants