signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.52k stars 6.12k forks source link

failed to send sms to short number #4478

Closed calin2k closed 8 years ago

calin2k commented 8 years ago

signal 3.3.1 android 5.1.1 fails to send sms to short 4 digits number after aotomaticaly adding + country code to short number. can't find where to deactivate automatic countrycode prefix in signal.

hpmueller1971 commented 8 years ago

I can confirm this (Samsung Android 5.0.1); it did not happen with previous versions (not sure when it started, but ~10 days ago, with the last beta it worked)...

hpmueller1971 commented 8 years ago

After browsing through the source, i'd assume this commit caused the problem...?

riyapenn commented 8 years ago

Related: https://github.com/WhisperSystems/Signal-Android/issues/4453

iosian commented 8 years ago

Thanks for the fix but it (3.3.3) doesn't really solve the issue. While trying to send a SMS to a shortcode number like 6701, it still becomes +16701.

moxie0 commented 8 years ago

@iosian If you have an existing thread that got converted to +16701, you have to create a new one with just 6701. Alternately, if you receive a new message from 6701 it will create a new thread for you.

iosian commented 8 years ago

@moxie0 I cleaned all of the threads in the Signal, deleted the contact associates to 6701, and rebooted the handset. It still adds +1 to 6701. Thanks.

moxie0 commented 8 years ago

What country is your Signal number in, and how are you creating the thread?

mcginty commented 8 years ago

@iosian can you also put a debug log up when opening the conversation and trying to send?

iosian commented 8 years ago

@moxie0 It's in US. First hit the pen at the right bottom corner. Enter a number like 6701 (a fake number) using on screen keypad. Select "# New message to... 6701". On the left up corner it shows +16701. Send text through "Send unsecured SMS". Then check the SMS details using the "!". It shows "Via SMS To: #+16701".

@mcginty The log is at https://gist.github.com/anonymous/ba92b15118b4dfa8dd23

McLoo commented 8 years ago

Country code is added for me too. +49 in my case

moxie0 commented 8 years ago

Hmm, ok according to libphonenumber 5 and 6 digit numbers are valid shortcodes in +1. I know some carriers do shit with like 3 digit codes, though, so we should probably special case 4 digit or less numbers as shortcodes, except in countries where numbers can be 4 digits (I think that's less than 10 countries?).

moxie0 commented 8 years ago

I think this is why 40404 works, but 6701 doesn't.

iosian commented 8 years ago

@moxie0 For 5 digit numbers, they are working correctly. For 6 digit numbers like 266278, on the top left corner it shows exactly 6 digits, 266278, but in the message details it shows "To: # +1266278" instead.

moxie0 commented 8 years ago

@McLoo libphonenumber thinks that Germany only has 3 digit shortcodes (https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml#L2623), but wikipedia says that they are 5 or 6 digits. Do you have any sample shortcodes that could confirm one or the other? I noticed Twitter doesn't even have a shortcode for germany.

McLoo commented 8 years ago

@moxie0 can't remember that I've ever seen a 3 digit shortcode. Checked two carrier's list (youth protection because of sms prices) and there are 4, 5 and 6 digit shortcodes listed.

Edit: here is the list from Vodafone : http://www.vodafone.de/infofaxe/537.pdf

McLoo commented 8 years ago

Tried 5 digit two numbers. Country code, was added, but the SMS were properly sent and I got a deliver receipt on 3.4.0 :open_mouth:

McLoo commented 8 years ago

@moxie0 you might have expected it, but just for completeness: With 3.4.2 shortcodes work well for me (even the fancy 3 or less digit ones)

moxie0 commented 8 years ago

thanks!

On 11/16/2015 10:17 PM, McLoo wrote:

@moxie0 https://github.com/moxie0 you have might expected it, but just for completeness: With 3.4.2 shortcodes work well for me (even the fancy 3 or less digit ones)

— Reply to this email directly or view it on GitHub https://github.com/WhisperSystems/Signal-Android/issues/4478#issuecomment-157282080.

http://www.thoughtcrime.org

ghost commented 8 years ago

Same issue. Ottawa, Canada, SMS to 560560 for retrieving bus schedule. Signal appends +1 and message is undeliverable. Tried with Google messenger and it works. Signal 3.6.1 on Nexus 6.0

dominee commented 8 years ago

Hello. Same problem in Slovakia, O2 operator uses 99222 for managing all services via SMS. Signal 3.9.1 is prepending +421 to the number. The message is undelivered.

Nazta commented 7 years ago

So I'm guessing this is still a problem, since no one ever added 5 digit numbers to Norway on that list? Specially since the last updated made me unable to send messages to my bank.

pshemek commented 7 years ago

A 5-digit code in Poland is being prefixed (+48)

atenrok commented 6 years ago

Totally still a problem. Nothing has changed since I first reported it. Can't understand why this is closed... :/

74121, 39858 in MA USA

Signal never sends a text. I always need to switch to default text app.

anoteng commented 4 years ago

Signal is still unable to send messages to Norwegian 5-digit numbers

jonathancross commented 3 years ago

Short codes were not working here in Switzerland for 414 (buying stamps) when using a Swiss SIM card / number. Signal interpreted with country code as +41 414 and returned "Failed to send".

I found that (astoundingly) -- turning off all internet in the phone suddenly worked and the SMS could then be sent.

From what I see below, 414 should be understood as a "National Number":

https://github.com/google/libphonenumber/blob/61a6c7db3ab036e525fa2619770f40e3732f94fb/resources/ShortNumberMetadata.xml#L2300-L2302

Iru commented 2 years ago

Totally still a problem. Nothing has changed since I first reported it. Can't understand why this is closed... :/

74121, 39858 in MA USA

Signal never sends a text. I always need to switch to default text app.

Still broken today. Cannot reply to fraud messages from Chase etc (72166).

Unfortunately, @jonathancross approach does not work for me.