<p> Attention is currently required from: N A, Joshua Colp, George Joseph. </p>
<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18830">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File res/res_pjsip_session.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18830/comment/a48096be_71918dca">Patch Set #1, Line 1703:</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;">   /* Set URI (inside the <>, as opposed to header (outside the <>)) parameters, if requested.<br>        * This is often necessary for SS7 trunking over SIP. Most carriers require<br>    * that added parameters be URI parameters (as opposed to header parameters).<br>  *<br>     * other_param is how to add custom URI parameters to the header<br>       * XXX: header_param is for header parameters, but doesn't seem to work at the moment.<br>     *<br>     * Especially when dealing with SS7 or TDM elements over SIP,<br>  * injecting parameters into the user and/or method parameters<br>         * is required.<br>        *<br>     * For example, if wanted to set the isup-oli parameter to the channel's ANI2 value:<br>       * e.g. pjsip_param_add(dlg_pool, &dlg_info_uri->other_param, "isup-oli", ani2);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This block is needlessly verbose. URIs can have URI parameters and headers. Both of these would be "inside the <>". If they are not "inside the <>" then they are not URI parameters, so all of this just serves to confuse.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The 'XXX: header_param is...' comment is irrelevant since you are setting URI parameters and not URI headers.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I would suggest:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> /*<br>  * Set URI parameters if requested.<br>  */</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18830/comment/99596ded_e942aa73">Patch Set #1, Line 1731:</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;">  while ((param_value = strsep(&params, ","))) {<br>                  param_name = strsep(&param_value, "=");<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">How do I add a parameter where the value contains a comma or equals sign? For example I want to add:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> ;usertoken=fname%3Dsean</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18830/comment/99652e6a_cd159e4c">Patch Set #1, Line 1734:</a> <code style="font-family:monospace,monospace">                     pjsip_param_add(dlg_pool, &dlg_info_uri->other_param, param_name, S_OR(param_value, ""));</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">When setting the transport, user, method, ttl, maddr, or lr parameters wouldn't it be better to use the dedicated structure members on pjsip_sip_uri? I assume it's not possible for anything else within Asterisk or the PJSIP stack that would set those parameters first?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18830">change 18830</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18830"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ifb1bc3c512ad5f6faeaebd7817f004a2ecbd6428 </div>
<div style="display:none"> Gerrit-Change-Number: 18830 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-Attention: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 25 Jul 2022 14:46:31 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>