<ul dir="auto">
<li>To be used with headers containing values separated by commas</li>
<li>pvh_header_param_exists() check if the value is present to a given header</li>
<li>pvh_remove_header_param() remove the value from the given header or the entire header if no other value is present</li>
</ul>


<h4 dir="auto">Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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 dir="auto">Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4 dir="auto">Checklist:</h4>

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

<p dir="auto">Previously, to remove a parameter from a header it was needed to create a complex method on the configuration file for each header/parameter. This modification moves this complexity to the 'pv_headers' module.</p>
<p dir="auto">Two new functions:</p>
<ul dir="auto">
<li>pvh_header_param_exists</li>
<li>pvh_remove_header_param</li>
</ul>
<p dir="auto">Both functions take as parameters the name of the header and the name of the parameter.</p>
<p dir="auto">It returns '-1' if the combination header/parameter:</p>
<ul dir="auto">
<li>is not found (pvh_header_param_exists)</li>
<li>couldn't be removed (pvh_remove_header_param).</li>
</ul>
<p dir="auto">Examples (proxy configuration):</p>
<p dir="auto">if (pvh_header_param_exists("Supported", "100rel"))<br>
{<br>
// "100rel" is present on the "Supported" header<br>
}</p>
<p dir="auto">if (pvh_remove_header_param("Supported", "100rel"))<br>
{<br>
// "100rel" removed from header "Supported"<br>
}</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/3070'>https://github.com/kamailio/kamailio/pull/3070</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/3070/commits/ac398cbbda9960802ec6cc4537367f68be01bf7a" class="commit-link">ac398cb</a>  pv_headers: Add support to remove a specific value from a header</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/kamailio/kamailio/pull/3070/files">5 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3070/files#diff-69dc1d3e1fc1c6cb3fe9e561c92afdebe17211e4ddadecc2327e994212279a1a">src/modules/pv_headers/doc/functions.xml</a>
    (35)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3070/files#diff-846939d38c3e58f30dc42e6e737a3ed39108f01a15ee1aaf281fb89b9fe5dd77">src/modules/pv_headers/doc/pv_headers.xml</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3070/files#diff-20b2b8a6c83a71cc1aee94cbabf1def4cfff3b9c7c04412e5848ab7356f0d35e">src/modules/pv_headers/pv_headers.c</a>
    (61)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3070/files#diff-337181437fd7dba3d8a327d671f1474d3e78acc8187f1831f7b4b299e9ceef15">src/modules/pv_headers/pvh_func.c</a>
    (87)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/3070/files#diff-c24387b09b3a1a9924b1a59a8db19c0292f6de51d014754cf7566694b266abfb">src/modules/pv_headers/pvh_func.h</a>
    (2)
  </li>
</ul>

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

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3070">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZME52E4P6CAVMH5ZWTVCVHMJANCNFSM5SENI6JQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZJE6DUC35GLE5PVOWDVCVHMJA5CNFSM5SENI6J2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RWJ27AQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3070</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3070",
"url": "https://github.com/kamailio/kamailio/pull/3070",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>