Answers.Body: <p>Looks like <code>sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php</code> is failing in function <code>function sendSMSMessage(</code> because <code>$doNotSms = TRUE;</code> on line 3154. Set it to false and you should be Ok. However, the check will not happen, so all numbers (even Do Not SMS #s) will get the SMS.</p>
  
  <p>The other option is to comment out the following block and add an if block: <code>
  /*
      if ($smsProviderParams['To']) {
        // If phone number is specified use it
        $toPhoneNumber = trim($smsProviderParams['To']);
        Civi::log()-&gt;debug(print_r($smsProviderParams, true)."\ntoID: $toID\n");
        //echo "&lt;pre&gt;".print_r($smsProviderParams, true)."&lt;/pre&gt;";
        $doNotSms = FALSE;
      }
      elseif ($toID) {
  */
      if ($toID) {
        // No phone number specified, so find a suitable one for the contact
  </code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T12:53:07.650Z
Answers.Text: Brilliant - option 1 worked a treat.  Thanks so much! FYI in wordpress it's line 1820
Answers.UserDisplayName: LesleyJill
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-27T09:36:16.047Z
Answers.LastActivityDate: 2018-06-27T09:51:08.020Z
Answers.LastEditDate: 2018-06-27T09:51:08.020Z
Answers.UserDisplayName: Dilip
Answers.Body: <p>Have raised this as an issue with the extension maintainers:</p>
  
  <p><a href="https://github.com/veda-consulting/org.civicrm.sms.clickatell/issues/20" rel="nofollow noreferrer">https://github.com/veda-consulting/org.civicrm.sms.clickatell/issues/20</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-22T16:56:11.563Z
Answers.Text: It's a Civi core bug, see https://lab.civicrm.org/dev/core/issues/273 .
Answers.UserDisplayName: davejenx
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-11T11:15:31.113Z
Answers.LastActivityDate: 2018-07-11T11:15:31.113Z
Answers.UserDisplayName: Michael Chaplin
Answers.Body: <p>This is a Civi core bug. It happens with Twilio too: I tested in Civi 5.4.0 .</p>
  
  <p>Seamus Lee has filed an <a href="https://lab.civicrm.org/dev/core/issues/273" rel="nofollow noreferrer">issue</a> against Civi core and submitted a <a href="https://github.com/civicrm/civicrm-core/commit/a9b7ee41eeae0a75d0c8bfc62caa81edf3024b83" rel="nofollow noreferrer">fix</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-22T16:55:16.313Z
Answers.LastActivityDate: 2018-08-22T17:09:22.490Z
Answers.LastEditDate: 2018-08-22T17:09:22.490Z
Answers.UserDisplayName: davejenx
Body: <p>wordpress 4.9.6 Clickatell 4.1
  All was working fine until upgrade to Civi 5.22 and upgrade to SMS API 1.5
  (yup in retrospect should have tested separately!)</p>
  
  <p>phone is home-mobile-primary </p>
  
Tags: <sms><clickatell>
Title: clickatell sms "Recipient phone number is invalid or recipient does not want to receive SMS"
ThreadText: # clickatell sms "Recipient phone number is invalid or recipient does not want to receive SMS"
  
  (Asked by: username_0 on 2018-06-26)
  
  wordpress 4.9.6 Clickatell 4.1
  All was working fine until upgrade to Civi 5.22 and upgrade to SMS API 1.5
  (yup in retrospect should have tested separately!)
  
  phone is home-mobile-primary
  
  **Tags:** sms, clickatell
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-06-27. Score: 2
  
  Looks like sites/all/modules/civicrm/CRM/Activity/BAO/Activity.php is failing in function function sendSMSMessage( because $doNotSms = TRUE; on line 3154. Set it to false and you should be Ok. However, the check will not happen, so all numbers (even Do Not SMS #s) will get the SMS.
  The other option is to comment out the following block and add an if block: 
  /*
      if ($smsProviderParams['To']) {
        // If phone number is specified use it
        $toPhoneNumber = trim($smsProviderParams['To']);
        Civi::log()->debug(print_r($smsProviderParams, true)."\ntoID: $toID\n");
        //echo "".print_r($smsProviderParams, true)."";
        $doNotSms = FALSE;
      }
      elseif ($toID) {
  */
      if ($toID) {
        // No phone number specified, so find a suitable one for the contact
  
  > **Comments:**
  > **username_0**: Brilliant - option 1 worked a treat.  Thanks so much! FYI in wordpress it's line 1820  
  
  ---
  
  ### Answer by username_2 on 2018-07-11. Score: 1
  
  Have raised this as an issue with the extension maintainers:
  
  <https://github.com/veda-consulting/org.civicrm.sms.clickatell/issues/20>
  
  > **Comments:**
  > **username_3**: It's a Civi core bug, see https://lab.civicrm.org/dev/core/issues/273 .  
  
  ---
  
  ### Answer by username_3 on 2018-08-22. Score: 0
  
  This is a Civi core bug. It happens with Twilio too: I tested in Civi 5.4.0 .
  
  Seamus Lee has filed an [issue](https://lab.civicrm.org/dev/core/issues/273) against Civi core and submitted a [fix](https://github.com/civicrm/civicrm-core/commit/a9b7ee41eeae0a75d0c8bfc62caa81edf3024b83).
  
  
  ---
  
  