<p>Alexei Gradinari <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5909">View Change</a></p><p>Patch set 4:</p><p>(2 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5909/4/channels/pjsip/dialplan_functions.c">File channels/pjsip/dialplan_functions.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5909/4/channels/pjsip/dialplan_functions.c@1070">Patch Set #4, Line 1070:</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;">     switch (channel->session->dtmf) {<br>               case AST_SIP_DTMF_NONE:<br>                       strncpy(buf, "none", len);<br>                  break;<br>                case AST_SIP_DTMF_RFC_4733:<br>                   strncpy(buf, "rfc4733", len);<br>                       break;<br>                case AST_SIP_DTMF_INBAND:<br>                     strncpy(buf, "inband", len);<br>                        break;<br>                case AST_SIP_DTMF_INFO:<br>                       strncpy(buf, "info", len);<br>                  break;<br>                case AST_SIP_DTMF_AUTO:<br>                       strncpy(buf, "auto", len);<br>                  break;<br>                case AST_SIP_DTMF_AUTO_INFO:<br>                  strncpy(buf, "info", len);<br>                  break;<br>                default:<br>                      ast_log(LOG_WARNING, "Unknown DTMF mode %d on PJSIP channel %s\n", channel->session->dtmf, ast_channel_name(chan));<br>                   buf[0] = '\0';<br>                        return -1;<br>    }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Would be better to move the code of DTMF->string and string->DTMF into the new functions, like ast_dtmf_to_str and ast_str_to_dtmf.<br>Then use these functions in this file and pjsip_configuration.c</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5909/4/channels/pjsip/dialplan_functions.c@1116">Patch Set #4, Line 1116:</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 (!strcasecmp(value, "info")) {<br>           channel->session->dtmf= AST_SIP_DTMF_INFO;<br>      } else if (!strcasecmp(value, "rfc2833")) {<br>         channel->session->dtmf= AST_SIP_DTMF_RFC_4733;<br>  } else if (!strcasecmp(value, "inband")) {<br>          channel->session->dtmf= AST_SIP_DTMF_INBAND;<br>    } else if (!strcasecmp(value, "none")) {<br>            channel->session->dtmf= AST_SIP_DTMF_NONE;<br>      } else if (!strcasecmp(value, "auto")) {<br>            channel->session->dtmf= AST_SIP_DTMF_AUTO;<br>      } else if (!strcasecmp(value, "auto")) {<br>            channel->session->dtmf= AST_SIP_DTMF_AUTO_INFO;<br> } else {<br>              ast_log(LOG_WARNING, "I don't know about this dtmf mode: %s\n", value);<br> }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The same... ast_str_to_dtmf</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5909">change 5909</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/5909"/><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: I20eef5da3e5d1d3e58b304416bc79683f87e7612 </div>
<div style="display:none"> Gerrit-Change-Number: 5909 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: Torrey Searle <tsearle@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexei Gradinari <alex2grad@gmail.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-Comment-Date: Fri, 30 Jun 2017 14:27:10 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>