[Kamailio-Users] Users Digest, Vol 41, Issue 68

Mian M Asif asif44pk at gmail.com
Fri Oct 24 12:57:26 CEST 2008


Dear Abalashov,
What do you mean by "no[t] getting any response? is mean this function
is not working please let me know i am doing right or wrong,

dear Arif,
exit also is not working cheers :).

regards,
Asif


> Today's Topics:
>
>   1. Re: Architecture with load-balancing (dispatcher  module)
>      (Ovidiu Sas)
>   2. i want to stop second registration request if user        already
>      registered (Mian M Asif)
>   3. Re: i want to stop second registration request if user
>      already registered (Alex Balashov)
>   4. Re: i want to stop second registration request if user
>      already registered (arif.zaman)
>   5. Re: Anyone doing CNAM lookups? (Klaus Darilion)
>   6. Kamailio v1.4.2 Released (Daniel-Constantin Mierla)
>
>
> Message: 2
> Date: Thu, 23 Oct 2008 19:49:21 +0500
> From: "Mian M Asif" <asif44pk at gmail.com>
> Subject: [Kamailio-Users] i want to stop second registration request
>        if user already registered
> To: users at lists.kamailio.org
> Message-ID:
>        <b005c33b0810230749v1b00bf9auabb97cfc17e517c6 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi All,
> i want to stop second registration request if use already registered i
>    am using below code but getting no any response. please help me how to
>    solve this problem.
>
> if (method=="REGISTER") {
> if (registered("location") ) {
>                xlog("L_NOTICE","Asif: lookup(location) Passed\n");
>                sl_send_reply("699", "User Not Found");
>                return;
> }
> route(2);
> return;
>
> route[2] {
>
> # -----------------------------------------------------------------
> # REGISTER Message Handler
> # ----------------------------------------------------------------
>        xlog("L_NOTICE","Danish: Entering route[2]\n");
> #       if (registered("location")) {
> #                xlog("L_NOTICE","Asif: lookup(location) failed\n");
> #                sl_send_reply("404", "User Not Found");
> #                return;
> #        };
>
>        xlog("L_NOTICE","Asif: Register message IPsrcaddr [$si],
> RecvdIPaddr[$Ri]\n");
>        if (!search("^Contact:[ ]*\*") && nat_uac_test("2")) {
>                xlog("L_NOTICE","Danish: In route[2] Found Nated contact\n");
>                setflag(6);
>                setbflag(6);
>                # if you want OPTIONS natpings uncomment next
>                setbflag(7);
>                fix_nated_register();
>                force_rport();
>        };
>
>        sl_send_reply("100", "Trying");
>
>        if (!radius_www_authorize("abc.com")) {
>                www_challenge("abc.com", "1");
>        };
>        consume_credentials();
>
>        if (!save("location")) {
>                sl_reply_error();
>        };
>
> }
> }
>
> regards,
> Asif
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 23 Oct 2008 10:51:30 -0400
> From: Alex Balashov <abalashov at evaristesys.com>
> Subject: Re: [Kamailio-Users] i want to stop second registration
>        request if user already registered
> To: Mian M Asif <asif44pk at gmail.com>
> Cc: users at lists.kamailio.org
> Message-ID: <49008F72.1060700 at evaristesys.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> What do you mean by "no[t] getting any response?"
>
> Mian M Asif wrote:
>
>> Hi All,
>> i want to stop second registration request if use already registered i
>>     am using below code but getting no any response. please help me how to
>>     solve this problem.
>>
>> if (method=="REGISTER") {
>> if (registered("location") ) {
>>                 xlog("L_NOTICE","Asif: lookup(location) Passed\n");
>>                 sl_send_reply("699", "User Not Found");
>>                 return;
>> }
>> route(2);
>> return;
>>
>> route[2] {
>>
>> # -----------------------------------------------------------------
>> # REGISTER Message Handler
>> # ----------------------------------------------------------------
>>         xlog("L_NOTICE","Danish: Entering route[2]\n");
>> #       if (registered("location")) {
>> #                xlog("L_NOTICE","Asif: lookup(location) failed\n");
>> #                sl_send_reply("404", "User Not Found");
>> #                return;
>> #        };
>>
>>         xlog("L_NOTICE","Asif: Register message IPsrcaddr [$si],
>> RecvdIPaddr[$Ri]\n");
>>         if (!search("^Contact:[ ]*\*") && nat_uac_test("2")) {
>>                 xlog("L_NOTICE","Danish: In route[2] Found Nated contact\n");
>>                 setflag(6);
>>                 setbflag(6);
>>                 # if you want OPTIONS natpings uncomment next
>>                 setbflag(7);
>>                 fix_nated_register();
>>                 force_rport();
>>         };
>>
>>         sl_send_reply("100", "Trying");
>>
>>         if (!radius_www_authorize("abc.com")) {
>>                 www_challenge("abc.com", "1");
>>         };
>>         consume_credentials();
>>
>>         if (!save("location")) {
>>                 sl_reply_error();
>>         };
>>
>> }
>> }
>>
>> regards,
>> Asif
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>
>
> --
> Alex Balashov
> Evariste Systems
> Web    : http://www.evaristesys.com/
> Tel    : (+1) (678) 954-0670
> Direct : (+1) (678) 954-0671
> Mobile : (+1) (706) 338-8599
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 23 Oct 2008 07:59:45 -0700 (PDT)
> From: "arif.zaman" <arif.zaman at brotecs.com>
> Subject: Re: [Kamailio-Users] i want to stop second registration
>        request if user already registered
> To: users at lists.kamailio.org
> Message-ID: <20132764.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
>
>
>
> Mian M Asif wrote:
>>
>> if (method=="REGISTER") {
>> if (registered("location") ) {
>>                 xlog("L_NOTICE","Asif: lookup(location) Passed\n");
>>                 sl_send_reply("699", "User Not Found");
>>                 return;
>> }
>>
>
> Use "exit;" instead of "return;".
>
> Cheers,
> ARIF
>




More information about the Users mailing list