<div dir="ltr">Tks Daniel,<div><br></div><div>The trick worked!</div><div>Regards</div><div>Aymeric</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-06 15:26 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p><span class="">
    <br>
    <div class="m_4308502402063994821moz-cite-prefix">On 02.03.18 12:28, Aymeric Moizard
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        Hi list!
        <div><br>
        </div>
        <div>I'm trying to remove Proxy-Authorization dedicated</div>
        <div>to local subscriber without -and not the other ones</div>
        <div>dedicated to other server-</div>
        <div><br>
        </div>
        <div>I realized that "consume_credentials" doesn't work</div>
        <div>because it requires that a call to "www_authorize,</div>
        <div>proxy_authorize, www_authenticate or proxy_authenticate"</div>
        <div>has been made before. I have a use-case where this isn't</div>
        <div>called.</div>
        <div><br>
        </div>
        <div>
          <div>I don't want to use such code:</div>
          <div><br>
          </div>
          <div>
            <pre style="color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">if (is_present_hf("Proxy-<wbr>Authorization")) {
        remove_hf("Proxy-<wbr>Authorization");
}
</pre>
            Because this may remove a "Proxy-Authorization"</div>
          <div>for another service.</div>
          <div><br>
          </div>
          <div>I have seen this: has_credentials but it doesn't help</div>
          <div>to know which header is the one containing the header...</div>
          <div><br>
          </div>
          <div>Any good way to find the header and index?</div>
          <div>And then remove it with remove _hf_value2?</div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote></span>
    I haven't looked for the options offered by the textopsx module,
    being added by ser devs in the past, but if your case of not doing
    www/proxy_authenticate() or auth_check() is to avoid a database
    query, then do pv_auth_check(...) with a random password and the
    proper relam. Ignore the result, the header is parsed, even if
    authentication fails, and you should be able to use
    consume_credentials().<br>
    <br>
    Cheers,<br>
    Daniel<span class="HOEnZb"><font color="#888888"><br>
    <pre class="m_4308502402063994821moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_4308502402063994821moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_4308502402063994821moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 5-7, 2018, Berlin - <a class="m_4308502402063994821moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="m_4308502402063994821moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </font></span></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><img src="http://sip.antisip.com/am48.png">Antisip - <a href="http://www.antisip.com" target="_blank">http://www.antisip.com</a><br></div>
</div>