Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: Unscheduled
-
Component/s: None
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Needs Funding
Description
Problem: I had a number in my database stored as 07817 802299. I sent this to clickatell. Clickatell adds a default international code (based on my clickatell settings). When it came back to CiviCRM, we couldn't match it back up with the contact because we weren't clever enough to work out that 07817 802299 is the same as 447817802299.
I added code to CRM_SMS_Provider::inbound() to perform an extra search for the contact before deciding to add a new contact. The extra search basically checks to see if the number that this is coming from is in the same country as the default country. If it is, it removes the country code so that it can try and match with any phone numbers in the DB that are in national format.
A couple of other improvements: it doesn't match for deleted contacts and it uses the new phone_numeric field rather than the old phone field.
Since we need to know phone number country codes for all countries to do this, these need to be added to the upgrade script.
Attachments
Issue Links
- supplements
-
CRM-11292 Format and validate phone numbers
- Done/Fixed