I agree this might cause confusion, there is some information missing. That is, I receive one more info from the upper layer that says whether it is a foreign number or not. My function does not receive the + or 00, in your case the function receives 1AAABBBCCC.. for US (if your numbers are stored in international format) and 7AAABBBCCC... for Russia. In your case, for Russia I'll get the info from upper layer that it is a foreign number. So, here is the algorithm:Here is what it says in 1st post about prefix:
My country (I assume that this is country I'm calling FROM ... is USA, so prefix will be 1 )
So I'm in USA and my number is +1 (AAA) BBB-CCCC and I'm calling Russia +7 (XXX) YYY-ZZZZ. According to this algoritm
Number (+7 ...) DOES NOT start with prefix (1)
Number (+7 ...) DOES NOT start with 0
So we and up with "prefix with country code", but you say that "prefix is your country code (e.g. 90 for Turkey, 32 for Belgium, 49 for Germany, ...)"
and what it gives me ? "11" ?
Anyway, I'm not sure how with this algorithm I will end up with proper destination number of 007XXXYYYZZZZZ
Another thing ... for option 5 (for international SMS only) how you determine if destination# is "foreign" ?
if ((foreign_number) || (number starts with prefix)) {
no change
}
else if (number starts with 0) {
remove the 0 and prefix with country code
}
else {
prefix with country code
}
BTW: Would you mind sending me a Google Voice invitation?
Last edited: