Enhanced Messaging in Asterisk 13 and 15

Enhanced Messaging in Asterisk 13 and 15

The next releases of Asterisk 13 and 15 extend MESSAGE support in chan_pjsip and add it to conference bridges.  While Asterisk has supported the SIP MESSAGE method in both chan_sip and chan_pjsip for some time, with this enhancement, if a conference bridge participant (connected via chan_pjsip) sends an in-dialog MESSAGE to a conference bridge, the MESSAGE will be relayed to all other participants in the conference.  It sounds simple enough but this required some restructuring of the bridging core to preserve the original sender’s information and add support for text content types other than text/plain.  Here’s how it works:

  • The participant creates a MESSAGE message with a specific content type and message body and optionally a “From” display name.
  • The participant then sends that message to the conference bridge.
  • Normally, when a channel driver receives a text message, it passes only the text body to the bridging core but this causes the sender and content type to be lost.   Now, when the chan_pjsip res_pjsip_messaging module receives a text message, it captures the From display name and the content type as well as the body and passes it on to the bridging core.  Other than the From display name, no other sender information is exposed.
  • When bridge_softmix (the bridging module used by confbridge) sees the message, it relays it on to all bridge participants.
  • Any other participants connected via chan_pjsip will get the From display name, content-type and body.  Those not connected via chan_pjsip will get whatever the channel driver supports.

While this is mildly interesting for Asterisk 13, it’s very interesting for Asterisk 15.  Imagine an  Asterisk video conferencing, using Asterisk 15’s Selective Forwarding Unit (SFU) capability, this would allow the conference participants to chat while participating in the conference.

Oh, as a side benefit of this work, the SendText dialplan application has been updated to allow the From display name and content type to be set as well as the text body.

Finally, the new capability will be used as the basis of another upcoming feature that will allow participants to get notifications, such as join/leave and talker, events from the conference bridge.

 

Tags

top
Open Modal
Connect With Us!

    ×