[OpenSIPS-Users] REGISTRATION PROBLEM

ASHWINI NAIDU ashwini.naidu at gmail.com
Sat Feb 7 07:12:00 CET 2009


hi,

I have installed opensips-1.4.4 on a debian machine. I have changed the
configuration file from openser-1.3.4 to opensips 1.4.4 and i have done the
corresponding changes. opensips  starts but  when i try to register a user
i can see only "401 UNAUTHORIZED" though the user is added in the subscriber
table and the  domain is also added in domain table.  I am adding the chunk
of code that is responsible for registeration . Please let me know if any
thing is wrong in the code.

    ## Register request handler^M
    if (is_uri_host_local()) {^M
        if (!www_authorize("", "subscriber")) {^M
            log(1,"\n***********AUTHENTICATING\n");
<----------------------------------------- Am able to traverse till here.
            www_challenge("", "1");^M
            log(1,"\n ********** Challenging failed\n");
            exit;^M
        };^M
        if (!check_to()) {^M
            log(1,"\n***************** failed check_to\n");
            sl_send_reply("403", "Forbidden");^M
            exit;^M
        };^M
        if(!search("^Contact:[ ]*\*") && nat_uac_test("19")) {^M
            log(1,"-------NAT Checking\n");^M
            setbflag(6);^M
            fix_nated_register();^M
            force_rport();^M
        };^M
        save("location");^M
        exit;^M
    } else if {^M
     log(1,"\n******************I AM NOT ALLOWED\n");
     sl_send_reply("403", "Forbidden");^M
    };^M


-- 
Thanking You,
Ashwini BR Naidu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090207/73724b98/attachment.htm 


More information about the Users mailing list