I set up a clickatell account and configured it in Civi. It only works if the phone number has a 1 in front for the country code. None of our numbers have the country code, is there a way around this?
I just faced (and fixed) this problem three days ago for a client by patching the Clickatell extension to prepend the "1" where it doesn't already exist.
If you're not a developer, but you feel comfortable installing an extension from a zip file, I just made a Github repo here with the patched extension. That said - I don't want to post it as the "new" Clickatell extension, because it makes some country-specific assumptions.
You can see that I updated the CRM-14160 ticket with what I think is the ultimate solution - which is for CiviCRM to know the country code associated with each country. Then the Clickatell extension could check for whether it's present or not - and if not, then prepend it.
Update your numbers to include a country code.
This will vary based on the format you've input data, but the below works for the sample dataset used on the demo sites.
-- a couple of formats including area code and local number UPDATE civicrm_phone SET phone = CONCAT('+1 ', phone) WHERE phone LIKE '(___) ___-____'; UPDATE civicrm_phone SET phone = CONCAT('+1 ', phone) WHERE phone LIKE '___ ___-____'; -- local numbers get your assumed area code prepended also UPDATE civicrm_phone SET phone = CONCAT('+1 555 ', phone) WHERE phone LIKE '___-____';
When doing this, make sure to make backups and work on test data so you avoid loss.
There is a trigger
civicrm_phone_before_update which will handle updating the