I am registered using my German cell number, but I am currently in New
Zealand. When I receive a message from someone, it usually shows up as a local
number, e.g. 021/1234567. If I reply to this message, an SMS is sent to +49
21/1234567, that is, Signal prefixes the number with my default country code,
not the country code of the country in which I am currently logged on.
Thanks,
martin
Related #5306, did @haffenloher have some suggestion for this?
Are you sure, @moxie0 that there is no way to get the current country code? I seem to think that the other messenging apps can do this just fine…
Alternatively, if you cannot get at the country code, why not just leave it out, e.g. send the message to 021/… in the example above and let the network figure it out?
@2-4601 yes, I think instead of always using the local number's CC, we could do something like this.
E.g. use
TelephonyManager.getNetworkCountryIso() for non-CDMA phonesBut maybe there are some problems with getNetworkCountryIso() that I'm not aware of?
duplicate of #5306
@moxie0 frankly, I find it a bit weird to close an issue as a duplicate of one filed later, especially after a possible solution has been proposed.
@moxie0 would you consider merging a PR that changes libtextsecure's PhoneNumberFormatter to use getNetworkCountryIso()?
@haffenloher Unfortunately not. It's insanely unreliable, and just inverts the problem. Our reality is that we have to e164 all numbers, and we have to do it consistently.
I am proposing to reopen this issue. I just ran into the same situation and it is extremely annoying. It basically means that I can't use Signal as my default text messaging app when I'm abroad and I went back to Android's default messaging app for now. To elaborate on this, consider the following situation (basically my situation right now):
Actual result: Provided that the phone number specified in the text message doesn't contain the country code, Signal will prepend the country code "+X" to the phone number. This leads to the following funny behavior: I text Bob (+Y 123456789), he replies and the incoming message will be filed in a new conversation with number +X 123456789. So I'll basically have one conversation for outgoing messages (+Y …) and one for incoming messages (+ X …), although the correspondent is the same. Now, consider the situation where I might not notice that and reply to the incoming message, in which case I am not only sending a text to the wrong number but I am also sending an international text which might cause me fees I didn't expect. (This is slightly different from the situation mentioned by OP where you don't buy a new SIM card but keep using your phone number from country A in country B. In this case you'd probably expect to pay additional fees for sending – now international – texts to Bob, anyway, though the specific fees for sending texts to numbers back in country A and for numbers in country B might differ, depending on the cellular provider.)
Expected result: Signal should prepend "+Y" to the number or nothing at all (the latter approach is taken by the default messaging app), so that incoming messages can be filed correctly and there is only one conversation.
Proposed solution: I understand that Signal must implicitly prepend country codes to phone numbers of contacts that don't carry a country code in order to find out whether those contacts are using Signal as well. However, I don't understand why this has to be done for numbers of incoming messages, too. If I receive an incoming unencrypted message from Bob, that means that Bob is not using Signal, anyway. (Otherwise his instance of Signal would have detected that I'm using Signal as well – if necessary by prepending Bob's country code to my phone number that Bob stored on his phone, see above.) So I suggest to simply omit this non-feature and follow the default messaging app's behavior (of not prepending a country code to numbers of incoming messages at all) so that Signal can finally be used abroad.
To put this into perpective, consider that, for the average Signal user Alice, it is – as of now – far more likely (by orders of magnitude!) to experience this issue than for her to run into another Signal user Bob abroad, exchange numbers with him and not store Bob's country code when taking down his number (and vice versa for Bob taking down Alice's number). The latter situation can also be fixed easily on a case-by-case basis by simply adding the country codes in each other's contact info, whereas the former situation cannot. (Besides, if I signed up for Signal with a foreign number, i.e. a number from country A, I wouldn't give Bob my local number to begin with but my foreign number including the correct country code, wouldn't I?)
Please let me know if I'm missing anything here.
Alternatively, if this proposal is rejected, how about introducing an option (for advanced users) to select the country code that should be prepended to local phone numbers of incoming messages? Maybe one could also notify the user once when there's a mismatch between the country code of the number he signed up with (that is used for incoming numbers) and the current country code provided by getNetworkCountryIso(). I mean the latter might not be reliable but if the notification is phrased correctly, it would at least put the user into power and allow him to adjust the setting if there is indeed a mismatch.
I also second @codethief. Running into this problem myself when switching my main (norwegian) simcard to a mexican one (while travelling) I suddenly can't use Signal as my main sms app as it insists on adding +47 all over the place.
So for a smooth Signal experience until everybody in the world comes to their senses and starts using encrypted chats it would be nice to have support for multiple sims/phone numbers for us travellers.
To expand on @codethief's report:
Let's assume that an existing simple-text conversation with some local number that is not in address book already exists.
An attempt to continue this conversation from another country will appear to succeed, while in fact new messages will either be send to a wrong number or get silently dropped altogether (in my case I was attempting to send messages to a UK number while being in Canada). To complicate things further there's no way to check what the message was actually sent to.
I'll second @codethief's suggestion to not assume/guess incoming texts country of origin, as it is at the very least misleading. An alternative approach might be not to use signal for simple text messaging and leave that to the default application.
I'm having the exact same problem as described in this and various other issues. But all of them have been closed without the problem being fixed apparently. So I'd like to second the request to address this issue. If the default message app can handle the problem, why can't Signal?
Piling on… I signed up for Signal while abroad (using a local SIM card) and now it prepends the other country's E164 prefix to all local numbers, so I have the problem "can't use Signal for SMS when at home."
I quite like @codethief's proposed solutions:
Another idea would be to avoid adding a CC prefix to incoming messages _if_ prepending a + to the number makes it valid E164.
How is this closed? This is one of the most annoying issues to exist especially when travelling abroad. Can someone please resolve this as the current situation is unacceptable.
Most helpful comment
@haffenloher Unfortunately not. It's insanely unreliable, and just inverts the problem. Our reality is that we have to e164 all numbers, and we have to do it consistently.