Inbound SMS concatenation

Question

  • How can we recognise multiple inbound SMS messages as one concatenated message?
  • How can we concatenate SMS replies into to single message?
  • Why are my SMS replies not being concatenated?
  • How can we display several inbound SMS as a single SMS on our website?
  • How can we identify single concatenated replies from multiple messages?

Context

When the receiver replies to a message with more than 160 characters, it also stored the message in the Nexmo dashboard as 2 or more messages. Some customers have a need to display the multiple messages as a single message.

Answer

To concatenate multiple inbound SMS messages you need to make use of the concat parameters passed to us by the carriers. You should be able to find 'concat', 'concat-ref', 'concat-total' and 'concat-part' in the req.query coming from the Nexmo Callback call. There's more information on this in our inbound sms docs.

This capability is dependent on the carriers supporting/sending these, though. If we receive UDH information from a carrier, we forward all the concat parameters to your application, both through GET or POST. Receiving these parameters from Nexmo is not something that can be activated on our settings if they are absent.

There is not a perfect way to detect concatenated messages without UDH information being provided by carriers. If it's the case that your inbound sms carriers don't support the UDH information, it could make sense to consider messages coming from the same number and within a close timestamp as concatenated - this could be reasonably reliable, but not 100% accurate. However this is only a suggestion and the configuration for this it would need to be carried out on your side.

Please note that due to carrier limitations, carrier US Sprint and Verizon does not provide 'concat', 'concat-ref', 'concat-total' and 'concat-part' information for inbound concatenated SMS so this information is not passed to the customer.

Have more questions? Submit a request