Hello,
you have to set authentication username and password inside the
$uac_req(...) -- see the attributes for it at:
-
can someone please guide me where to find the usage of
auc module,
thanks in advance.
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).
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.
uac(linphone etc) --registration--->kamailio(registrar
module)------register(uac)--->SBC
sbc----invite---->kamailio(lookup)---------invite---->uac(linphone etc)
this is the code i am using.
# Handle SIP registrations
route[REGISTRAR] {
xlog("REGISTERING ");
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
## setbflag(FLB_NATSIPPING);
}
if(af==INET6)
setbflag(FLB_IPV6);
xlog("IT IS IPV6");
if (!save("location"))
sl_reply_error();
route(REGSBCFWD);
exit;
}
}
route[REGSBCFWD]{
xlog("CREATING OTHER LEG TO THE SBC");
if(!is_method("REGISTER"))
{
return;
}
xlog("CREATING PACKAGE $si -- $fU-- $au--$du-- $tU --$ru");
$var(rip) = "sip.somedomain.com <http://sip.somedomain.com>";
$uac_req(method)="REGISTER";
$uac_req(ruri)="sip:" + $var(rip) + ":" + "5060";
$uac_req(furi)="sip:" + $tU + "@" + $var(rip);
$uac_req(turi)="sip:" + $tU + "@" + $var(rip);
$uac_req(hdrs)="Contact: <sip:" + $tU + "@"
+ "10.0.0.222"
+ ":" "5060" + ">\r\n";
if($sel(contact.expires) != $null)
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}
REGISTER sip:sip.somedomain.com:5060 <http://sip.somedomain.com:5060>
SIP/2.0.
Via: SIP/2.0/UDP
10.0.0.222:5060;branch=z9hG4bK285f.13a7f0c0000000000000000000000000.0.
To: <sip:14052423@sip.somedomain.com
<mailto:sip%3A14052423@sip.somedomain.com>>.
From: <sip:14052423@sip.somedomain.com
<mailto:sip%3A14052423@sip.somedomain.com>>;tag=a82eaf71666096790d1397845fbd3254-ebaa.
CSeq: 10 REGISTER.
Call-ID: 357e21ae51d8416d-26605(a)10.0.0.222
<mailto:357e21ae51d8416d-26605@10.0.0.222>.
Max-Forwards: 70.
Content-Length: 0.
User-Agent: kamailio (4.4.4 (x86_64/linux)).
Contact: <sip:140524@10.0.0.222:5060 <http://sip:140524@10.0.0.222:5060>>.
Expires: 3600.
.
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP
10.0.0.222:5060;branch=z9hG4bK4b53.ad842757000000000000000000000000.0.
To: <sip:14052423@sip.somedomain.com
<mailto:sip%3A14052423@sip.somedomain.com>>.
From: <sip:14052423@sip.somedomain.com
<mailto:sip%3A14052423@sip.somedomain.com>>;tag=a82eaf71666096790d1397845fbd3254-37da.
Call-ID: 357e21ae51d8416d-26603(a)10.0.0.222
<mailto:357e21ae51d8416d-26603@10.0.0.222>.
CSeq: 10 REGISTER.
WWW-Authenticate: Digest
realm="sip.somedomain.com
<http://sip.somedomain.com>",
nonce="f5831435-3e69-4b78-ab6d-dcb0897e477b", algorithm=MD5,
qop="auth".
User-Agent:
somedomain.com <http://somedomain.com> Host:some proxy.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Content-Length: 0.
.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users