[Serusers] UAC module (backport to 0.9.0)

Michael Ulitskiy mdu113 at acedsl.com
Fri May 13 00:28:16 CEST 2005


uac module in today's cvs also doesn't work, but with different error:

 0(11309) ERROR:uac:get_autenticate_hdr: reply has no auth hdr (Proxy-Authenticate)
 0(11309) ERROR:uac:uac_auth: failed to extract authenticate hdr

while it's clearly received:U 192.168.89.9:5060 -> 192.168.83.61:5060
  SIP/2.0 407 Proxy Authentication Required..Via: SIP/2.0/UDP 192.168.83.61;br
  anch=z9hG4bKc9d9.1089e2c1.0..Via: SIP/2.0/UDP 192.168.83.8:5060;branch=z9hG4
  bK3fa017dd..From: "michael's kphone" <sip:Unknown at 192.168.83.8>;tag=as560bf9
  a2..To: <sip:12128121207 at pg1old.acecape.com>;tag=as6aa00028..Call-ID: 0c203
  64552bbf04f5a52938d116497d7 at 192.168.83.8..CSeq: 102 INVITE..User-Agent: AceP
  BX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER..Contact: <sip:12128121
  207 at 192.168.89.9>..Proxy-Authenticate: Digest realm="asterisk", nonce="55beb
  e94"..Content-Length: 0....

BTW, I'm trying to authenticate INVITE's to asterisk if it matters.

Michael

On Thursday 12 May 2005 01:34 pm, Michael Ulitskiy wrote:
> Hello,
> 
> Has anyone succeeded in getting UAC authentication to work?
> I'm doing the following:
> 
> route {
> љ љ љ љ resetflag(1);
> љ љ љ љ t_on_failure("1");
> љ љ љ љ route(1);
> }
> 
> route[1]
> {
> љ љ љ љ if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)") {
> љ љ љ љ љ љ sl_send_reply("479", "We don't forward to private IP addresses");
> љ љ љ љ љ љ break;
> љ љ љ љ };
> љ љ љ љ if (!t_relay()) {
> љ љ љ љ љ љ љ љ sl_reply_error();
> љ љ љ љ };
> }
> 
> failure_route[1] {
> љ љ љ љ # authentication reply received?
> љ љ љ љ if ( t_check_status("401|407") ) {
> љ љ љ љ љ љ љ љ if (!isflagset(1) && uac_auth()) {
> љ љ љ љ љ љ љ љ љ љ љ љ setflag(1);
> љ љ љ љ љ љ љ љ љ љ љ љ t_on_failure("1");
> љ љ љ љ љ љ љ љ љ љ љ љ append_branch();
> љ љ љ љ љ љ љ љ љ љ љ љ route(1);
> љ љ љ љ љ љ љ љ } else {
> љ љ љ љ љ љ љ љ љ љ љ љ t_reply("500","Error occurred");
> љ љ љ љ љ љ љ љ }
> љ љ љ љ љ љ љ љ break;
> љ љ љ љ }
> 
> }
> 
> When uac_auth() is called I get the following in the:
> љ0(28973) DEBUG:uac:uac_auth: picked reply is (nil), code 407
> љ0(28973) BUG:uac:uac_auth: empty reply on picked branch
> 
> Any suggestions or ideas?
> Thank љyou,
> 
> Michael
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
> 




More information about the sr-users mailing list