Skip to content

MESSAGE()

Synopsis

Create a message or read fields from a message.

Description

This function will read from or write a value to a text message. It is used both to read the data out of an incoming message, as well as modify or create a message that will be sent outbound.

Syntax

MESSAGE(argument)
Arguments
  • argument - Field of the message to get or set.

    • to - When processing an incoming message, this will be set to the destination listed as the recipient of the message that was received by Asterisk.

      For an outgoing message, this will set the To header in the outgoing SIP message. This may be overridden by the "to" parameter of MessageSend.

    • from - When processing an incoming message, this will be set to the source of the message.

      For an outgoing message, this will set the From header in the outgoing SIP message. This may be overridden by the "from" parameter of MessageSend.

    • custom_data - Write-only. Mark or unmark all message headers for an outgoing message. The following values can be set:

      • mark_all_outbound - Mark all headers for an outgoing message.

      • clear_all_outbound - Unmark all headers for an outgoing message.

    • body - Read/Write. The message body. When processing an incoming message, this includes the body of the message that Asterisk received. When MessageSend() is executed, the contents of this field are used as the body of the outgoing message. The body will always be UTF-8.

See Also

Generated Version

This documentation was generated from Asterisk branch 18 using version GIT