From kkurapat@gmail.com Sun Oct 2 01:21:18 2011 From: Krishna Kurapati To: sr-users@lists.kamailio.org Subject: [SR-Users] Cflag is not getting updated. Date: Sat, 01 Oct 2011 18:21:12 -0500 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1241544211==" --===============1241544211== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Hi, I am hitting bit of a wall here. - I am setting bflags for NAT, and SIPPING before save("location") however, when I do "kamctl ul show", the Cflag is 0. I also checked see if the bflags are set or not in the register routine - they are being set. What am I missing? snippets of the config files. #!define FLB_NATB 6 #!define FLB_NATSIPPING 7 modparam("nathelper", "natping_interval", 30) modparam("nathelper", "ping_nated_only", 1) modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) modparam("nathelper", "sipping_method", "INFO") modparam("nathelper", "sipping_from", "sip:pinger(a)50.62.1.7") # params needed for NAT traversal in other modules modparam("nathelper|registrar|usrloc", "received_avp", "$avp(RECEIVED)") modparam("usrloc", "nat_bflag", FLB_NATB) # Caller NAT detection route route[NAT] { #!ifdef WITH_NAT force_rport(); if (nat_uac_test("19")) { if (method=="REGISTER") { fix_nated_register(); } else { fix_nated_contact(); } setflag(FLT_NATS); setbflag(FLB_NATB); } #!endif return; } # Handle SIP registrations route[REGISTRAR] { if (is_method("REGISTER")) { xlog("L_ALERT", "REGISTER: From $fU, $fd To $tU, $td"); if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) { setbflag(FLB_NATB); # uncomment next line to do SIP NAT pinging setbflag(FLB_NATSIPPING); } # 7/28/11 - make sure only one contact location is active # at any given time # unregister("location", "$rU"); if (isbflagset(FLB_NATB)) { xlog("L_ALERT", "REGISTRAR: For $fU, $fd FLB_NATB set"); } if (isbflagset(FLB_NATSIPPING)) { xlog("L_ALERT", "REGISTRAR: For $fU, $fd FLB_NATSIPPING set"); } if (!save("location")) { xlog("L_ALERT", "REGISTRAR: From $fU, $fd Location could not be saved"); sl_reply_error(); } exit; } } The debug log snippets ================== Oct 1 15:58:30 siptest /usr/sbin/kamailio[19515]: ALERT: