Closed
Bug 1039444
Opened 10 years ago
Closed 10 years ago
Unable to make calls without prefix
Categories
(Hello (Loop) :: Server, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: fjcs, Unassigned)
References
Details
(Whiteboard: [loop server][blocking])
Attachments
(2 files)
User A registers in Loop with her phone number using prefix (i.e. +34). User B has User A in her phonebook without the international prefix, OR with prefix using double 0 (i.e. 0034). When User B tries to call User A, Loop interprets the number as a new one, and offers a new URL to contact her, instead of matching the already logged user.
Tested with Loop commit: cae484ed0c02a74c59d36c55e6798be120ad22d2
Updated•10 years ago
|
Whiteboard: [mobile app]
Updated•10 years ago
|
Assignee: nobody → ferjmoreno
Updated•10 years ago
|
Assignee: ferjmoreno → nobody
Updated•10 years ago
|
Component: Gaia::Loop → Server
Product: Firefox OS → Loop
Comment 1•10 years ago
|
||
I believe this should be a server side fix for a few reasons:
- We cannot really afford the memory overhead introduced by PhoneNumber.js [1] in the client.
- Fixing this issue in the server would solve it for all platforms (FxOS, Desktop and, eventually, Android and other mobile clients).
- The regular telephony network is the one responsible for adding the network prefix to phone numbers that doesn't already contain it, so it makes sense for Loop to do this in the server side as well.
In order to fix this on the server, we need to add the client MCC to the POST /calls/{token} and POST /calls API methods.
[1] https://github.com/andreasgal/PhoneNumber.js
Comment 2•10 years ago
|
||
Fernando, would this work better if we store and match the number with the double 0 all the time, for instance?
Comment 3•10 years ago
|
||
No what we need to do is to normalize all phone numbers to a MSISDN before doing the matching.
I am already using https://www.npmjs.org/package/phone for MSISDN to get a valid MSISDN number, but it needs the country letters so we need to have a table to get the country from the country code.
Comment 4•10 years ago
|
||
(In reply to Rémy Hubscher (:natim) from comment #3)
> No what we need to do is to normalize all phone numbers to a MSISDN before
> doing the matching.
>
Exactly.
> I am already using https://www.npmjs.org/package/phone for MSISDN to get a
> valid MSISDN number, but it needs the country letters so we need to have a
> table to get the country from the country code.
I guess we can use the same table that we have for the MobileID client https://mxr.mozilla.org/gaia/source/shared/resources/mcc.json
Comment 5•10 years ago
|
||
I guess we can do that on the server side, yes.
I see some problems, though: how would the client know that the call is coming from an entry in their address book if the number is not the same? Solving this on the client side would help getting this easier, don't you think?
Comment 6•10 years ago
|
||
(In reply to Alexis Metaireau (:alexis) from comment #5)
> I see some problems, though: how would the client know that the call is
> coming from an entry in their address book if the number is not the same?
> Solving this on the client side would help getting this easier, don't you
> think?
I'm not sure where it lives, but the phone must have code for dealing with this somewhere. If you have anything other than a fully-qualified E.164 number in your address book, then the terminal must already deal with mapping from the full number to the address book entry.
In practice, this is a much easier problem to solve; using the MNC, you pull up the trunk code and exit code(s) for the country the SIM corresponds to, and strip these from the beginning of any numbers stored in the phone book. Then, you see which address book entry matches the end of the number you've received. It's nowhere near as complex as building up a full number from a partial address book entry.
Comment 7•10 years ago
|
||
(In reply to Alexis Metaireau (:alexis) from comment #5)
> I guess we can do that on the server side, yes.
>
> I see some problems, though: how would the client know that the call is
> coming from an entry in their address book if the number is not the same?
> Solving this on the client side would help getting this easier, don't you
> think?
I think this is already handled by the Contacts API. We just need to use a "match" [1] filter instead of an "equal" filter for phone numbers.
[1] https://mxr.mozilla.org/mozilla-central/source/dom/contacts/fallback/ContactDB.jsm#1285
Comment 8•10 years ago
|
||
Ok so this means we should receive both the MCC and the number on the POST /calls endpoint?
Should we change https://wiki.mozilla.org/index.php?title=Loop/Architecture/MVP ?
Comment 9•10 years ago
|
||
I've made this change to the API: https://wiki.mozilla.org/Loop/Architecture/MVP#POST_.2Fcalls
I will implement a patch for it but feel free to improve it.
Comment 10•10 years ago
|
||
Attachment #8478972 -
Flags: review?(alexis+bugs)
Updated•10 years ago
|
Whiteboard: [mobile app] → [loop server]
Updated•10 years ago
|
Status: NEW → ASSIGNED
Updated•10 years ago
|
Whiteboard: [loop server] → [loop server][blocking]
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Attachment #8478972 -
Flags: review?(alexis+bugs) → review+
Comment 12•10 years ago
|
||
Attachment #8479787 -
Flags: review?(tarek)
Comment 13•10 years ago
|
||
Comment on attachment 8479787 [details] [review]
Link to Github PR
+ minor nipick
Attachment #8479787 -
Flags: review?(tarek) → review+
Comment 14•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•