<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Bogdan<br><br>it is clear now :)<br><br>Thank you<br>Ha`<br><br>--- On <b>Wed, 1/6/10, Bogdan-Andrei Iancu <i><bogdan@voice-system.ro></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Bogdan-Andrei Iancu <bogdan@voice-system.ro><br>Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org><br>Date: Wednesday, January 6, 2010, 3:51 AM<br><br><div class="plainMail">Hi Ha,<br><br>the two flags are different and may have different values - one is used <br>as NAT marker, the other one is used as SIP-based pinging marker.<br><br>so, you can use different flags and both of them will be saved in cflag <br>mask.<br><br>Regards,<br>Bogdan<br><br>ha do wrote:<br>> Hi Bogdan<br>><br>> got it
:)<br>><br>> 1 more question about the flag<br>> modparam("nathelper", "sipping_bflag", 7)<br>> modparam("usrloc", "nat_bflag", 7)<br>><br>> the modem ADSL will close the port after 3 mins(some minutes), so <br>> Opensips should send OPTION message(sip ping) to modem to keep port <br>> that should open for UA<br>><br>> the sipping_blag of nathelper module should be the same value as <br>> nat_bflag of usrloc ? or the cflag of usrloc just has a value??<br>><br>><br>> Thank you<br>> Ha`<br>><br>> --- On *Tue, 1/5/10, Bogdan-Andrei Iancu /<<a ymailto="mailto:bogdan@voice-system.ro" href="/mc/compose?to=bogdan@voice-system.ro">bogdan@voice-system.ro</a>>/* <br>> wrote:<br>><br>><br>> From: Bogdan-Andrei Iancu <<a ymailto="mailto:bogdan@voice-system.ro" href="/mc/compose?to=bogdan@voice-system.ro">bogdan@voice-system.ro</a>><br>>
Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc<br>> To: "OpenSIPS users mailling list" <<a ymailto="mailto:users@lists.opensips.org" href="/mc/compose?to=users@lists.opensips.org">users@lists.opensips.org</a>><br>> Date: Tuesday, January 5, 2010, 7:20 AM<br>><br>> Hi Ha,<br>><br>> the NAT branch flag you use is 7 (nat_bflag) and in usrloc you<br>> find the<br>> branch flags in the cflags (contact flags) field. The cflags is a<br>> mask<br>> with all the branch flags: 192 = 128 (2^7) + 64 (2^6)<br>><br>> Regards,<br>> Bogdan<br>><br>><br>> ha do wrote:<br>> > Hi all<br>>
><br>> > i am successfull to check the UA behind NAT but i dont know what<br>> value<br>> > of the flag will be stored in the usrloc<br>> ><br>> > Could someone please let me know the value of Nated UA flag,<br>> that is<br>> > stored in usrloc<br>> ><br>> ><br>> > my config :<br>> > modparam("nathelper", "natping_interval",180)<br>> > modparam("nathelper", "ping_nated_only", 1)<br>> > modparam("nathelper", "sipping_bflag", 7)<br>> > modparam("nathelper", "sipping_from", "sip:<a ymailto="mailto:cucku@kamailio.org"
href="/mc/compose?to=cucku@kamailio.org">cucku@kamailio.org</a><br>> </mc/compose?to=<a ymailto="mailto:cucku@kamailio.org" href="/mc/compose?to=cucku@kamailio.org">cucku@kamailio.org</a>>")<br>> > modparam("registrar|nathelper", "received_avp", "$avp(i:80)")<br>> > modparam("usrloc", "nat_bflag", 7)<br>> ><br>> ><br>> > route{<br>> ><br>> > ....<br>> > route("4");<br>> > if (method=="REGISTER")<br>> > {<br>> > if (isflagset(5)) {<br>> >
setbflag(6);<br>> > setbflag(7);<br>> > }<br>> > if (!save("location"))<br>> > sl_reply_error();<br>> > exit;<br>> > }<br>> > }<br>> > route[4]{<br>> >
force_rport();<br>> > if (nat_uac_test("19")) {<br>> > if (method=="REGISTER") {<br>> > fix_nated_register();<br>> > } else {<br>> > fix_nated_contact();<br>> > }<br>> > setflag(5);<br>> >
}<br>> > return;<br>> > }<br>> ><br>> > mysql> select * from location\G<br>> > *************************** 1. row ***************************<br>> > id: 12<br>> > username: 1000<br>> > domain: NULL<br>> > contact: sip:1000@192.168.1.2:12280;rinstance=a4752f45bdc3ddd3<br>> > received: sip:210.245.35.150:12280<br>> > path: NULL<br>> > expires:
2010-01-05 17:48:56<br>> > q: -1.00<br>> > callid: YjE1NWJmYWYyYWMzZDg2ZDc5MjY0NDQyMGE5NDEwM2E.<br>> > cseq: 2<br>> > last_modified: 2010-01-05 16:48:56<br>> > flags: 0<br>> > cflags: 192<br>> > user_agent: eyeBeam release 1004p stamp 31962<br>> > socket: udp:118.69.193.198:5060<br>> > methods: 5951<br>> ><br>> ><br>> > Thank you<br>>
> Ha`<br>> ><br>> ><br>> ><br>> ><br>> ------------------------------------------------------------------------<br>> ><br>> > _______________________________________________<br>> > Users mailing list<br>> > <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a> </mc/compose?to=<a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a>><br>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>>
> <br>><br>><br>> -- <br>> Bogdan-Andrei Iancu<br>> www.voice-system.ro<br>><br>><br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a> </mc/compose?to=<a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a>><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>><br>><br>> ------------------------------------------------------------------------<br>><br>>
_______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>> <br><br><br>-- <br>Bogdan-Andrei Iancu<br>www.voice-system.ro<br><br><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></td></tr></table><br>