Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Camille Oudot
Le Wed, 22 Oct 2014 19:21:54 +0200, Daniel-Constantin Mierla a écrit : > Maybe you can do save() when there is a register with credentials and > unregister if there is a failure for relaying that registration (e.g., > it was failure to authenticate in the next server). Ok, this is so simple and

Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Daniel-Constantin Mierla
On 22/10/14 18:19, Camille Oudot wrote: > Le Wed, 22 Oct 2014 16:12:12 +0200, > Daniel-Constantin Mierla a écrit : > >> it should work -- quickly looked to the code and couldn't spot a >> problem. Just be aware that is working only when usrloc keeps the >> records in memory (not designed for db o

Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Camille Oudot
Le Wed, 22 Oct 2014 09:02:01 -0500, Carlos Ruiz Díaz a écrit : > You wouldn't be able to use the unregister function of the registrar > module, because a faked SIP message is used to trigger the event, but > you can always write a custom SQL to delete the record of the > location table using the

Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Camille Oudot
Le Wed, 22 Oct 2014 16:12:12 +0200, Daniel-Constantin Mierla a écrit : > it should work -- quickly looked to the code and couldn't spot a > problem. Just be aware that is working only when usrloc keeps the > records in memory (not designed for db only mode). Ok, i'm using in memory storage, so i

Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Daniel-Constantin Mierla
Hello, On 22/10/14 15:08, Camille Oudot wrote: > Hi, > > I'm looking for a mechanism to unregister clients when the corresponding > TCP connection is closed, but had no success so far. > > I've tried the handle_lost_tcp parameter of usrloc, but it didn't work: > the user was not unregistered, wher

Re: [SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Carlos Ruiz Díaz
Well, in websocket module you have the event route that's triggered when a connection is lost [1]. You wouldn't be able to use the unregister function of the registrar module, because a faked SIP message is used to trigger the event, but you can always write a custom SQL to delete the record of th

[SR-Users] usrloc: Unregister client on TCP connection close

2014-10-22 Thread Camille Oudot
Hi, I'm looking for a mechanism to unregister clients when the corresponding TCP connection is closed, but had no success so far. I've tried the handle_lost_tcp parameter of usrloc, but it didn't work: the user was not unregistered, whereas the connection was seen as closed by kamailio. Is it sti