[Kamailio-Users] setbflag not working?

Ricardo Martinez rmartinez at redvoiss.net
Mon Jan 18 16:21:24 CET 2010


Hello Daniel.

Yeap!.  That solved my problem.

Thanks again.

 

Ricardo.-

 

De: Daniel-Constantin Mierla [mailto:miconda at gmail.com] 
Enviado el: lunes, 18 de enero de 2010 11:48
Para: Ricardo Martinez
CC: users at lists.kamailio.org
Asunto: Re: [Kamailio-Users] setbflag not working?

 

Hello Ricardo,

indeed the bflags were reset to location value after lookup. Should be
fixed now. Please pull latest git branch kamailio_3.0 and try again.

Thanks,
Daniel


On 1/18/10 2:46 PM, Ricardo Martinez wrote: 

Hello.

I have the next situation with kamailio 3.0.0

 

In my config file I have something like this : 

 

 

route

       If INVITE then route(AUTH_REQUEST)

       . . . 

 

route[AUTH_REQUEST]

       . . . 

                    if (client_nat_test("3")) {

                        append_hf("P-hint:
route(AUTH_REQUEST)|setflag7,forcerport,fix_contact\r\n");

                        if (setbflag("7"))  {

                                xlog("L_INFO","[$ci]:[AUTH_REQUEST] :
setbflag(7)");

                        }

                        force_rport();

                        fix_contact();

                        xlog("L_INFO","[$ci]:[AUTH_REQUEST] :
CLIENT_NAT_TEST-3");

                    };

. . .

route(IN_TO_IN) 

 

 

route[IN_TO_IN]

       . .  .

       route(LOCAL_CALL)

. . .

 

 

route[LOCAL_CALL]

       . . .

 

        if (isbflagset("7") ) {

                xlog("L_INFO","[$ci]:[LOCAL_CALL] : flag 7 SET begin");

        } else {

                xlog("L_INFO","[$ci]:[LOCAL_CALL] : flag 7 NO SET
begin");

        }

 

 

 

        if ( !lookup("location") ) {

                if ( avp_check("$avp(s:4)", "eq/s:1/g") ) {

                        if( !avp_pushto("$br", "$avp(s:5)/g") ) {

                                sl_send_reply("403","Forbidden - Forward
Number NULL");

                                exit;

                        };

                        prefix("222");

                        route(TO_VOICEMAIL_NODISP);

                        exit;

                };

 

                if ( avp_check("$avp(s:3)", "eq/s:1/g") ) {

                        xlog("L_INFO", "[$ci]:[LOCAL_CALL]: $rm -
From:$fu ; To:$ru ; Call-ID:$ci ; Desde:$si - VOICEMAIL ON\n");

                        route(TO_VOICEMAIL_NODISP);

                        exit;

                } else {

                        sl_send_reply("480", "Usuario fuera de
Servicio");

                        xlog("L_INFO", "[$ci]:[LOCAL_CALL]: $rm -
From:$fu ; To:$ru ; Call-ID:$ci ; Desde:$si - VOICEMAIL OFF\n");

                        exit;

                };

        };

 

 

 

        if (isbflagset("7") ) {

                xlog("L_INFO","[$ci]:[LOCAL_CALL] : flag 7 SET end");

        } else {

                xlog("L_INFO","[$ci]:[LOCAL_CALL] : flag 7 NOT SET
end");

        }

 

. .  . 

 

For some reason in the route[LOCAL_CALL] the flagb "7" is changed from
"SET" to "NOT SET".  According to my debugs this unset is made in the
"lookup(location)" part. 

But I don't understand why.

Can someone help me here?

 

Thanks in advance,

 

Ricardo Martinez.-

 

 
 
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users at lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users





-- 
Daniel-Constantin Mierla
* http://www.asipto.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100118/b74c4fa9/attachment.htm>


More information about the sr-users mailing list