Re: [OpenSIPS-Users] Need help on flag in usrloc

2010-01-07 Thread ha do
Hi Bogdan

it is clear now :)

Thank you
Ha`

--- On Wed, 1/6/10, Bogdan-Andrei Iancu bog...@voice-system.ro wrote:

From: Bogdan-Andrei Iancu bog...@voice-system.ro
Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc
To: OpenSIPS users mailling list users@lists.opensips.org
Date: Wednesday, January 6, 2010, 3:51 AM

Hi Ha,

the two flags are different and may have different values - one is used 
as NAT marker, the other one is used as SIP-based pinging marker.

so, you can use different flags and both of them will be saved in cflag 
mask.

Regards,
Bogdan

ha do wrote:
 Hi Bogdan

 got it :)

 1 more question about the flag
 modparam(nathelper, sipping_bflag, 7)
 modparam(usrloc, nat_bflag, 7)

 the modem ADSL will close the port after 3 mins(some minutes), so 
 Opensips should send OPTION message(sip ping) to modem to keep port 
 that should open for UA

 the sipping_blag of nathelper module should be the same value as 
 nat_bflag of usrloc ? or the cflag of usrloc just  has a value??


 Thank you
 Ha`

 --- On *Tue, 1/5/10, Bogdan-Andrei Iancu /bog...@voice-system.ro/* 
 wrote:


     From: Bogdan-Andrei Iancu bog...@voice-system.ro
     Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc
     To: OpenSIPS users mailling list users@lists.opensips.org
     Date: Tuesday, January 5, 2010, 7:20 AM

     Hi Ha,

     the NAT branch flag you use is 7 (nat_bflag) and in usrloc you
     find the
     branch flags in the cflags (contact flags) field. The cflags is a
     mask
     with all the branch flags: 192 = 128 (2^7) + 64 (2^6)

     Regards,
     Bogdan


     ha do wrote:
      Hi all
     
      i am successfull to check the UA behind NAT but i dont know what
     value
      of the flag will be stored in the usrloc
     
      Could someone please let me know the value of Nated UA flag,
     that is
      stored in usrloc
     
     
      my config :
      modparam(nathelper, natping_interval,180)
      modparam(nathelper, ping_nated_only, 1)
      modparam(nathelper, sipping_bflag, 7)
      modparam(nathelper, sipping_from, sip:cu...@kamailio.org
     /mc/compose?to=cu...@kamailio.org)
      modparam(registrar|nathelper, received_avp, $avp(i:80))
      modparam(usrloc, nat_bflag, 7)
     
     
      route{
     
      
      route(4);
      if (method==REGISTER)
          {
                  if (isflagset(5)) {
                          setbflag(6);
                          setbflag(7);
                  }
                  if (!save(location))
                          sl_reply_error();
                  exit;
          }
      }
      route[4]{
          force_rport();
          if (nat_uac_test(19)) {
                  if (method==REGISTER) {
                          fix_nated_register();
                  } else {
                          fix_nated_contact();
                  }
                  setflag(5);
          }
          return;
      }
     
      mysql select * from location\G
      *** 1. row ***
             id: 12
       username: 1000
         domain: NULL
        contact: sip:1...@192.168.1.2:12280;rinstance=a4752f45bdc3ddd3
       received: sip:210.245.35.150:12280
           path: NULL
        expires: 2010-01-05 17:48:56
              q: -1.00
         callid: YjE1NWJmYWYyYWMzZDg2ZDc5MjY0NDQyMGE5NDEwM2E.
           cseq: 2
      last_modified: 2010-01-05 16:48:56
           flags: 0
          cflags: 192
      user_agent: eyeBeam release 1004p stamp 31962
        socket: udp:118.69.193.198:5060
        methods: 5951
     
     
      Thank you
      Ha`
     
     
     
     
     
     
      ___
      Users mailing list
      Users@lists.opensips.org /mc/compose?to=us...@lists.opensips.org
      http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    


     -- 
     Bogdan-Andrei Iancu
     www.voice-system.ro


     ___
     Users mailing list
     us...@lists.opensips.org /mc/compose?to=us...@lists.opensips.org
     http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



  ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need help on flag in usrloc

2010-01-06 Thread ha do
Hi Bogdan

got it :)

1 more question about the flag 
modparam(nathelper, sipping_bflag, 7)
 modparam(usrloc, nat_bflag, 7)

the modem ADSL will close the port after 3 mins(some minutes), so Opensips 
should send OPTION message(sip ping) to modem to keep port that should open for 
UA 

the sipping_blag of nathelper module should be the same value as nat_bflag of 
usrloc ? or the cflag of usrloc just  has a value??


Thank you
Ha`

--- On Tue, 1/5/10, Bogdan-Andrei Iancu bog...@voice-system.ro wrote:

From: Bogdan-Andrei Iancu bog...@voice-system.ro
Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc
To: OpenSIPS users mailling list users@lists.opensips.org
Date: Tuesday, January 5, 2010, 7:20 AM

Hi Ha,

the NAT branch flag you use is 7 (nat_bflag) and in usrloc you find the 
branch flags in the cflags (contact flags) field. The cflags is a mask 
with all the branch flags: 192 = 128 (2^7) + 64 (2^6)

Regards,
Bogdan


ha do wrote:
 Hi all

 i am successfull to check the UA behind NAT but i dont know what value 
 of the flag will be stored in the usrloc

 Could someone please let me know the value of Nated UA flag, that is 
 stored in usrloc


 my config :
 modparam(nathelper, natping_interval,180)
 modparam(nathelper, ping_nated_only, 1)
 modparam(nathelper, sipping_bflag, 7)
 modparam(nathelper, sipping_from, sip:cu...@kamailio.org)
 modparam(registrar|nathelper, received_avp, $avp(i:80))
 modparam(usrloc, nat_bflag, 7)


 route{

 
 route(4);
 if (method==REGISTER)
         {
                 if (isflagset(5)) {
                         setbflag(6);
                         setbflag(7);
                 }
                 if (!save(location))
                         sl_reply_error();
                 exit;
         }
 }
 route[4]{
         force_rport();
         if (nat_uac_test(19)) {
                 if (method==REGISTER) {
                         fix_nated_register();
                 } else {
                         fix_nated_contact();
                 }
                 setflag(5);
         }
         return;
 }

 mysql select * from location\G
 *** 1. row ***
            id: 12
      username: 1000
        domain: NULL
       contact: sip:1...@192.168.1.2:12280;rinstance=a4752f45bdc3ddd3
      received: sip:210.245.35.150:12280
          path: NULL
       expires: 2010-01-05 17:48:56
             q: -1.00
        callid: YjE1NWJmYWYyYWMzZDg2ZDc5MjY0NDQyMGE5NDEwM2E.
          cseq: 2
 last_modified: 2010-01-05 16:48:56
          flags: 0
         cflags: 192
 user_agent: eyeBeam release 1004p stamp 31962
       socket: udp:118.69.193.198:5060
       methods: 5951


 Thank you
 Ha`



 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



  ___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need help on flag in usrloc

2010-01-06 Thread Bogdan-Andrei Iancu
Hi Ha,

the two flags are different and may have different values - one is used 
as NAT marker, the other one is used as SIP-based pinging marker.

so, you can use different flags and both of them will be saved in cflag 
mask.

Regards,
Bogdan

ha do wrote:
 Hi Bogdan

 got it :)

 1 more question about the flag
 modparam(nathelper, sipping_bflag, 7)
 modparam(usrloc, nat_bflag, 7)

 the modem ADSL will close the port after 3 mins(some minutes), so 
 Opensips should send OPTION message(sip ping) to modem to keep port 
 that should open for UA

 the sipping_blag of nathelper module should be the same value as 
 nat_bflag of usrloc ? or the cflag of usrloc just  has a value??


 Thank you
 Ha`

 --- On *Tue, 1/5/10, Bogdan-Andrei Iancu /bog...@voice-system.ro/* 
 wrote:


 From: Bogdan-Andrei Iancu bog...@voice-system.ro
 Subject: Re: [OpenSIPS-Users] Need help on flag in usrloc
 To: OpenSIPS users mailling list users@lists.opensips.org
 Date: Tuesday, January 5, 2010, 7:20 AM

 Hi Ha,

 the NAT branch flag you use is 7 (nat_bflag) and in usrloc you
 find the
 branch flags in the cflags (contact flags) field. The cflags is a
 mask
 with all the branch flags: 192 = 128 (2^7) + 64 (2^6)

 Regards,
 Bogdan


 ha do wrote:
  Hi all
 
  i am successfull to check the UA behind NAT but i dont know what
 value
  of the flag will be stored in the usrloc
 
  Could someone please let me know the value of Nated UA flag,
 that is
  stored in usrloc
 
 
  my config :
  modparam(nathelper, natping_interval,180)
  modparam(nathelper, ping_nated_only, 1)
  modparam(nathelper, sipping_bflag, 7)
  modparam(nathelper, sipping_from, sip:cu...@kamailio.org
 /mc/compose?to=cu...@kamailio.org)
  modparam(registrar|nathelper, received_avp, $avp(i:80))
  modparam(usrloc, nat_bflag, 7)
 
 
  route{
 
  
  route(4);
  if (method==REGISTER)
  {
  if (isflagset(5)) {
  setbflag(6);
  setbflag(7);
  }
  if (!save(location))
  sl_reply_error();
  exit;
  }
  }
  route[4]{
  force_rport();
  if (nat_uac_test(19)) {
  if (method==REGISTER) {
  fix_nated_register();
  } else {
  fix_nated_contact();
  }
  setflag(5);
  }
  return;
  }
 
  mysql select * from location\G
  *** 1. row ***
 id: 12
   username: 1000
 domain: NULL
contact: sip:1...@192.168.1.2:12280;rinstance=a4752f45bdc3ddd3
   received: sip:210.245.35.150:12280
   path: NULL
expires: 2010-01-05 17:48:56
  q: -1.00
 callid: YjE1NWJmYWYyYWMzZDg2ZDc5MjY0NDQyMGE5NDEwM2E.
   cseq: 2
  last_modified: 2010-01-05 16:48:56
   flags: 0
  cflags: 192
  user_agent: eyeBeam release 1004p stamp 31962
socket: udp:118.69.193.198:5060
methods: 5951
 
 
  Thank you
  Ha`
 
 
 
 
 
 
  ___
  Users mailing list
  Users@lists.opensips.org /mc/compose?to=us...@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 -- 
 Bogdan-Andrei Iancu
 www.voice-system.ro


 ___
 Users mailing list
 Users@lists.opensips.org /mc/compose?to=us...@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need help on flag in usrloc

2010-01-05 Thread Bogdan-Andrei Iancu
Hi Ha,

the NAT branch flag you use is 7 (nat_bflag) and in usrloc you find the 
branch flags in the cflags (contact flags) field. The cflags is a mask 
with all the branch flags: 192 = 128 (2^7) + 64 (2^6)

Regards,
Bogdan


ha do wrote:
 Hi all

 i am successfull to check the UA behind NAT but i dont know what value 
 of the flag will be stored in the usrloc

 Could someone please let me know the value of Nated UA flag, that is 
 stored in usrloc


 my config :
 modparam(nathelper, natping_interval,180)
 modparam(nathelper, ping_nated_only, 1)
 modparam(nathelper, sipping_bflag, 7)
 modparam(nathelper, sipping_from, sip:cu...@kamailio.org)
 modparam(registrar|nathelper, received_avp, $avp(i:80))
 modparam(usrloc, nat_bflag, 7)


 route{

 
 route(4);
 if (method==REGISTER)
 {
 if (isflagset(5)) {
 setbflag(6);
 setbflag(7);
 }
 if (!save(location))
 sl_reply_error();
 exit;
 }
 }
 route[4]{
 force_rport();
 if (nat_uac_test(19)) {
 if (method==REGISTER) {
 fix_nated_register();
 } else {
 fix_nated_contact();
 }
 setflag(5);
 }
 return;
 }

 mysql select * from location\G
 *** 1. row ***
id: 12
  username: 1000
domain: NULL
   contact: sip:1...@192.168.1.2:12280;rinstance=a4752f45bdc3ddd3
  received: sip:210.245.35.150:12280
  path: NULL
   expires: 2010-01-05 17:48:56
 q: -1.00
callid: YjE1NWJmYWYyYWMzZDg2ZDc5MjY0NDQyMGE5NDEwM2E.
  cseq: 2
 last_modified: 2010-01-05 16:48:56
  flags: 0
 cflags: 192
 user_agent: eyeBeam release 1004p stamp 31962
   socket: udp:118.69.193.198:5060
   methods: 5951


 Thank you
 Ha`



 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users