Closed Bug 815091 Opened 13 years ago Closed 12 years ago

Support for international prefixes

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file, 2 obsolete files)

Currently only france, brazil, UK, US are supported. I wrote a patch that adds any international prefix: https://en.wikipedia.org/wiki/Country_calling_code
Attached patch patch (obsolete) — Splinter Review
Attachment #685096 - Flags: review?(etienne)
Comment on attachment 685096 [details] [diff] [review] patch Review of attachment 685096 [details] [diff] [review]: ----------------------------------------------------------------- We could maybe have a "grab bag path" with all the prefixes but I'd like to keep the proper trunk code support when we have the data (and not generate extra variants). But the main issue is: we should check to see if the international numbers support is going to be handled by the platform for the Dialer too (it is for the SMS app). ::: shared/js/simple_phone_matcher.js @@ +86,5 @@ > _mccWith00Prefix: ['208', '214', '234', '235', '724'], > _mccWith011Prefix: ['310', '311', '312', '313', '314', '315', '316'], > > + // https://en.wikipedia.org/wiki/Country_calling_code > + _countryPrefixes: [ The issue is, we're loosing the Trunk Code support here which will cause extra variants to be generated which can cause false matches...
Attachment #685096 - Flags: review?(etienne) → review-
Gregor do you know about the telephony API doing international numbers stuffs?
Flags: needinfo?(anygregor)
Maybe we can have: _countryPrefixes: [ { p: 44, tc: false },... so we can change the trunk code variant only if needed.
(In reply to Andrea Marchesini (:baku) from comment #4) > Maybe we can have: _countryPrefixes: [ { p: 44, tc: false },... > so we can change the trunk code variant only if needed. I like this idea :)
Attached patch patch b (obsolete) — Splinter Review
Attachment #685096 - Attachment is obsolete: true
Attachment #685151 - Flags: review?(etienne)
We should have all this in https://hg.mozilla.org/mozilla-central/file/597915b66059/dom/phonenumberutils But we have to connect it.
Flags: needinfo?(anygregor)
Gregor, do we have any plan to connect this phone number module? Is this a public API?
Comment on attachment 685151 [details] [diff] [review] patch b Review of attachment 685151 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the comment explaining the structure added ::: shared/js/simple_phone_matcher.js @@ +86,4 @@ > _mccWith00Prefix: ['208', '214', '234', '235', '724'], > _mccWith011Prefix: ['310', '311', '312', '313', '314', '315', '316'], > > + // https://en.wikipedia.org/wiki/Country_calling_code Please add a comment explaining the format of the |_countryPrefixes| array and mentioning https://en.wikipedia.org/wiki/Trunk_code
Attachment #685151 - Flags: review?(etienne) → review+
Attached patch patch cSplinter Review
Attachment #685151 - Attachment is obsolete: true
Attachment #686054 - Flags: review+
Comment on attachment 686054 [details] [diff] [review] patch c NOTE: If blocking-basecamp+ is set, just land it for now. [Approval Request Comment] User impact if declined: Right now, the international phone numbers are not associated with contacts. Risk to taking this patch (and alternatives if risky): I don't see any risk.
Attachment #686054 - Flags: approval-gaia-master?(fabrice)
Fabrice, can you take a look at this?
Attachment #686054 - Flags: approval-gaia-master?(fabrice) → approval-gaia-master+
Assignee: nobody → amarchesini
Keywords: checkin-needed
Can someone merge this please? It seems to be approved and ready to land as far as I can tell.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: