<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>you have to set authentication username and password inside the
      $uac_req(...) -- see the attributes for it at:</p>
    <p>  -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key">https://www.kamailio.org/wiki/cookbooks/4.4.x/pseudovariables#uac_req_key</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 20/01/2017 07:26, anfecora wrote:<br>
    </div>
    <blockquote
cite="mid:CAHjGmHnnRNVuv1Z=_h3kOa2bqMchc+JJd-uPJnEzpETyNQECWA@mail.gmail.com"
      type="cite">
      <div dir="ltr">can someone please guide me where to find the usage
        of auc module, thanks in advance.
        <div><br>
        </div>
        <div>
          <div>
            <div>I am registering the uac in one end then i want to
              forward that registration to an external registrar, if i
              use $du some domain, some of the ipv6 info is going to be
              forwarded, i need to make it look more like an a b2bua
              than a outbound proxy therefore i need to use the auc
              module(also i need to cover all ipv6 info since i am
              proxying from ipv4 to ipv6).</div>
            <div><br>
            </div>
            <div>i am able to register the client to kamailio, then
              kamailio send the registration to the external registrar,
              but when the registrar sends back the challenge uac does
              not reply, any ideas how can achieve this.</div>
            <div><br>
            </div>
            <div>uac(linphone etc)
              --registration--->kamailio(registrar
              module)------register(uac)--->SBC</div>
            <div><br>
            </div>
            <div>sbc----invite---->kamailio(lookup)---------invite---->uac(linphone
              etc)</div>
            <div><br>
            </div>
            <div>this is the code i am using.</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>
              <div><br>
              </div>
              <div># Handle SIP registrations</div>
              <div>route[REGISTRAR] {</div>
              <div>xlog("REGISTERING ");</div>
              <div>        if (is_method("REGISTER"))</div>
              <div>        {</div>
              <div>                if(isflagset(FLT_NATS))</div>
              <div>                {</div>
              <div>                        setbflag(FLB_NATB);</div>
              <div>                        # uncomment next line to do
                SIP NAT pinging</div>
              <div>                        ## setbflag(FLB_NATSIPPING);</div>
              <div>                }</div>
              <div>                if(af==INET6)</div>
              <div>                        setbflag(FLB_IPV6);</div>
              <div>xlog("IT IS  IPV6");</div>
              <div>                if (!save("location"))</div>
              <div>                        sl_reply_error();</div>
              <div>route(REGSBCFWD);</div>
              <div>        exit;</div>
              <div>        }</div>
              <div>}</div>
              <div><br>
              </div>
              <div>route[REGSBCFWD]{</div>
              <div>xlog("CREATING OTHER LEG TO THE SBC");</div>
              <div>if(!is_method("REGISTER"))</div>
              <div>        {</div>
              <div>                return;</div>
              <div>        }</div>
              <div>xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU
                --$ru");</div>
              <div><br>
              </div>
              <div>        $var(rip) = "<a moz-do-not-send="true"
                  href="http://sip.somedomain.com">sip.somedomain.com</a>";</div>
              <div>        $uac_req(method)="REGISTER";</div>
              <div>        $uac_req(ruri)="sip:" + $var(rip) + ":" +
                "5060";</div>
              <div>        $uac_req(furi)="sip:" + $tU + "@" +
                $var(rip);</div>
              <div>        $uac_req(turi)="sip:" + $tU + "@" +
                $var(rip);</div>
              <div>        $uac_req(hdrs)="Contact: <sip:" + $tU +
                "@"</div>
              <div>                                + "10.0.0.222"</div>
              <div>                                + ":" "5060" +
                ">\r\n";</div>
              <div>        if($sel(contact.expires) != $null)</div>
              <div>                $uac_req(hdrs)= $uac_req(hdrs) +
                "Expires: " + $sel(contact.expires) + "\r\n";</div>
              <div>        else</div>
              <div>                $uac_req(hdrs)= $uac_req(hdrs) +
                "Expires: " + $hdr(Expires) + "\r\n";</div>
              <div>        uac_req_send();</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>                }</div>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>REGISTER sip:<a moz-do-not-send="true"
                  href="http://sip.somedomain.com:5060">sip.somedomain.com:5060</a>
                SIP/2.0.</div>
              <div>Via: SIP/2.0/UDP
                10.0.0.222:5060;branch=z9hG4bK285f.13a7f0c0000000000000000000000000.0.</div>
              <div>To: <<a moz-do-not-send="true"
                  href="mailto:sip%3A14052423@sip.somedomain.com">sip:14052423@sip.somedomain.com</a>>.</div>
              <div>From: <<a moz-do-not-send="true"
                  href="mailto:sip%3A14052423@sip.somedomain.com">sip:14052423@sip.somedomain.com</a>>;tag=a82eaf71666096790d1397845fbd3254-ebaa.</div>
              <div>CSeq: 10 REGISTER.</div>
              <div>Call-ID: <a moz-do-not-send="true"
                  href="mailto:357e21ae51d8416d-26605@10.0.0.222">357e21ae51d8416d-26605@10.0.0.222</a>.</div>
              <div>Max-Forwards: 70.</div>
              <div>Content-Length: 0.</div>
              <div>User-Agent: kamailio (4.4.4 (x86_64/linux)).</div>
              <div>Contact: <<a moz-do-not-send="true"
                  href="http://sip:140524@10.0.0.222:5060">sip:140524@10.0.0.222:5060</a>>.</div>
              <div>Expires: 3600.</div>
              <div>.</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>SIP/2.0 401 Unauthorized.</div>
              <div>Via: SIP/2.0/UDP
                10.0.0.222:5060;branch=z9hG4bK4b53.ad842757000000000000000000000000.0.</div>
              <div>To: <<a moz-do-not-send="true"
                  href="mailto:sip%3A14052423@sip.somedomain.com">sip:14052423@sip.somedomain.com</a>>.</div>
              <div>From: <<a moz-do-not-send="true"
                  href="mailto:sip%3A14052423@sip.somedomain.com">sip:14052423@sip.somedomain.com</a>>;tag=a82eaf71666096790d1397845fbd3254-37da.</div>
              <div>Call-ID: <a moz-do-not-send="true"
                  href="mailto:357e21ae51d8416d-26603@10.0.0.222">357e21ae51d8416d-26603@10.0.0.222</a>.</div>
              <div>CSeq: 10 REGISTER.</div>
              <div>WWW-Authenticate: Digest realm="<a
                  moz-do-not-send="true"
                  href="http://sip.somedomain.com">sip.somedomain.com</a>",
                nonce="f5831435-3e69-4b78-ab6d-dcb0897e477b",
                algorithm=MD5, qop="auth".</div>
              <div>User-Agent: <a moz-do-not-send="true"
                  href="http://somedomain.com">somedomain.com</a>
                Host:some proxy.</div>
              <div>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE,
                INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH,
                SUBSCRIBE.</div>
              <div>Content-Length: 0.</div>
              <div>.</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>