<h4>Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="" disabled=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="" disabled=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="" disabled=""> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4>Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" checked="" disabled=""> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled=""> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4>Description</h4>

<p>If Kamailio sends a 301/302, the current dset is added as Contact header automatically. The feature in this PR will optionally extend this Contact header with more information.</p>
<ul>
<li>The path vector for each contact can be added as a Contact-uri Route header (rfc 3327 conformant).</li>
<li>The branch flags can be added as a Contact-header parameter (non-standard).</li>
</ul>
<p>In addition, the get_redirects function is extended to optionally parse the new flags parameter. The Route header can be extracted from the r-uri in the script.</p>
<p>The new functionality must be enabled with module parameters, by default the behavior is unchanged.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/1243'>https://github.com/kamailio/kamailio/pull/1243</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>core: Cleanup printing the dset</li>
  <li>core: dset: Create Contacts header with path vector as Route header</li>
  <li>core: dset: Create contacts with flags as header parameter</li>
  <li>core modules/tm modules/sl: Make adding path and flags to redirected contacts optional</li>
  <li>core: Increase MAX_REDIRECTION_LEN from 512 to 4096</li>
  <li>uac_redirect: Parse Contact's "flags" header parameter into branch flags.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-0">src/core/config.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-1">src/core/dset.c</a>
    (252)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-2">src/core/dset.h</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-3">src/core/parser/contact/contact.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-4">src/core/parser/contact/contact.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-5">src/core/parser/parse_param.c</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-6">src/core/parser/parse_param.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-7">src/modules/pv/pv_core.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-8">src/modules/sl/doc/sl_params.xml</a>
    (30)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-9">src/modules/sl/sl.c</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-10">src/modules/sl/sl_funcs.c</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-11">src/modules/sl/sl_funcs.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-12">src/modules/tm/doc/params.xml</a>
    (30)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-13">src/modules/tm/t_reply.c</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-14">src/modules/tm/tm.c</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-15">src/modules/uac_redirect/doc/uac_redirect_admin.xml</a>
    (40)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-16">src/modules/uac_redirect/rd_funcs.c</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-17">src/modules/uac_redirect/rd_funcs.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-18">src/modules/uac_redirect/uac_redirect.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1243/files#diff-19">src/modules/xprint/xp_lib.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/1243.patch'>https://github.com/kamailio/kamailio/pull/1243.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/1243.diff'>https://github.com/kamailio/kamailio/pull/1243.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1243">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zd1Quae2nFVzRGhXJw7trGdmh1nQks5sk44HgaJpZM4Pgh7u">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZcmCKrG8tDXY6v9SRfxe7vUdk59oks5sk44HgaJpZM4Pgh7u.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/1243"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Rich redirects (#1243)"}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1243"}}}</script>