You are here

function sms_clickatell_map_message_status_code in SMS Framework 6

Map a Clickatell message status code to an SMS Framework message status code

Return value

SMS Framework message status code. See sms constants.

1 call to sms_clickatell_map_message_status_code()
sms_clickatell_receive_receipt in modules/sms_clickatell/sms_clickatell.module
Receive a message receipt from Clickatell

File

modules/sms_clickatell/sms_clickatell.module, line 482
Clickatell gateway module for Drupal SMS Framework. Outbound+Inbound+Receipts

Code

function sms_clickatell_map_message_status_code($code) {
  switch ($code) {
    case '003':
    case '004':
      return SMS_MSG_STATUS_DELIVERED;
    case '002':
    case '011':
      return SMS_MSG_STATUS_QUEUED;
    case '008':
      return SMS_MSG_STATUS_OK;
    case '001':
    case '005':
    case '006':
    case '007':
    case '009':
      return SMS_MSG_STATUS_ERROR;
    case '010':
      return SMS_MSG_STATUS_EXPIRED;
    case '012':
      return SMS_MSG_STATUS_NOCREDIT;
    default:
      return SMS_MSG_STATUS_UNKNOWN;
  }
}