<p>George Joseph <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8764">View Change</a></p><p>Patch set 1:</p><p>(8 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c">File apps/app_sendtext.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@54">Patch Set #1, Line 54:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> <note><para><literal>current channel</literal> could be the caller or callee depending<br> on the context in which this application is called.</para></note><br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">This note can be removed. I think the callee designation before<br>was misleading anyway. Normally it would be the callee but the<br>features.conf DYNAMIC_FEATURES can execute this app on either<br>channel.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I think you've got it backwards. It's the caller channel that gets the message by default, at least for chan_pjsip.<br>If you use a pre dial handler you can make it the callee.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@68">Patch Set #1, Line 68:</a> <code style="font-family:monospace,monospace"> <variable name="SENDTEXT_CONTENT_TYPE"></code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Should state the default content type.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I take it the default content type is text/plain and that is set<br>somewhere else if we feed an empty content type string to the<br>channel driver.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Correct.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@127">Patch Set #1, Line 127:</a> <code style="font-family:monospace,monospace">SENDTEXT_FROM_CONTENT_TYPE</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">SENDTEXT_CONTENT_TYPE</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@131">Patch Set #1, Line 131:</a> <code style="font-family:monospace,monospace">SENDTEXT_FROM_CONTENT_TYPE</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">SENDTEXT_CONTENT_TYPE</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@157">Patch Set #1, Line 157:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (!data) {<br> ast_log(LOG_WARNING, "SendText requires an argument (text)\n");<br> return -1;<br> }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This isn't exactly true anymore. We should always have an empty string bod</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@169">Patch Set #1, Line 169:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> from = pbx_builtin_getvar_helper(chan, "SENDTEXT_FROM_DISPLAYNAME");<br> to = pbx_builtin_getvar_helper(chan, "SENDTEXT_TO_DISPLAYNAME");<br> content_type = pbx_builtin_getvar_helper(chan, "SENDTEXT_CONTENT_TYPE");<br> body = pbx_builtin_getvar_helper(chan, "SENDTEXT_BODY");<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Should these be unset after usage? If someone doesn't clear them themselves</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@178">Patch Set #1, Line 178:</a> <code style="font-family:monospace,monospace"> msg_type = "NONE";</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This assignment is always overwritten.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8764/1/apps/app_sendtext.c@209">Patch Set #1, Line 209:</a> <code style="font-family:monospace,monospace"> } else if(ast_channel_tech(chan)->send_text) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">spacing</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8764">change 8764</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/8764"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I648b4574478119f95de09d9f08e9595831b02830 </div>
<div style="display:none"> Gerrit-Change-Number: 8764 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 11 Apr 2018 15:32:56 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>