Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages in Argentina #1511

Closed
bleiva opened this issue May 19, 2014 · 16 comments
Closed

Error messages in Argentina #1511

bleiva opened this issue May 19, 2014 · 16 comments

Comments

@bleiva
Copy link

bleiva commented May 19, 2014

For example I live in Buenos Aires and my friend too, so when I need to send a sms to my friend (In Buenos Aires), I have 4 numbers to send it:

11-245678
15-245678
11-15-245678
+54-11-245678

+54: Code for country
11: Code for Buenos Aires (Sometimes is posible using 011)
15: This is a prefix for mobile phones.

When I must register in Texsecure to use push message, I must add a number, the 9. So, if you want to call to me o want to send a message to me, you need add a 9. This is only for people outside Argentina.

Example:

+54-9-11245678 (+54 Argentina Code, get off the code 15, and put the code 11)

Possible problems for this:

  1. If I want to register in Textsecure without 9, the message never arrive. Neither the call. Nobody knows in Argentina that is necessary this, so we have problems in this step.
  2. If I want to send a push message to my friend, I need add her to my contacts with the number (+54911245678) like she would be in another country.
  3. If I send her a push message with the number 11245678 or 15245678 don't work. (message incorrect cipher). The most people don't know when they need to put the numer 9 or the +54, so the message never will arrive between friends.
  4. If I 'm online (with internet) and send to my friend a message and she has internet too the message arrive correct both.
  5. If I'm offline (without internet) and send to my friend a message and she has internet, doesn't work. (message incorrect cipher). This error is really annoying because If somebody of us doesn't has internet, the message says incorrect cipher. In Argentina is very common that some places don't have 3g signal.

I hope this help you. Thanks for all.

Best regards.

@tinloaf
Copy link
Contributor

tinloaf commented May 19, 2014

This sounds incredibly complicated. So, you have different numbers when being called from outside Argentina than when being called from the inside? How do other apps that do verification (like WhatsApp etc.) circumvent this problem?

@bleiva
Copy link
Author

bleiva commented May 19, 2014

Hi, tinloaf. What you say is correct. If anybody outside Argentina call to somebody in Argentina, is necessary to add the nine. I don't know how Whatsapp works, but when I want to register there , I put 11245678 (the +54 is fixed in Whatsapp App for Argentina). When I want to send a message to a friend (both in Argentina), just with the number 11245678 works perfectly. If I want to send a message to a friend who live in Poland, for example, my number arrive there with the nine. (+54911245678).

@a7359324
Copy link

I don't know how TextSecure works internally, but a possible solution to this goes as follows:
When someone from Argentina register his phone, the server should add the magic 9 when sending sms/call. This is the easiest way, as none in Argentina knows about this '9' thing. (this fixes problem 1)
Internally, the server should save it (i think) without the nine. Because when other people from Argentina search for number of his contacts, they have them without the magic 9. (this fixes problem 2)

The server should be aware when someone from Argentina is sending a push message to a cellphone with abbreviated number (11-xxxx-xxxx OR 15-xxxx-xxxx) , and complete the number accordingly (that would be +54-11-xxxx-xxxx in the first case OR +54-[own city code]-xxxx-xxxx in the second case ) (this fixes problem 3)

If I understand problem 5 correctly, this happens because you are sending an SMS to a number with the 9 (to circumvent problem 2). With the fix nº2, it will fix this problem also, as you will not have added the 9 to your friend's number in the first place.

Problem nº6. Someone from poland search for an Argentina number. The poland client will have the number with the 9. So the server should be aware that that's an Argentinean number, when searching for the contact in the server database (by removing the number when searched). This also happens when the poland client sends a push message. This will solve problem 6. (The SMSs from the poland client will arrive fine since he has the number with the 9).

The good news about this is that the solution is completely server side I think. (I'm not sure if "message incorrect cipher" is a reply from the server after failing to find the number in his db, but if it is, it is server side problem.)

After fixing this, it would be a good idea to find all the numbers from Argentina that registered by adding the 9, and remove the 9 from the number).

It would be odd if Argentina was the only country with these anomalies. We should find out all the other countries magic numbers.

@a7359324
Copy link

dude
This is how I see a contact which I added as 11-XXXX-XXXX. WhatsApp added the +54119 automatically.

@mcginty
Copy link
Contributor

mcginty commented Jul 16, 2014

@a7359324 we just pushed 2.1.0 to the Play store which may resolve this problem. Can you try creating a conversation with a contact in the updated version and report back on the issue's status after that?

@a7359324
Copy link

@mcginty I started testing problem 1 (registering without adding the 9)
The verification by SMS works.
The verification by phone doesn't work.
(They both still work with the 9)
Since I'm testing on a VM and I don't know how to simulate an SMS, I'll be waiting for a fix to continue testing problems 2-6.

@drzraf
Copy link

drzraf commented Feb 22, 2016

Coming from #5270,
The Android API already provides the country code.
From this, it may be possible to know the area code (depending on the Android API?)
From the above two it should be fairly easy to map phones number from one scheme to another.

Could authors indicate sourcecode files which manage phone number schemes in order to pass it to phone-based contact search?

There is methods for phone number i18n:
formatOutOfCountryCallingNumber
or a format(XXX , PhoneNumberUtil.PhoneNumberFormat numberFormat.INTERNATIONAL)

Looking at Argentina datafiles it should be straightforward on the Signal side.

NB: this bug in libphonenumber: https://github.com/googlei18n/libphonenumber/issues/684 is somehow related but is not blocking (it's about people omitting the "15" when calling from mobile phone)

@tandiljuan
Copy link

tandiljuan commented Jun 8, 2017

Same problem here.
If I register my mobile number like +5491234567890 (full international number) and my friends doesn't have me in their contact list with my full international number (eg 123 4567890), they won't find me in the Signal app and also I will not find them.
Also if I have my friends in my contact list with their full international number but they register with a different number (eg +54 123 4567891, missing 9) I won't find them in the Signal App and also they won't find me.
My suggestion is that the application must force to use international phone numbers. If the user doesn't have an international phone number, complete the missing numbers.
Wikipedia: Telephone Numbers in Argentina

@drzraf
Copy link

drzraf commented Jun 8, 2017 via email

@tandiljuan
Copy link

tandiljuan commented Jun 8, 2017

That's true. But I have two friends that registered their numbers (in Signal) without the 9 and they received the SMS (really weird).

I think the logic to force full international numbers is not complicated:

At register time, you must force to use full international number to send the SMS: [INTERNATIONAL CODE] + [AREA CODE] + [MOBILE NUMBER]. (In Argentina the international code will be +549, US +1, UK +44, Spain +34, etc).

Taking in mind that all full international numbers for a given country must have same length. I can see two scenarios regarding the numbers in your contact list:

  • Contacts from other countries: You must have them saved with their full international number. Otherwise you won't be able to call them. No problem here.
  • Contact from your same country:
    1. They are saved with the full international number (no problem)
    2. They are shorter than your full international number but larger than your [MOBILE NUMBER]. They are from the same country but from a different area. Just need to add your same [INTERNATIONAL CODE] to convert it to full international number.
    3. They have the same length as your [MOBILE NUMBER]. They are from your same city. Just need to add your same [INTERNATIONAL CODE] + [AREA CODE] to convert it to full international number.

In this way you just need to match full international numbers. And, taking in mind that they are unique, I think that it should solve the problem of missing contacts in Signal.

List of country calling codes

@Pesebrero
Copy link

@tandiljuan Please look at #4378, this issue is about the registration, the other is about other users who cannot see you as a Signal user, which you describe.

Also, in my experience, adding the "9" does not guarantee proper detection. In fact, I had the exact opposite situation (had to suppress the "9" for the number to work). Right now I have some contacts with the "9" and others without it.

Signal should redundantly search for any possible combinations to properly register a number, i.e. if I register any of these numbers (or have them in the contact list), Signal should search for all of them:
15XXXXXXXX
11XXXXXXXX
+5411XXXXXXXX
+54911XXXXXXXX
005411XXXXXXXX
0054911XXXXXXXX

Telegram does not have this issue AFAIK, perhaps it is possible to look at the code to see how it handles numbers from Argentina.

@drzraf
Copy link

drzraf commented Jun 10, 2017 via email

@tandiljuan
Copy link

@Pesebrero You have to remove the 9 because your contacts registered their cellphone number without the 9. You have them in your contact list as +5491231234567 but they registered as +541231234567.

I can confirm, in the registration process, the international number for Argentina is +54 (and not +549). So, if the user doesn't to enter the 9, the number nine won't be added automatically by Signal.

@mcginty Is this a Twilio issue? Or is something that you could force in the application side?

@drzraf If Signal properly force the users to register with international numbers (using the 9), there shouldn't be mayor issues to detect contacts. I've already explained the logic to do it. All countries have an international number, (almost all have?) an area code and then the phone number. Worth to mention that I've worked on a mobile application service, where we fixed this issue with the logic that I've mentioned.

So far, I think the only issue is the 9. Of course, it's needed to test other combinations.

US Area Codes By State
Spain Area Codes

@drzraf
Copy link

drzraf commented Jun 15, 2017 via email

@Pesebrero
Copy link

Pesebrero commented Jun 21, 2017

> Signal has no hint about the zone (they are ~250 of them!).= it's like if Argentina was adding 250 country-codes.
I have no idea how the push messaging system works. But, given the phone "knows" where the owner is located, Signal should use that information, at least for registration. For the contact list, it could make a "safe guess": if both users are from Argentina, then it should limit the search within the registered users in the country.

> From what I can remember I was having the same issue with Telegram, in Argentina in 2016: if there as a mismatch in the phonenumber notation, Telegram wouldn't find the contact (it may have changed since btw)
I have installed it very recently, and it correctly added the contacts I had with the "15XXXXXXXX" format. They were recognized as "+5411XXXXXXXX". Signal should be able to do the same.

> You have to remove the 9 because your contacts registered their cellphone number without the 9. You have them in your contact list as +5491231234567 but they registered as +541231234567.
It seems to be a random issue. I have re-registered the same number twice with and without the "9" (not being able to make it the other way). Also, I have seen a friend "forced" to re-register, first without the "9", then with the "9" again (perhaps because of testing being done on the Signal servers to solve this issue?)

@automated-signal
Copy link

GitHub Issue Cleanup:
See #7598 for more information.

@signalapp signalapp locked and limited conversation to collaborators Apr 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

8 participants