1

SMS API version 1.2 & Clickatell version 2 extensions were added. Clickatell was set as an SMS Provider. Clickatell was working with version 1 of the extension and 4.5.8 of civicrm.

When sending the sms, there is no indication of a failure, it just never gets sent.

Log file output - 2015-06-16 21:30:02 Send Scheduled SMS
Entity: Job Action: process_sms Summary Finished execution of Send Scheduled SMS with result: Success (a:0:{}) Details

Parameters parsed (and passed to API method): a:1:{s:7:"version";i:3;}

Full message: Finished execution of Send Scheduled SMS with result: Success (a:0:{})

LOG FILE-
Jun 16 22:45:02  [info] $INSERT INTO civicrm_job_log (domain_id , description ) VALUES ( 1 , 'Finishing scheduled jobs execution.' )  = #0 /home/depot/public_html/drupal/sites/all/modules/civicrm/CRM/Core/Error.php(608): CRM_Core_Error::backtrace("INSERT INTO civicrm_job_log (domain_id , description ) VALUES ( 1 , 'Finishin...", TRUE)
#1 /home/depot/public_html/drupal/sites/all/modules/civicrm/packages/DB/DataObject.php(2380): CRM_Core_Error::debug_query("INSERT INTO civicrm_job_log (domain_id , description ) VALUES ( 1 , 'Finishin...")
#2 /home/depot/public_html/drupal/sites/all/modules/civicrm/packages/DB/DataObject.php(1060): DB_DataObject->_query("INSERT INTO civicrm_job_log (domain_id , description ) VALUES ( 1 , 'Finishin...")
#3 /home/depot/public_html/drupal/sites/all/modules/civicrm/CRM/Core/DAO.php(450): DB_DataObject->insert()
#4 /home/depot/public_html/drupal/sites/all/modules/civicrm/CRM/Core/JobManager.php(237): CRM_Core_DAO->save()
#5 /home/depot/public_html/drupal/sites/all/modules/civicrm/CRM/Core/JobManager.php(87): CRM_Core_JobManager->logEntry("Finishing scheduled jobs execution.")
#6 /home/depot/public_html/drupal/sites/all/modules/civicrm/api/v3/Job.php(99): CRM_Core_JobManager->execute(FALSE)
#7 /home/depot/public_html/drupal/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_job_execute((Array:2))
#8 /home/depot/public_html/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php(96): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#9 /home/depot/public_html/drupal/sites/all/modules/civicrm/api/api.php(23): Civi\API\Kernel->run("job", "execute", (Array:2), NULL)
#10 /home/depot/public_html/drupal/sites/all/modules/civicrm/drupal/drush/civicrm.drush.inc(1533): civicrm_api("job", "execute", (Array:2))
#11 [internal function](): drush_civicrm_api("job.execute", "auth=0")
#12 /usr/bin/drush-4.x/includes/command.inc(131): call_user_func_array("drush_civicrm_api", (Array:2))
#13 /usr/bin/drush-4.x/includes/command.inc(836): _drush_invoke_args("civicrm-api", (Array:2), "civicrm")
#14 [internal function](): drush_command("job.execute", "auth=0")
#15 /usr/bin/drush-4.x/includes/command.inc(236): call_user_func_array("drush_command", (Array:2))
#16 /usr/bin/drush-4.x/drush.php(101): drush_dispatch((Array:22))
#17 /usr/bin/drush-4.x/drush.php(41): drush_main()
#18 {main}
2

I use Twilio, but had this problem too. I found what i believe to be a bug in Civi's mailing code (which also handles sms'es). In the function create in CRM/Mailing/BAO/Mailing.php on line 1755, getRecipients are called without the last argument $mode, and getRecipients are executed as if it's an email and not an SMS. I added a check to see if it's and sms, and added the extra argument, and it worked for me:

  // Populate the recipients.
  if (empty($params['_skip_evil_bao_auto_recipients_'])) {
    // check if it's an sms
    $mode = $mailing->sms_provider_id ? 'sms' : NULL;
    self::getRecipients($job->id, $mailing->id, NULL, NULL, TRUE, $mailing->dedupe_email, $mode);
  }

Read more at the issue I filed here.

|improve this answer|||||
0

You probably have to determine in which extension your error is, the SMS API or the Clickatell part. The SMS API is an extension, which you can find here: https://github.com/CiviCooP/org.civicoop.smsapi

It is probably a good idea to raise your issue in GitHub so the developers and maintainers are aware of it. According to the documentation the extension works with CiviCRM 4.5 and has not been upgraded to version 4.6. You can either ask the developers/maintainers if they already have any plans to upgrade the extension (and fix your error). Alternative is to upgrade the extension yourself if you can?

|improve this answer|||||
  • Can you see if an activity was recorded for the contact? If so, the API action in itself is OK but the actual sending of the SMS is not correct. The problem is then probably in the Clickatell part. – ErikH - CiviCooP Jun 17 '15 at 5:26
  • No activity recorded when I look under mailing report activity and set it for outbound sms. However, when I change the date range for the last 2 years it doesn't show any either and they were working. – user21507 Jun 17 '15 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.