<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Handling phone numbers</title>
	<atom:link href="http://blog.barisione.org/2010-06/handling-phone-numbers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.barisione.org/2010-06/handling-phone-numbers/</link>
	<description></description>
	<lastBuildDate>Mon, 16 Jan 2012 11:53:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Hugh Nguyen</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-5880</link>
		<dc:creator>Hugh Nguyen</dc:creator>
		<pubDate>Sat, 21 Aug 2010 03:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-5880</guid>
		<description>@barisione, thank for the reply. 
The users are in UK only. For people who come to UK, the forms often have more contact phone number fields so they can enter land line phone, which is not validated. 

I&#039;m also not convinced about the need to validate mobile phone number. But sometimes it&#039;s just because the stakeholders want it. Sometimes we don&#039;t challenges calls like this because it costs more troubles than just do it. I will present this algorithm along with some situations (one that you mentioned about people using not-UK mobile number) and see if they still want to do it.</description>
		<content:encoded><![CDATA[<p>@barisione, thank for the reply.<br />
The users are in UK only. For people who come to UK, the forms often have more contact phone number fields so they can enter land line phone, which is not validated. </p>
<p>I&#8217;m also not convinced about the need to validate mobile phone number. But sometimes it&#8217;s just because the stakeholders want it. Sometimes we don&#8217;t challenges calls like this because it costs more troubles than just do it. I will present this algorithm along with some situations (one that you mentioned about people using not-UK mobile number) and see if they still want to do it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barisione</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-5848</link>
		<dc:creator>barisione</dc:creator>
		<pubDate>Fri, 20 Aug 2010 08:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-5848</guid>
		<description>@Hugh Nguyen:
Are you sure you want to change what the user inserts? The format could change (and it happened in the past) while your application could not be updated.
What if the user wants to insert a non-UK phone number? When I moved to the UK I needed some weeks before getting a UK phone number. Then why just mobile phones?
Throwing away something in parenthesis is dangerous as somebody could put the whole prefix in parenthesis.
If you really want just UK mobile phone numbers your algorithm could work.</description>
		<content:encoded><![CDATA[<p>@Hugh Nguyen:<br />
Are you sure you want to change what the user inserts? The format could change (and it happened in the past) while your application could not be updated.<br />
What if the user wants to insert a non-UK phone number? When I moved to the UK I needed some weeks before getting a UK phone number. Then why just mobile phones?<br />
Throwing away something in parenthesis is dangerous as somebody could put the whole prefix in parenthesis.<br />
If you really want just UK mobile phone numbers your algorithm could work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugh Nguyen</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-5836</link>
		<dc:creator>Hugh Nguyen</dc:creator>
		<pubDate>Fri, 20 Aug 2010 03:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-5836</guid>
		<description>I am working on validating UK mobile phone format. Users do not want to follow strictly any rules. I tried to have this below algorithm to hopefully cover different cases of input. Please note that mobile number in UK have the format of 07XXXXXXXXX but it gets confusing when allowing users to enter country code.

1. The system first strips out any non-numeric text:
Examples:
Case 1: +44 (0)7966 335 263 becomes 4407966335263
Case 2: 0044 - 7966 335 263 becomes 00447966335263
Case 3: 07966335263 no change

2. If first 2 digits are “00”, strip them.
4407966335263 no change
00447966335263 becomes 447966335263
07966335263 no change

3. Then, first 2 digits are “44”, strip them.
4407966335263 becomes 07966335263
447966335263 becomes  7966335263
07966335263 no change

4. Then,  first 2 digits must be “07”; or first digit must be “7”. The rest of the number must have 9 digits. Otherwise, wrong format.

Please if you could check if this works?</description>
		<content:encoded><![CDATA[<p>I am working on validating UK mobile phone format. Users do not want to follow strictly any rules. I tried to have this below algorithm to hopefully cover different cases of input. Please note that mobile number in UK have the format of 07XXXXXXXXX but it gets confusing when allowing users to enter country code.</p>
<p>1. The system first strips out any non-numeric text:<br />
Examples:<br />
Case 1: +44 (0)7966 335 263 becomes 4407966335263<br />
Case 2: 0044 &#8211; 7966 335 263 becomes 00447966335263<br />
Case 3: 07966335263 no change</p>
<p>2. If first 2 digits are “00”, strip them.<br />
4407966335263 no change<br />
00447966335263 becomes 447966335263<br />
07966335263 no change</p>
<p>3. Then, first 2 digits are “44”, strip them.<br />
4407966335263 becomes 07966335263<br />
447966335263 becomes  7966335263<br />
07966335263 no change</p>
<p>4. Then,  first 2 digits must be “07”; or first digit must be “7”. The rest of the number must have 9 digits. Otherwise, wrong format.</p>
<p>Please if you could check if this works?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Wendt</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4329</link>
		<dc:creator>Fredrik Wendt</dc:creator>
		<pubDate>Sat, 17 Jul 2010 19:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4329</guid>
		<description>@barisione: Interesting. And thanks for sharing. On one level, I&#039;m truly sorry that you have to take contries at war into account.
At another level, I&#039;m sorry that the code being discussed here isn&#039;t free, so that I can change it to work the way I want it too. Obviously, I&#039;m prepared to move the code further than you are (in order to make it work better for me in my situation) - You want to adress the world&#039;s requirements, I&#039;m interested in mine.

That OpenMoko on my desk smiles at me. The N900 does too, but gives me a different feeling. ;-)</description>
		<content:encoded><![CDATA[<p>@barisione: Interesting. And thanks for sharing. On one level, I&#8217;m truly sorry that you have to take contries at war into account.<br />
At another level, I&#8217;m sorry that the code being discussed here isn&#8217;t free, so that I can change it to work the way I want it too. Obviously, I&#8217;m prepared to move the code further than you are (in order to make it work better for me in my situation) &#8211; You want to adress the world&#8217;s requirements, I&#8217;m interested in mine.</p>
<p>That OpenMoko on my desk smiles at me. The N900 does too, but gives me a different feeling. ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barisione</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4254</link>
		<dc:creator>barisione</dc:creator>
		<pubDate>Fri, 16 Jul 2010 14:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4254</guid>
		<description>@Mahmoud:
That doesn&#039;t even work with the examples I gave in the blog post.
You cannot really rely on that:
- A phone number could be callable with multiple different codes;
- The &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_international_call_prefixes&quot; rel=&quot;nofollow&quot;&gt;international call prefix&lt;/a&gt; is different in different countries (+, 00, 011);
- The same country could have different call prefixes for different purposes (like selecting a different operator);
- New countries or countries in war often use phone numbers for another country and then slowly move to a new scheme.</description>
		<content:encoded><![CDATA[<p>@Mahmoud:<br />
That doesn&#8217;t even work with the examples I gave in the blog post.<br />
You cannot really rely on that:<br />
- A phone number could be callable with multiple different codes;<br />
- The <a href="http://en.wikipedia.org/wiki/List_of_international_call_prefixes" rel="nofollow">international call prefix</a> is different in different countries (+, 00, 011);<br />
- The same country could have different call prefixes for different purposes (like selecting a different operator);<br />
- New countries or countries in war often use phone numbers for another country and then slowly move to a new scheme.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahmoud</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4252</link>
		<dc:creator>Mahmoud</dc:creator>
		<pubDate>Fri, 16 Jul 2010 14:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4252</guid>
		<description>@barisione:
If the caller number has a country code prefix + or 00 at the beginning you can exclude the country code before the search so +99 123456789 will become 123456789 and search first with the full local number 123456789 before searching for 3456789. (country codes can be used from the ISO)

For your example, I agree there will not be a unique number because after excluding the +99 because there are two contacts with the same and thus it will show the number only (duplication). In this case the user is insisting on saving two contacts with the same number.

but if:
Contact A saved number: +99 123456789
Contact B saved number: 3456789
Caller: +88 123456789

The call might better be identified as coming from Contact B NOT Contact A (and there is no duplication) because the country code mismatch with Contact A. After finding a match, if both the caller and contact have country codes they must match, otherwise look for another match.

and if (no country code)
Caller: 01212345678
Contact A: 01212345678
Contact B: 01012345678

A match for &quot;12345678&quot; will find two but a match for &quot;212345678&quot; will find only one.

If this is expensive or complex, may be making the number of digits to search part of the regional settings or configurable is better.</description>
		<content:encoded><![CDATA[<p>@barisione:<br />
If the caller number has a country code prefix + or 00 at the beginning you can exclude the country code before the search so +99 123456789 will become 123456789 and search first with the full local number 123456789 before searching for 3456789. (country codes can be used from the ISO)</p>
<p>For your example, I agree there will not be a unique number because after excluding the +99 because there are two contacts with the same and thus it will show the number only (duplication). In this case the user is insisting on saving two contacts with the same number.</p>
<p>but if:<br />
Contact A saved number: +99 123456789<br />
Contact B saved number: 3456789<br />
Caller: +88 123456789</p>
<p>The call might better be identified as coming from Contact B NOT Contact A (and there is no duplication) because the country code mismatch with Contact A. After finding a match, if both the caller and contact have country codes they must match, otherwise look for another match.</p>
<p>and if (no country code)<br />
Caller: 01212345678<br />
Contact A: 01212345678<br />
Contact B: 01012345678</p>
<p>A match for &#8220;12345678&#8243; will find two but a match for &#8220;212345678&#8243; will find only one.</p>
<p>If this is expensive or complex, may be making the number of digits to search part of the regional settings or configurable is better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barisione</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4250</link>
		<dc:creator>barisione</dc:creator>
		<pubDate>Fri, 16 Jul 2010 13:35:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4250</guid>
		<description>@Fredrik Wendt, Mahmoud:
Multiple contacts can have the same phone number. It&#039;s needed to match *all* of them, not just one.
For instance, if you have your mother saved with phone number +991234567 and your dad with 01234567, you must match both of them when you look for +991234567, 01234567 or 00991234567.</description>
		<content:encoded><![CDATA[<p>@Fredrik Wendt, Mahmoud:<br />
Multiple contacts can have the same phone number. It&#8217;s needed to match *all* of them, not just one.<br />
For instance, if you have your mother saved with phone number +991234567 and your dad with 01234567, you must match both of them when you look for +991234567, 01234567 or 00991234567.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mahmoud</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4244</link>
		<dc:creator>Mahmoud</dc:creator>
		<pubDate>Fri, 16 Jul 2010 11:36:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4244</guid>
		<description>An always fixed 6-7 digits match is not good enough. As an example Egypt is moving to 8 digits after the area / operator code, ex. 023 12345678. The current search algorithm in PR1.2 will not work.

Why not before searching with only 7 digits, search with the full caller number, if it matches one contact then show it. Else reduce the digits and look for a 7 digits match.

Use more than one way to try to find only 1 match.

If I do not have contacts with the same full number, I would expect the caller name to appear even if some contacts share the last 6 or 7 digits as long as the carrier is sending a longer number of the caller.</description>
		<content:encoded><![CDATA[<p>An always fixed 6-7 digits match is not good enough. As an example Egypt is moving to 8 digits after the area / operator code, ex. 023 12345678. The current search algorithm in PR1.2 will not work.</p>
<p>Why not before searching with only 7 digits, search with the full caller number, if it matches one contact then show it. Else reduce the digits and look for a 7 digits match.</p>
<p>Use more than one way to try to find only 1 match.</p>
<p>If I do not have contacts with the same full number, I would expect the caller name to appear even if some contacts share the last 6 or 7 digits as long as the carrier is sending a longer number of the caller.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Wendt</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4243</link>
		<dc:creator>Fredrik Wendt</dc:creator>
		<pubDate>Fri, 16 Jul 2010 11:34:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4243</guid>
		<description>Sorry, would mind explaining that more specifically - I&#039;m not sure I follow: are you suggesting that my suggestion would break anything, or change behaviour to the worse? My suggestion doesn&#039;t solve everything, it just makes a couple of cases.</description>
		<content:encoded><![CDATA[<p>Sorry, would mind explaining that more specifically &#8211; I&#8217;m not sure I follow: are you suggesting that my suggestion would break anything, or change behaviour to the worse? My suggestion doesn&#8217;t solve everything, it just makes a couple of cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barisione</title>
		<link>http://blog.barisione.org/2010-06/handling-phone-numbers/comment-page-1/#comment-4242</link>
		<dc:creator>barisione</dc:creator>
		<pubDate>Fri, 16 Jul 2010 11:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.barisione.org/?p=312#comment-4242</guid>
		<description>@Fredrik Wendt:
That doesn&#039;t work if multiple people have the same phone number (maybe written in different ways).</description>
		<content:encoded><![CDATA[<p>@Fredrik Wendt:<br />
That doesn&#8217;t work if multiple people have the same phone number (maybe written in different ways).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

