<p>George Joseph <strong>uploaded patch set #6</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/6616">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bridge_softmix: Forward TEXT frames<br><br>Core bridging and, more specifically, bridge_softmix have been<br>enhanced to relay received frames of type TEXT or TEXT_DATA to all<br>participants in a softmix bridge. res_pjsip_messaging and<br>chan_pjsip have been enhanced to take advantage of this so when<br>res_pjsip_messaging receives an in-dialog MESSAGE message from a<br>user in a conference call, it's relayed to all other participants<br>in the call.<br><br>res_pjsip_messaging already queues TEXT frames to the channel when<br>it receives an in-dialog MESSAGE from an endpoint and chan_pjsip<br>will send an MESSAGE when it gets a TEXT frame. On a normal<br>point-to-point call, the frames are forwarded between the two<br>correctly. bridge_softmix was not though so messages weren't<br>getting forwarded to conference bridge participants. Even if they<br>were, the bridging code had no way to tell the participants who<br>sent the message so it would look like it came from the bridge<br>itself.<br><br>* The TEXT frame type doesn't allow storage of any meta data, such<br>as sender, on the frame so a new TEXT_DATA frame type was added that<br>uses the new ast_msg_data structure as its payload. A channel<br>driver can queue a frame of that type when it receives a message<br>from outside. A channel driver can use it for sending messages<br>by implementing the new send_text_data channel tech callback and<br>setting the new AST_CHAN_TP_SEND_TEXT_DATA flag in its tech<br>properties. If set, the bridging/channel core will use it instead<br>of the original send_text callback and it will get the ast_msg_data<br>structure. Channel drivers aren't required to implement this. Even<br>if a TEXT_DATA enabled driver uses it for incoming messages, an<br>outgoing channel driver that doesn't will still have it's send_text<br>callback called with only the message text just as before.<br><br>* res_pjsip_messaging now creates a TEXT_DATA frame for incoming<br>in-dialog messages and sets the "from" to the display name in the<br>"From" header, or if that's empty, the caller id name from the<br>channel. This allows the chat client user to set a friendly name<br>for the chat.<br><br>* bridge_softmix now forwards TEXT and TEXT_DATA frames to all<br>participants (except the sender).<br><br>* A new function "ast_sendtext_data" was added to channel which<br>takes an ast_msg_data structure and calls a channel's<br>send_text_data callback, or if that's not defined, the original<br>send_text callback.<br><br>* bridge_channel now calls ast_sendtext_data for TEXT_DATA frame<br>types and ast_sendtext for TEXT frame types.<br><br>* chan_pjsip now uses the "from" name in the ast_msg_data structure<br>(if it exists) to set the "From" header display name on outgoing text<br>messages.<br><br>Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489<br>---<br>M CHANGES<br>M bridges/bridge_softmix.c<br>M channels/chan_pjsip.c<br>M funcs/func_frame_trace.c<br>M include/asterisk/channel.h<br>M include/asterisk/frame.h<br>M include/asterisk/message.h<br>M main/bridge_channel.c<br>M main/channel.c<br>M main/frame.c<br>M main/message.c<br>M res/res_pjsip_messaging.c<br>12 files changed, 420 insertions(+), 32 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/16/6616/6</pre><p>To view, visit <a href="https://gerrit.asterisk.org/6616">change 6616</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6616"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489 </div>
<div style="display:none"> Gerrit-Change-Number: 6616 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>