CHT 5.0 is here! 🎉 Discover what’s new!

.sms

**SMS Settings**: Instructions and schema for defining SMS settings

SMS settings are defined under the sms key, as an object supporting the following properties:

app_settings.json .sms

propertydefaultdescription
outgoing_servicemedic-gatewayDefines the service to use to send SMS messages. Currently supports “medic-gateway”, “africas-talking” or “rapidpro”. For more information read the documentation on “africas-talking” configuration and “rapidpro” configuration.
duplicate_limit5The number of identical sms message allowed to be sent to the same recipient.
clear_failing_schedulesfalseWhen true, scheduled messages that fail to be generated or sent for various reasons (e.g., empty messages, template issues, or general generation failures) are cleared from the instance’s processing queue. This ensures that past messages that were unable to be sent do not perpetually remain scheduled. Available from 5.1.0
default_to_sendertrueWhen true, messages without valid recipients are sent to the sender. When false, messages without valid recipients are not sent to the sender. Available from 5.1.0

Code sample

The definition takes the typical form below:

"sms": {
  "outgoing_service": "medic-gateway",
  "duplicate_limit": "2",
  "clear_failing_schedules": "true",
  "default_to_sender": "false"
}

Duplicate SMS messages handling

Every time a service (API or Sentinel) creates an SMS, we cache the recipient, and the message content, along with the current timestamp. When more than duplicate_limit messages have been created for the same pair of recipient+content, within the cache time limit, we mark the new message with a “duplicate” status. Such messages are never sent. The cache is cleared 30 minutes after the last SMS message for a specific pair was generated.

Last updated on

Did this documentation help you ?