I can't get critical response from sms_send() (like the message ID's from my provider) because sms_send's sms_handle_result() call doesn't allow the response from my gateway to get to the code calling sms_send. So I don't know which numbers were successful and which were not and which messageID's to use to get delivery reports.

How can we let the provider response get all the way back to the sms_send call when there's no error

Comments

almaudoh’s picture

A quick fix I did was:

function sms_handle_result($result, $number, $message) {
  if ($result['status']) {
    //return TRUE;
    return $result['data'];  // return actual data - won't break existing code unless strict conditional (sms_send(...) === TRUE) is used. How to handle that??
  }
  else {
  .....
  ...

If this is acceptable, I'll send in a patch.

aspope’s picture

Assigned: Unassigned » aspope
Category: task » feature

Hi almaudoh, thanks for bringing this up.

This feature is on the SMS Framework roadmap for 6.x-1.2 (coming after a bug-fix release - hopefully soon!)

Nothing solid yet, but the current thinking is that we could allow:
- Returning failed transmission details back to the calling function (if the caller wants it)
- Queuing the messages for auto re-transmission at a later time + delivery reports

dpi’s picture

Issue summary: View changes
Status: Active » Closed (outdated)