REGISTRATION PROBLEM

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

REGISTRATION PROBLEM

ASHWINI NAIDU
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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: REGISTRATION PROBLEM

Bogdan-Andrei Iancu
Hi ASHWINI,

please post the configuration of the auth_db module  - the
modparam("auth_db",.......) .

Regards,
Bogdan

ASHWINI NAIDU wrote:

> 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
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: REGISTRATION PROBLEM

ASHWINI NAIDU
hi Bogdan,

    The issue is solved. the error is not due to code in opensips.cfg . But it is due to the value set for STORE_PLAINTEXT_PW in opensipsctlrc. I had set it to 0 instead of setting it to 1

Thank You for the help.

On Sat, Feb 7, 2009 at 1:45 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hi ASHWINI,

please post the configuration of the auth_db module  - the modparam("auth_db",.......) .

Regards,
Bogdan

ASHWINI NAIDU wrote:
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
------------------------------------------------------------------------

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 




--
Thanking You,
Ashwini BR Naidu

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: REGISTRATION PROBLEM

Bogdan-Andrei Iancu
Hi ASHWINI,

You have the option to use either pain text password , either HA1 for
passwords. Of course,  opensips and opensipsctl must br sync from this
point of view. You can configure both in this regards,

As you discovered, STORE_PLAINTEXT_PW controls this is opensipsctl.

For opensips, see the auth_db module param "calculate_ha1":
    http://www.opensips.org/html/docs/modules/1.4.x/auth_db.html#id228159

Regards,
Bogdan

ASHWINI NAIDU wrote:

> hi Bogdan,
>
>     The issue is solved. the error is not due to code in opensips.cfg
> . But it is due to the value set for STORE_PLAINTEXT_PW in
> opensipsctlrc. I had set it to 0 instead of setting it to 1
>
> Thank You for the help.
>
> On Sat, Feb 7, 2009 at 1:45 PM, Bogdan-Andrei Iancu
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Hi ASHWINI,
>
>     please post the configuration of the auth_db module  - the
>     modparam("auth_db",.......) .
>
>     Regards,
>     Bogdan
>
>     ASHWINI NAIDU wrote:
>
>         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
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         Users mailing list
>         [hidden email] <mailto:[hidden email]>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>          
>
>
>
>
>
> --
> Thanking You,
> Ashwini BR Naidu


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users