• en
    • fr
Contact : +33(0)4.13.41.50.70
  • en
    • fr

Managing delivery reports

Fields of application

Name Definition
message_id Ticket of the original message
number Mobile number
status Acknowledgement status
delivery_date Date of acknowledgement in format “Y-m-d H:m:s” (Y-m-d H:i:s)

The request fields can also been sent as an array

 

Possible values for the “status” field:

  • ACK (received by the operator. intermediate status)
  • DELIVERED
  • NOT_DELIVERED
  • INVALID_DESTINATION_ADDRESS
  • NOT_ALLOWED
  • UNKNOWN_DELIVERY
  • UNDEFINED
  • OUT_OF_DATE
  • EXPIRED
  • BLACKLISTED_NUMBER

 

Simple example of a PHP recovery script

$fp = fopen(‘callbacks.txt’, ‘a’);

fputs($fp, ‘message_id : ‘ . $_POST[‘message_id’] . “n”);
fputs($fp, ‘number : ‘ . $_POST[‘number’] . “n”);
fputs($fp,status : ‘ . $_POST[status] . “n”);
fputs($fp, delivery_date : ‘ . $_POST[delivery_date] . “n”);

fclose($fp);

Simple sample of PHP scratching, with arrays, in your script

$fp = fopen(‘callbacks.txt’, ‘a’);

$message_ids = $_POST[‘message_id’];
$numbers = $_POST[‘number’];
$status = $_POST[‘status’];
$delivery_dates = $_POST[‘delivery_date’];

for($i=0, $i < count($messages_ids); $i++)
{
fputs($fp, ‘message_id : ‘ . $message_ids[$i] . “n”);
fputs($fp, ‘number : ‘ . $numbers[$i] . “n”);
fputs($fp, ‘status : ‘ . $status[$i] . “n”);
fputs($fp, ‘delivery_date : ‘ . $delivery_dates[$i] . “n”);
}

fclose($fp);