Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-28 Thread Vitaliy Aleksandrov

Hi,

You can take a look at this option:
http://kamailio.org/docs/modules/4.2.x/modules/usrloc.html#usrloc.p.handle_lost_tcp

It's a bit limited and doesn't work for:
- usrloc db only mode
- if you have separated edge proxy and registrar


Thank you for information..
What can Kamailio do about clients, that exit abnormally (e.g. crash, turn off, ..) which 
do unregister properly? Can Kamailio send this expire=0 on behalf of these 
clients?
Can Kamailio determine that a client got offline based on e.g. TLS connection or other 
heartbeats?
On 20.04.2015 10:16, Daniel Grotti wrote:

Hi,
here you are:

https://tools.ietf.org/html/rfc3665#section-2.4



--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:10 AM, Mickael Marrache wrote:

Hi,

  


You need to configure your client to un register when the app is closed.

  


For that, your client must send a REGISTER with Expires: 0.

  


Mickael

  


*From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
Behalf Of *xuefeng zhang
*Sent:* Monday, April 20, 2015 10:58 AM
*To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
*Subject:* [SR-Users] Expect the kamailio's sip account is unregistered
state when the client app is shutdown

  


Hi Daniel,

  


When the client's app is closed,the sip account may be registered
state,because the expired time may have some rest time.I want to
implement when the client's app is closed,the account also unregister.

  


How can I implement this function?Would you give me some advices?

  


Thanks!

  


Xuefeng Zhang



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-23 Thread xuefeng zhang
Hi,

I only add the two defines.The follow is my settings.

 #!define WITH_NAT

 #!define WITH_NATSIPPIN

 modparam(nathelper, natping_interval, 30)

 modparam(nathelper, ping_nated_only, 1)

 modparam(nathelper, sipping_bflag, FLB_NATSIPPING)

 modparam(nathelper, sipping_from, sip:pin...@kamailio.org)

 modparam(nathelper|registrar, received_avp, $avp(RECEIVED))


Does the kamailio server send OPTIONS packages?If the server doesn't
send,the configure file must have error.

Lucky.


Xuefeng Zhang



2015-04-22 20:51 GMT+08:00 Filip Malenka filip.male...@gmail.com:

 Hi Xuefeng,

 did you do set any other module parameters?
 I can't get it to work..

 My UAs uregister only because of expire=300, that means that they go
 offline after 5 minutes. Usually UAs have much higher expire=3600, does
 that mean they would go offline in 1 hour?

 I hoped, that when I set

 #!define WITH_NAT
 #!define WITH_NATSIPPING

 # - nathelper params -
 modparam(nathelper, natping_interval, 10)
 # modparam(nathelper, ping_nated_only, 1)
 modparam(nathelper, sipping_bflag, FLB_NATSIPPING)
 modparam(nathelper, sipping_from, sip:pin...@kamailio.org)
 modparam(nathelper, keepalive_timeout, 40)

 and

 # - presence params -
 modparam(presence, db_url, DBURL)
 modparam(presence, clean_period, 10)
 modparam(presence, db_update_period, 10)

 that my UAs will get offline as soon as in 40 seconds..
 Where did I go wrong?
 Thanks.

 On 22.04.2015 04:21, xuefeng zhang wrote:
  Hi all,
 
  I add the WITH_NAT and WITH_NATSIPPING and it works ok.The account will
  unregister after 3 minutes.
 
  Thank you very much.
 
  Xuefeng Zhang
 
  2015-04-21 17:43 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com
  mailto:mico...@gmail.com:
 
  Hello,
 
  On 21/04/15 07:07, Mickael Marrache wrote:
  Hi,
 
  IIR means If I Remember.
  indeed, thanks for completing -- it was a result of incomplete
  typing as I wanted to use IIRC (if i remember correctly), which is
  more standard acronym out there.
 
  Xuefeng: sending keepalives is done via nathelper module, by seeting
  sipping branch flag when processing REGISTER requests - see:
 
  -
 
 http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.sipping_bflag
 
  For a proper example of usage, see the default kamailio.cfg for v4.2
  - it has this feature inside, easy to enable with defines:
 
  #!define WITH_NAT
  #!define WITH_NATSIPPING
 
  Add those lines somewhere at the beginning of kamailio.cfg -- also,
  read the comments at the top of the kamailio.cfg, some notes about
  this are made there.
 
  Cheers,
  Daniel
 
 
  Are you also using keepalives sent by clients? I often read that
  NATs don't refresh their mapping on incoming traffic, you may want
  to take a look at client keepalives.
 
  Mickael
 
  On 21 באפר 2015, at 07:38, xuefeng zhang
  zhangxuefeng1...@gmail.com mailto:zhangxuefeng1...@gmail.com
  wrote:
 
  Hi Daniel,
 
  I understand your reply.The kamailio can set the IIR to send
  the OPTIONS packets period.
  But I don't found out the knowledge of the IIR.
 
  Would you give me some things how to do it.
 
  Thanks!
 
  Xuefeng Zhang
 
  2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla
  mico...@gmail.com mailto:mico...@gmail.com:
 
  IIR, the keepalives are sent stateless, so no transactions
  are create
  for them. Just OPTIONS packets sent out, resulting in less
  load on
  kamailio (well, comparing with normal transactional
  forwarding). The
  mechanism behind detecting offline users with keepalives is
  based on a
  counter kept in memory for the location record, which is
  reset if the
  reply to OPTIONS comes back. If there are three (or so)
  keepalives sent
  out and none was replied, then the record is removed.
  Practically there
  is no retransmission for those keepalive requests, no special
  states,
  just this counter in memory per location record. Given this,
  (again
  iirc), this feature doesn't work with db_mode set to database
  only.
 
  Cheers,
  Daniel
 
  On 20/04/15 10:46, Mickael Marrache wrote:
   Didn't know about that, it's interesting.
  
   I'm curious about the load impact of this feature, since
  keepalives are
   generally sent every 30 sec.
  
   -Original Message-
   From: sr-users
  [mailto:sr-users-boun...@lists.sip-router.org
  mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
   Daniel Grotti
   Sent: Monday, April 20, 2015 11:40 AM
   To: sr-users@lists.sip-router.org
  mailto:sr-users@lists.sip-router.org
   Subject: Re: [SR-Users] Expect the 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-23 Thread Filip Malenka
Hi,

thank you for your reply..
Unfortunately I wansn't able to determine if OPTIONS packets are sent.
When I observe the /var/log/syslog for kamailio messages I see only
NOTIFY requests about presence, no OPTIONS.
I assume they are not beeing sent, how do I turn them on?
I found a module options while googling for a solution, but in my
kamailio.cfg it is not loaded and I have no options.so module listed in
/usr/lib/x86_64-linux-gnu/kamailio/modules

How do I turn on OPTIONS and verify they were sent?

By the way, just a thought, can it be that NATSIPPING works only with
UDP? Because all UAs I use communicate over TLS. Does nat sip pinging
work with TLS too?

Thank you much for patience :)

On 23.04.2015 08:40, xuefeng zhang wrote:
 Hi,
 
 I only add the two defines.The follow is my settings.
 
  #!define WITH_NAT
 
  #!define WITH_NATSIPPIN
 
  modparam(nathelper, natping_interval, 30)
 
  modparam(nathelper, ping_nated_only, 1)
 
  modparam(nathelper, sipping_bflag, FLB_NATSIPPING)
 
  modparam(nathelper, sipping_from, sip:pin...@kamailio.org
 mailto:sip%3apin...@kamailio.org)
 
  modparam(nathelper|registrar, received_avp, $avp(RECEIVED))
 
 
 Does the kamailio server send OPTIONS packages?If the server doesn't
 send,the configure file must have error.
 
 Lucky.
 
 
 Xuefeng Zhang
 
 
 
 2015-04-22 20:51 GMT+08:00 Filip Malenka filip.male...@gmail.com
 mailto:filip.male...@gmail.com:
 
 Hi Xuefeng,
 
 did you do set any other module parameters?
 I can't get it to work..
 
 My UAs uregister only because of expire=300, that means that they go
 offline after 5 minutes. Usually UAs have much higher expire=3600, does
 that mean they would go offline in 1 hour?
 
 I hoped, that when I set
 
 #!define WITH_NAT
 #!define WITH_NATSIPPING
 
 # - nathelper params -
 modparam(nathelper, natping_interval, 10)
 # modparam(nathelper, ping_nated_only, 1)
 modparam(nathelper, sipping_bflag, FLB_NATSIPPING)
 modparam(nathelper, sipping_from, sip:pin...@kamailio.org
 mailto:sip%3apin...@kamailio.org)
 modparam(nathelper, keepalive_timeout, 40)
 
 and
 
 # - presence params -
 modparam(presence, db_url, DBURL)
 modparam(presence, clean_period, 10)
 modparam(presence, db_update_period, 10)
 
 that my UAs will get offline as soon as in 40 seconds..
 Where did I go wrong?
 Thanks.
 
 On 22.04.2015 04 tel:22.04.2015%2004:21, xuefeng zhang wrote:
  Hi all,
 
  I add the WITH_NAT and WITH_NATSIPPING and it works ok.The account will
  unregister after 3 minutes.
 
  Thank you very much.
 
  Xuefeng Zhang
 
  2015-04-21 17:43 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com 
 mailto:mico...@gmail.com
  mailto:mico...@gmail.com mailto:mico...@gmail.com:
 
  Hello,
 
  On 21/04/15 07:07, Mickael Marrache wrote:
  Hi,
 
  IIR means If I Remember.
  indeed, thanks for completing -- it was a result of incomplete
  typing as I wanted to use IIRC (if i remember correctly), which is
  more standard acronym out there.
 
  Xuefeng: sending keepalives is done via nathelper module, by
 seeting
  sipping branch flag when processing REGISTER requests - see:
 
  -

  
 http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.sipping_bflag
 
  For a proper example of usage, see the default kamailio.cfg
 for v4.2
  - it has this feature inside, easy to enable with defines:
 
  #!define WITH_NAT
  #!define WITH_NATSIPPING
 
  Add those lines somewhere at the beginning of kamailio.cfg --
 also,
  read the comments at the top of the kamailio.cfg, some notes about
  this are made there.
 
  Cheers,
  Daniel
 
 
  Are you also using keepalives sent by clients? I often read that
  NATs don't refresh their mapping on incoming traffic, you may
 want
  to take a look at client keepalives.
 
  Mickael
 
  On 21 באפר 2015, at 07:38, xuefeng zhang
  zhangxuefeng1...@gmail.com
 mailto:zhangxuefeng1...@gmail.com
 mailto:zhangxuefeng1...@gmail.com mailto:zhangxuefeng1...@gmail.com
  wrote:
 
  Hi Daniel,
 
  I understand your reply.The kamailio can set the IIR to send
  the OPTIONS packets period.
  But I don't found out the knowledge of the IIR.
 
  Would you give me some things how to do it.
 
  Thanks!
 
  Xuefeng Zhang
 
  2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla
  mico...@gmail.com mailto:mico...@gmail.com
 mailto:mico...@gmail.com mailto:mico...@gmail.com:
 
  IIR, the keepalives are sent stateless, so no transactions
  are create
  for 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-22 Thread Filip Malenka
Hi Xuefeng,

did you do set any other module parameters?
I can't get it to work..

My UAs uregister only because of expire=300, that means that they go
offline after 5 minutes. Usually UAs have much higher expire=3600, does
that mean they would go offline in 1 hour?

I hoped, that when I set

#!define WITH_NAT
#!define WITH_NATSIPPING

# - nathelper params -
modparam(nathelper, natping_interval, 10)
# modparam(nathelper, ping_nated_only, 1)
modparam(nathelper, sipping_bflag, FLB_NATSIPPING)
modparam(nathelper, sipping_from, sip:pin...@kamailio.org)
modparam(nathelper, keepalive_timeout, 40)

and

# - presence params -
modparam(presence, db_url, DBURL)
modparam(presence, clean_period, 10)
modparam(presence, db_update_period, 10)

that my UAs will get offline as soon as in 40 seconds..
Where did I go wrong?
Thanks.

On 22.04.2015 04:21, xuefeng zhang wrote:
 Hi all,
 
 I add the WITH_NAT and WITH_NATSIPPING and it works ok.The account will
 unregister after 3 minutes.
 
 Thank you very much.
 
 Xuefeng Zhang
 
 2015-04-21 17:43 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com
 mailto:mico...@gmail.com:
 
 Hello,
 
 On 21/04/15 07:07, Mickael Marrache wrote:
 Hi,

 IIR means If I Remember.
 indeed, thanks for completing -- it was a result of incomplete
 typing as I wanted to use IIRC (if i remember correctly), which is
 more standard acronym out there.
 
 Xuefeng: sending keepalives is done via nathelper module, by seeting
 sipping branch flag when processing REGISTER requests - see:
 
 -
 
 http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.sipping_bflag
 
 For a proper example of usage, see the default kamailio.cfg for v4.2
 - it has this feature inside, easy to enable with defines:
 
 #!define WITH_NAT
 #!define WITH_NATSIPPING
 
 Add those lines somewhere at the beginning of kamailio.cfg -- also,
 read the comments at the top of the kamailio.cfg, some notes about
 this are made there.
 
 Cheers,
 Daniel
 

 Are you also using keepalives sent by clients? I often read that
 NATs don't refresh their mapping on incoming traffic, you may want
 to take a look at client keepalives.

 Mickael

 On 21 באפר 2015, at 07:38, xuefeng zhang
 zhangxuefeng1...@gmail.com mailto:zhangxuefeng1...@gmail.com
 wrote:

 Hi Daniel,

 I understand your reply.The kamailio can set the IIR to send
 the OPTIONS packets period.
 But I don't found out the knowledge of the IIR.

 Would you give me some things how to do it.

 Thanks!

 Xuefeng Zhang

 2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla
 mico...@gmail.com mailto:mico...@gmail.com:

 IIR, the keepalives are sent stateless, so no transactions
 are create
 for them. Just OPTIONS packets sent out, resulting in less
 load on
 kamailio (well, comparing with normal transactional
 forwarding). The
 mechanism behind detecting offline users with keepalives is
 based on a
 counter kept in memory for the location record, which is
 reset if the
 reply to OPTIONS comes back. If there are three (or so)
 keepalives sent
 out and none was replied, then the record is removed.
 Practically there
 is no retransmission for those keepalive requests, no special
 states,
 just this counter in memory per location record. Given this,
 (again
 iirc), this feature doesn't work with db_mode set to database
 only.

 Cheers,
 Daniel

 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since
 keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users
 [mailto:sr-users-boun...@lists.sip-router.org
 mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
 mailto:sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account
 is unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
 
 
 http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria |
 www.sipwise.com http://www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally
 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-21 Thread Daniel-Constantin Mierla
Hello,

On 21/04/15 07:07, Mickael Marrache wrote:
 Hi,

 IIR means If I Remember.
indeed, thanks for completing -- it was a result of incomplete typing as
I wanted to use IIRC (if i remember correctly), which is more standard
acronym out there.

Xuefeng: sending keepalives is done via nathelper module, by seeting
sipping branch flag when processing REGISTER requests - see:

-
http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.sipping_bflag

For a proper example of usage, see the default kamailio.cfg for v4.2 -
it has this feature inside, easy to enable with defines:

#!define WITH_NAT
#!define WITH_NATSIPPING

Add those lines somewhere at the beginning of kamailio.cfg -- also, read
the comments at the top of the kamailio.cfg, some notes about this are
made there.

Cheers,
Daniel

 Are you also using keepalives sent by clients? I often read that NATs
 don't refresh their mapping on incoming traffic, you may want to take
 a look at client keepalives.

 Mickael

 On 21 באפר 2015, at 07:38, xuefeng zhang zhangxuefeng1...@gmail.com
 mailto:zhangxuefeng1...@gmail.com wrote:

 Hi Daniel,

 I understand your reply.The kamailio can set the IIR to send the
 OPTIONS packets period.
 But I don't found out the knowledge of the IIR.

 Would you give me some things how to do it.

 Thanks!

 Xuefeng Zhang

 2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla
 mico...@gmail.com mailto:mico...@gmail.com:

 IIR, the keepalives are sent stateless, so no transactions are create
 for them. Just OPTIONS packets sent out, resulting in less load on
 kamailio (well, comparing with normal transactional forwarding). The
 mechanism behind detecting offline users with keepalives is based
 on a
 counter kept in memory for the location record, which is reset if the
 reply to OPTIONS comes back. If there are three (or so)
 keepalives sent
 out and none was replied, then the record is removed. Practically
 there
 is no retransmission for those keepalive requests, no special states,
 just this counter in memory per location record. Given this, (again
 iirc), this feature doesn't work with db_mode set to database only.

 Cheers,
 Daniel

 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since
 keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users [mailto:sr-users-boun...@lists.sip-router.org
 mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
 mailto:sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account is
 unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
 
 
 http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria |
 www.sipwise.com http://www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally (e.g.
 crash, turn
  off, ..) which do unregister properly? Can Kamailio send this
 expire=0 on
  behalf of these clients?
  Can Kamailio determine that a client got offline based on e.g. TLS
  connection or other heartbeats?
  On 20.04.2015 10:16, Daniel Grotti wrote:
  Hi,
  here you are:
 
  https://tools.ietf.org/html/rfc3665#section-2.4
 
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria |
 www.sipwise.com http://www.sipwise.com
 
  On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
 
 
  You need to configure your client to un register when the
 app is closed.
 
 
 
  For that, your client must send a REGISTER with Expires: 0.
 
 
 
  Mickael
 
 
 
  *From:*sr-users
 [mailto:sr-users-boun...@lists.sip-router.org
 mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users
 Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is
  unregistered state when the client app is shutdown
 
 
 
  Hi Daniel,
 
 
 
  When the client's app is closed,the sip account may be
 registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also
 unregister.
 
 
 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-21 Thread xuefeng zhang
Hi all,

I add the WITH_NAT and WITH_NATSIPPING and it works ok.The account will
unregister after 3 minutes.

Thank you very much.

Xuefeng Zhang

2015-04-21 17:43 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com:

  Hello,

 On 21/04/15 07:07, Mickael Marrache wrote:

 Hi,

  IIR means If I Remember.

 indeed, thanks for completing -- it was a result of incomplete typing as I
 wanted to use IIRC (if i remember correctly), which is more standard
 acronym out there.

 Xuefeng: sending keepalives is done via nathelper module, by seeting
 sipping branch flag when processing REGISTER requests - see:

 -
 http://kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.sipping_bflag

 For a proper example of usage, see the default kamailio.cfg for v4.2 - it
 has this feature inside, easy to enable with defines:

 #!define WITH_NAT
 #!define WITH_NATSIPPING

 Add those lines somewhere at the beginning of kamailio.cfg -- also, read
 the comments at the top of the kamailio.cfg, some notes about this are made
 there.

 Cheers,
 Daniel


  Are you also using keepalives sent by clients? I often read that NATs
 don't refresh their mapping on incoming traffic, you may want to take a
 look at client keepalives.

  Mickael

 On 21 באפר 2015, at 07:38, xuefeng zhang zhangxuefeng1...@gmail.com
 wrote:

   Hi Daniel,

  I understand your reply.The kamailio can set the IIR to send the
 OPTIONS packets period.
 But I don't found out the knowledge of the IIR.

  Would you give me some things how to do it.

  Thanks!

  Xuefeng Zhang

 2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com:

 IIR, the keepalives are sent stateless, so no transactions are create
 for them. Just OPTIONS packets sent out, resulting in less load on
 kamailio (well, comparing with normal transactional forwarding). The
 mechanism behind detecting offline users with keepalives is based on a
 counter kept in memory for the location record, which is reset if the
 reply to OPTIONS comes back. If there are three (or so) keepalives sent
 out and none was replied, then the record is removed. Practically there
 is no retransmission for those keepalive requests, no special states,
 just this counter in memory per location record. Given this, (again
 iirc), this feature doesn't work with db_mode set to database only.

 Cheers,
 Daniel

 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On
 Behalf Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account is
 unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
 
 http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper
 .
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally (e.g. crash,
 turn
  off, ..) which do unregister properly? Can Kamailio send this
 expire=0 on
  behalf of these clients?
  Can Kamailio determine that a client got offline based on e.g. TLS
  connection or other heartbeats?
  On 20.04.2015 10:16, Daniel Grotti wrote:
  Hi,
  here you are:
 
  https://tools.ietf.org/html/rfc3665#section-2.4
 
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
 
 
  You need to configure your client to un register when the app is
 closed.
 
 
 
  For that, your client must send a REGISTER with Expires: 0.
 
 
 
  Mickael
 
 
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is
  unregistered state when the client app is shutdown
 
 
 
  Hi Daniel,
 
 
 
  When the client's app is closed,the sip account may be registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also
 unregister.
 
 
 
  How can I implement this function?Would you give me some advices?
 
 
 
  Thanks!
 
 
 
  Xuefeng Zhang
 
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread xuefeng zhang
Hi Daniel,

I understand your reply.The kamailio can set the IIR to send the OPTIONS
packets period.
But I don't found out the knowledge of the IIR.

Would you give me some things how to do it.

Thanks!

Xuefeng Zhang

2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com:

 IIR, the keepalives are sent stateless, so no transactions are create
 for them. Just OPTIONS packets sent out, resulting in less load on
 kamailio (well, comparing with normal transactional forwarding). The
 mechanism behind detecting offline users with keepalives is based on a
 counter kept in memory for the location record, which is reset if the
 reply to OPTIONS comes back. If there are three (or so) keepalives sent
 out and none was replied, then the record is removed. Practically there
 is no retransmission for those keepalive requests, no special states,
 just this counter in memory per location record. Given this, (again
 iirc), this feature doesn't work with db_mode set to database only.

 Cheers,
 Daniel

 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf
 Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
 
 http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper
 .
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally (e.g. crash,
 turn
  off, ..) which do unregister properly? Can Kamailio send this expire=0
 on
  behalf of these clients?
  Can Kamailio determine that a client got offline based on e.g. TLS
  connection or other heartbeats?
  On 20.04.2015 10:16, Daniel Grotti wrote:
  Hi,
  here you are:
 
  https://tools.ietf.org/html/rfc3665#section-2.4
 
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
 
 
  You need to configure your client to un register when the app is
 closed.
 
 
 
  For that, your client must send a REGISTER with Expires: 0.
 
 
 
  Mickael
 
 
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is
  unregistered state when the client app is shutdown
 
 
 
  Hi Daniel,
 
 
 
  When the client's app is closed,the sip account may be registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also unregister.
 
 
 
  How can I implement this function?Would you give me some advices?
 
 
 
  Thanks!
 
 
 
  Xuefeng Zhang
 
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Hi,

IIR means If I Remember.

Are you also using keepalives sent by clients? I often read that NATs don't 
refresh their mapping on incoming traffic, you may want to take a look at 
client keepalives.

Mickael

 On 21 באפר 2015, at 07:38, xuefeng zhang zhangxuefeng1...@gmail.com wrote:
 
 Hi Daniel,
 
 I understand your reply.The kamailio can set the IIR to send the OPTIONS 
 packets period.
 But I don't found out the knowledge of the IIR.
 
 Would you give me some things how to do it.
 
 Thanks!
 
 Xuefeng Zhang
 
 2015-04-20 18:10 GMT+08:00 Daniel-Constantin Mierla mico...@gmail.com:
 IIR, the keepalives are sent stateless, so no transactions are create
 for them. Just OPTIONS packets sent out, resulting in less load on
 kamailio (well, comparing with normal transactional forwarding). The
 mechanism behind detecting offline users with keepalives is based on a
 counter kept in memory for the location record, which is reset if the
 reply to OPTIONS comes back. If there are three (or so) keepalives sent
 out and none was replied, then the record is removed. Practically there
 is no retransmission for those keepalive requests, no special states,
 just this counter in memory per location record. Given this, (again
 iirc), this feature doesn't work with db_mode set to database only.
 
 Cheers,
 Daniel
 
 On 20/04/15 10:46, Mickael Marrache wrote:
  Didn't know about that, it's interesting.
 
  I'm curious about the load impact of this feature, since keepalives are
  generally sent every 30 sec.
 
  -Original Message-
  From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
  Daniel Grotti
  Sent: Monday, April 20, 2015 11:40 AM
  To: sr-users@lists.sip-router.org
  Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
  state when the client app is shutdown
 
  Hi,
  you may want to use:
 
  http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
  p.keepalive_timeout
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:34 AM, Filip Malenka wrote:
  Thank you for information..
  What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
  off, ..) which do unregister properly? Can Kamailio send this expire=0 on
  behalf of these clients?
  Can Kamailio determine that a client got offline based on e.g. TLS
  connection or other heartbeats?
  On 20.04.2015 10:16, Daniel Grotti wrote:
  Hi,
  here you are:
 
  https://tools.ietf.org/html/rfc3665#section-2.4
 
 
 
  --
  Daniel Grotti
  VoIP Engineer
 
 
  Sipwise GmbH
  Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com
 
  On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
 
 
  You need to configure your client to un register when the app is closed.
 
 
 
  For that, your client must send a REGISTER with Expires: 0.
 
 
 
  Mickael
 
 
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is
  unregistered state when the client app is shutdown
 
 
 
  Hi Daniel,
 
 
 
  When the client's app is closed,the sip account may be registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also unregister.
 
 
 
  How can I implement this function?Would you give me some advices?
 
 
 
  Thanks!
 
 
 
  Xuefeng Zhang
 
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
  list sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 
 --
 Daniel-Constantin Mierla
 http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com
 
 
 ___
 SIP Express Router (SER) and 

Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Hi,

 

You need to configure your client to un register when the app is closed.

 

For that, your client must send a REGISTER with Expires: 0.

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
xuefeng zhang
Sent: Monday, April 20, 2015 10:58 AM
To: Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
Subject: [SR-Users] Expect the kamailio's sip account is unregistered state 
when the client app is shutdown

 

Hi Daniel,

 

When the client's app is closed,the sip account may be registered state,because 
the expired time may have some rest time.I want to implement when the client's 
app is closed,the account also unregister.

 

How can I implement this function?Would you give me some advices?

 

Thanks!

 

Xuefeng Zhang

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Filip Malenka
I would be interrested in this too..
At the moment I am setting expires on my UAs to a low value (300) and
when a UA exits SIP softphone application, Kamailio notifies it's
offline status in 5 minutes.
An immediate online/offline status would be better.. Is that possible
with Kamailio?

On 20.04.2015 09:57, xuefeng zhang wrote:
 Hi Daniel,
 
 When the client's app is closed,the sip account may be registered
 state,because the expired time may have some rest time.I want to
 implement when the client's app is closed,the account also unregister.
 
 How can I implement this function?Would you give me some advices?
 
 Thanks!
 
 Xuefeng Zhang
 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Daniel Grotti
Hi,
if the app crashes, it will just de-register the user after the
expiration time, since no re-register came in.


--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:34 AM, Filip Malenka wrote:
 Thank you for information..
 What can Kamailio do about clients, that exit abnormally (e.g. crash, turn 
 off, ..) which do unregister properly? Can Kamailio send this expire=0 on 
 behalf of these clients?
 Can Kamailio determine that a client got offline based on e.g. TLS connection 
 or other heartbeats?
 On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,

  

 You need to configure your client to un register when the app is closed.

  

 For that, your client must send a REGISTER with Expires: 0.

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is unregistered
 state when the client app is shutdown

  

 Hi Daniel,

  

 When the client's app is closed,the sip account may be registered
 state,because the expired time may have some rest time.I want to
 implement when the client's app is closed,the account also unregister.

  

 How can I implement this function?Would you give me some advices?

  

 Thanks!

  

 Xuefeng Zhang



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
No, it is not possible.

However, it's not really an issue since sending an INVITE to the invalid
location will result on a timeout which you can keep short (see the
fr_timer) and then you can catch the timeout and behave as if there was no
active registration.

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Filip Malenka
Sent: Monday, April 20, 2015 11:34 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
state when the client app is shutdown

Thank you for information..
What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
off, ..) which do unregister properly? Can Kamailio send this expire=0 on
behalf of these clients?
Can Kamailio determine that a client got offline based on e.g. TLS
connection or other heartbeats?
On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
   
 
  You need to configure your client to un register when the app is closed.
 
   
 
  For that, your client must send a REGISTER with Expires: 0.
 
   
 
  Mickael
 
   
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is 
  unregistered state when the client app is shutdown
 
   
 
  Hi Daniel,
 
   
 
  When the client's app is closed,the sip account may be registered 
  state,because the expired time may have some rest time.I want to 
  implement when the client's app is closed,the account also unregister.
 
   
 
  How can I implement this function?Would you give me some advices?
 
   
 
  Thanks!
 
   
 
  Xuefeng Zhang
 
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
  list sr-users@lists.sip-router.org 
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread xuefeng zhang
Hi Daniel,

When the client's app is closed,the sip account may be registered
state,because the expired time may have some rest time.I want to implement
when the client's app is closed,the account also unregister.

How can I implement this function?Would you give me some advices?

Thanks!

Xuefeng Zhang
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Daniel Grotti
Hi,
here you are:

https://tools.ietf.org/html/rfc3665#section-2.4



--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,
 
  
 
 You need to configure your client to un register when the app is closed.
 
  
 
 For that, your client must send a REGISTER with Expires: 0.
 
  
 
 Mickael
 
  
 
 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is unregistered
 state when the client app is shutdown
 
  
 
 Hi Daniel,
 
  
 
 When the client's app is closed,the sip account may be registered
 state,because the expired time may have some rest time.I want to
 implement when the client's app is closed,the account also unregister.
 
  
 
 How can I implement this function?Would you give me some advices?
 
  
 
 Thanks!
 
  
 
 Xuefeng Zhang
 
 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Daniel Grotti
Hi,
you may want to use:

http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.p.keepalive_timeout


--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:34 AM, Filip Malenka wrote:
 Thank you for information..
 What can Kamailio do about clients, that exit abnormally (e.g. crash, turn 
 off, ..) which do unregister properly? Can Kamailio send this expire=0 on 
 behalf of these clients?
 Can Kamailio determine that a client got offline based on e.g. TLS connection 
 or other heartbeats?
 On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,

  

 You need to configure your client to un register when the app is closed.

  

 For that, your client must send a REGISTER with Expires: 0.

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is unregistered
 state when the client app is shutdown

  

 Hi Daniel,

  

 When the client's app is closed,the sip account may be registered
 state,because the expired time may have some rest time.I want to
 implement when the client's app is closed,the account also unregister.

  

 How can I implement this function?Would you give me some advices?

  

 Thanks!

  

 Xuefeng Zhang



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Mickael Marrache
Didn't know about that, it's interesting.

I'm curious about the load impact of this feature, since keepalives are
generally sent every 30 sec. 

-Original Message-
From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel Grotti
Sent: Monday, April 20, 2015 11:40 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
state when the client app is shutdown

Hi,
you may want to use:

http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
p.keepalive_timeout


--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 04/20/2015 10:34 AM, Filip Malenka wrote:
 Thank you for information..
 What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
off, ..) which do unregister properly? Can Kamailio send this expire=0 on
behalf of these clients?
 Can Kamailio determine that a client got offline based on e.g. TLS
connection or other heartbeats?
 On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,

  

 You need to configure your client to un register when the app is closed.

  

 For that, your client must send a REGISTER with Expires: 0.

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is 
 unregistered state when the client app is shutdown

  

 Hi Daniel,

  

 When the client's app is closed,the sip account may be registered 
 state,because the expired time may have some rest time.I want to 
 implement when the client's app is closed,the account also unregister.

  

 How can I implement this function?Would you give me some advices?

  

 Thanks!

  

 Xuefeng Zhang



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 
 
 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Filip Malenka
Thank you for information..
What can Kamailio do about clients, that exit abnormally (e.g. crash, turn off, 
..) which do unregister properly? Can Kamailio send this expire=0 on behalf 
of these clients?
Can Kamailio determine that a client got offline based on e.g. TLS connection 
or other heartbeats?
On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
  Hi,
 
   
 
  You need to configure your client to un register when the app is closed.
 
   
 
  For that, your client must send a REGISTER with Expires: 0.
 
   
 
  Mickael
 
   
 
  *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
  Behalf Of *xuefeng zhang
  *Sent:* Monday, April 20, 2015 10:58 AM
  *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
  *Subject:* [SR-Users] Expect the kamailio's sip account is unregistered
  state when the client app is shutdown
 
   
 
  Hi Daniel,
 
   
 
  When the client's app is closed,the sip account may be registered
  state,because the expired time may have some rest time.I want to
  implement when the client's app is closed,the account also unregister.
 
   
 
  How can I implement this function?Would you give me some advices?
 
   
 
  Thanks!
 
   
 
  Xuefeng Zhang
 
 
 
  ___
  SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
  sr-users@lists.sip-router.org
  http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
 

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Expect the kamailio's sip account is unregistered state when the client app is shutdown

2015-04-20 Thread Daniel-Constantin Mierla
IIR, the keepalives are sent stateless, so no transactions are create
for them. Just OPTIONS packets sent out, resulting in less load on
kamailio (well, comparing with normal transactional forwarding). The
mechanism behind detecting offline users with keepalives is based on a
counter kept in memory for the location record, which is reset if the
reply to OPTIONS comes back. If there are three (or so) keepalives sent
out and none was replied, then the record is removed. Practically there
is no retransmission for those keepalive requests, no special states,
just this counter in memory per location record. Given this, (again
iirc), this feature doesn't work with db_mode set to database only.

Cheers,
Daniel

On 20/04/15 10:46, Mickael Marrache wrote:
 Didn't know about that, it's interesting.

 I'm curious about the load impact of this feature, since keepalives are
 generally sent every 30 sec. 

 -Original Message-
 From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
 Daniel Grotti
 Sent: Monday, April 20, 2015 11:40 AM
 To: sr-users@lists.sip-router.org
 Subject: Re: [SR-Users] Expect the kamailio's sip account is unregistered
 state when the client app is shutdown

 Hi,
 you may want to use:

 http://www.kamailio.org/docs/modules/4.2.x/modules/nathelper.html#nathelper.
 p.keepalive_timeout


 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:34 AM, Filip Malenka wrote:
 Thank you for information..
 What can Kamailio do about clients, that exit abnormally (e.g. crash, turn
 off, ..) which do unregister properly? Can Kamailio send this expire=0 on
 behalf of these clients?
 Can Kamailio determine that a client got offline based on e.g. TLS
 connection or other heartbeats?
 On 20.04.2015 10:16, Daniel Grotti wrote:
 Hi,
 here you are:

 https://tools.ietf.org/html/rfc3665#section-2.4



 --
 Daniel Grotti
 VoIP Engineer


 Sipwise GmbH
 Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

 On 04/20/2015 10:10 AM, Mickael Marrache wrote:
 Hi,

  

 You need to configure your client to un register when the app is closed.

  

 For that, your client must send a REGISTER with Expires: 0.

  

 Mickael

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On 
 Behalf Of *xuefeng zhang
 *Sent:* Monday, April 20, 2015 10:58 AM
 *To:* Daniel-Constantin Mierla; Kamailio (SER) - Users Mailing List
 *Subject:* [SR-Users] Expect the kamailio's sip account is 
 unregistered state when the client app is shutdown

  

 Hi Daniel,

  

 When the client's app is closed,the sip account may be registered 
 state,because the expired time may have some rest time.I want to 
 implement when the client's app is closed,the account also unregister.

  

 How can I implement this function?Would you give me some advices?

  

 Thanks!

  

 Xuefeng Zhang



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
 list sr-users@lists.sip-router.org 
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users