Hello,

thanks for testing and reporting the resultes -- I will backport the
commit to branch 5.5.

Cheers,
Daniel

On 09.09.21 10:41, Pepelux wrote:
> Hi Daniel
>
> It works fine with handle_lost_tcp=1
>
> Now the Tcpconn-Id value is -1 and the AOR is kept at location
>  
>
>                                                Contact: {
>                                                         Address:
> sip:[email protected] <mailto:sip%[email protected]>
>                                                         Expires: 3580
>                                                         Q: 0.000000
>                                                         Call-ID:
> [email protected]
>                                                         CSeq: 1
>                                                         User-Agent:
> kamailio SIP Router - RPC Server
>                                                         Received: [not
> set]
>                                                         Path: [not set]
>                                                         State: CS_NEW
>                                                         Flags: 0
>                                                         CFlags: 0
>                                                         Socket: [not set]
>                                                         Methods: 0
>                                                         Ruid:
> ulcx-6139c433-74fc-1
>                                                         Instance: [not
> set]
>                                                         Reg-Id: 0
>                                                         Server-Id: 0
>                                                        *Tcpconn-Id: -1*
>                                                         Keepalive: 0
>                                                        
> Last-Keepalive: 1631175743
>                                                         KA-Roundtrip: 0
>                                                         Last-Modified: 0
>                                                 }
>                                         }
>
> # kamailio -v
> version: kamailio 5.6.0-dev1 (x86_64/linux) a0a971
> flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
> F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
> ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE
> 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: a0a971
> compiled on 10:14:46 Sep  9 2021 with gcc 6.3.0
>
>
> Regards
>
> On Thu, 9 Sept 2021 at 09:24, Daniel-Constantin Mierla
> <[email protected] <mailto:[email protected]>> wrote:
>
>     Hello,
>
>     I pushed a commit to make it work with handle_lost_tcp set:
>
>       *
>     
> https://github.com/kamailio/kamailio/commit/a0a97119bef7671f33734399dc9de4562abae39c
>     
> <https://github.com/kamailio/kamailio/commit/a0a97119bef7671f33734399dc9de4562abae39c>
>
>     Can you give it a try? If works, then it will be backported.
>
>     Cheers,
>     Daniel
>
>     On 09.09.21 08:51, Pepelux wrote:
>>     Hi
>>
>>     Yes, I had it. With value 0 works fine
>>
>>     Thanks Daniel for your help
>>
>>     On Thu, 9 Sept 2021 at 08:10, Daniel-Constantin Mierla
>>     <[email protected] <mailto:[email protected]>> wrote:
>>
>>         Hello,
>>
>>         do you have this modparam set>
>>
>>           *
>>         
>> https://www.kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_lost_tcp
>>         
>> <https://www.kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.p.handle_lost_tcp>
>>
>>         Cheers,
>>         Daniel
>>
>>         On 08.09.21 18:56, Pepelux wrote:
>>>         Hi all
>>>
>>>         I have problems adding a new location by RPC command.
>>>
>>>         *# kamailio -v*
>>>         version: kamailio 5.5.0 (x86_64/linux)
>>>         flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
>>>         DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
>>>         Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
>>>         FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
>>>         USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES,
>>>         TLS_PTHREAD_MUTEX_SHARED
>>>         ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,
>>>         MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>>         poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>>         id: unknown
>>>         compiled with gcc 8.3.0
>>>
>>>
>>>         A simple example, adding an AOR which expires in 1 hour:
>>>          
>>>         *# date ; kamcmd ul.add kam_location
>>>         [email protected] <mailto:[email protected]>
>>>         sip:[email protected]
>>>         <mailto:sip%[email protected]> 3600 0.0 . 0 0 0 .*
>>>         Wed 08 Sep 2021 01:58:00 PM CEST
>>>
>>>
>>>         Location record has been inserted correctly:
>>>
>>>         *# date ; kamcmd ul.dump | grep test -A24*
>>>         Wed 08 Sep 2021 01:58:02 PM CEST
>>>                                                 AoR:
>>>         [email protected] <mailto:[email protected]>
>>>                                                 HashID: -597689288
>>>                                                 Contacts: {
>>>                                                         Contact: {
>>>                                                                
>>>         Address: sip:[email protected]
>>>         <mailto:sip%[email protected]>
>>>                                                                
>>>         Expires: 3598
>>>                                                                 Q:
>>>         0.000000
>>>                                                                
>>>         Call-ID: [email protected]
>>>         <mailto:[email protected]>
>>>                                                                 CSeq: 1
>>>                                                                
>>>         User-Agent: kamailio SIP Router - RPC Server
>>>                                                                
>>>         Received: [not set]
>>>                                                                
>>>         Path: [not set]
>>>                                                                
>>>         State: CS_SYNC
>>>                                                                 Flags: 0
>>>                                                                
>>>         CFlags: 0
>>>                                                                
>>>         Socket: [not set]
>>>                                                                
>>>         Methods: 0
>>>                                                                
>>>         Ruid: ulcx-61389f47-2e44-01
>>>                                                                
>>>         Instance: [not set]
>>>                                                                
>>>         Reg-Id: 0
>>>                                                                
>>>         Server-Id: 0
>>>                                                                
>>>         Tcpconn-Id: 0
>>>                                                                
>>>         Keepalive: 0
>>>                                                                
>>>         Last-Keepalive: 1631102280
>>>                                                                
>>>         KA-Roundtrip: 0
>>>                                                                
>>>         Last-Modified: 0
>>>                                                         }
>>>                                                 }
>>>                                         }
>>>
>>>
>>>         But a few seconds later, the location record has gone:
>>>
>>>         *# date ; kamcmd ul.dump | grep test -A24*
>>>         Wed 08 Sep 2021 01:58:26 PM CEST
>>>
>>>
>>>         In kamailio logs I can see that:
>>>
>>>         *Sep  8 13:58:00 sipserver /usr/sbin/kamailio[11844]: DEBUG:
>>>         usrloc [ul_rpc.c:637]: ul_rpc_add(): path == 0 -> unset
>>>         Sep  8 13:58:00 sipserver /usr/sbin/kamailio[11844]: DEBUG:
>>>         usrloc [ul_rpc.c:652]: ul_rpc_add(): ret: 10
>>>         table:kam_location aor:[email protected]
>>>         <mailto:aor%[email protected]>
>>>         contact:sip:[email protected]
>>>         <mailto:contact%3Asip%[email protected]>
>>>         expires:3600 dtemp:0.000000 path: flags:0 bflags:0 methods:0
>>>         Sep  8 13:58:00 sipserver /usr/sbin/kamailio[11844]: DEBUG:
>>>         usrloc [ul_rpc.c:660]: ul_rpc_add(): q:0
>>>         Sep  8 13:58:00 sipserver /usr/sbin/kamailio[11844]: DEBUG:
>>>         usrloc [ucontact.c:1857]: uldb_insert_attrs(): trying to
>>>         insert location attributes
>>>         Sep  8 13:58:00 sipserver /usr/sbin/kamailio[11844]: DEBUG:
>>>         usrloc [ucontact.c:1868]: uldb_insert_attrs(): no location
>>>         attributes
>>>         * Sep  8 13:58:03 sipserver /usr/sbin/kamailio[11827]:
>>>         DEBUG: {1 81337 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:03 sipserver /usr/sbin/kamailio[11827]: DEBUG:
>>>         {1 81337 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:03 sipserver /usr/sbin/kamailio[11827]: DEBUG:
>>>         {1 81337 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:04 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 141 REGISTER
>>>         [email protected]
>>>         <mailto:[email protected]>
>>>         REGISTER} usrloc [ucontact.c:1801]:
>>>         uldb_delete_attrs_ruid(): trying to delete location attributes
>>>         Sep  8 13:58:04 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 141 REGISTER
>>>         [email protected]
>>>         <mailto:[email protected]>
>>>         REGISTER} usrloc [ucontact.c:72]: ucontact_xavp_store():
>>>         trying to clone per contact xavps
>>>         Sep  8 13:58:04 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 141 REGISTER
>>>         [email protected]
>>>         <mailto:[email protected]>
>>>         REGISTER} usrloc [ucontact.c:1857]: uldb_insert_attrs():
>>>         trying to insert location attributes
>>>         Sep  8 13:58:06 sipserver /usr/sbin/kamailio[11852]: DEBUG:
>>>         {1 114 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:06 sipserver /usr/sbin/kamailio[11852]: DEBUG:
>>>         {1 114 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:06 sipserver /usr/sbin/kamailio[11852]: DEBUG:
>>>         {1 114 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 12484 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 12484 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 12484 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         *Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11835]: DEBUG:
>>>         usrloc [urecord.c:377]: wb_timer(): tcp connection has been
>>>         lost, expiring contact sip:[email protected]
>>>         <mailto:sip%[email protected]>
>>>         Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11835]: DEBUG:
>>>         usrloc [urecord.c:387]: wb_timer(): Binding
>>>         '[email protected]
>>>         <mailto:[email protected]>','sip:[email protected]
>>>         <mailto:sip%[email protected]>' has expired
>>>         Sep  8 13:58:23 sipserver /usr/sbin/kamailio[11835]: DEBUG:
>>>         usrloc [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying
>>>         to delete location attributes
>>>         * Sep  8 13:58:25 sipserver /usr/sbin/kamailio[11830]:
>>>         DEBUG: {1 185389 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:25 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 185389 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:25 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 185389 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:33 sipserver /usr/sbin/kamailio[11853]: DEBUG:
>>>         {1 3360 REGISTER pgmirc5oirbekeaj3tmrf7 REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:33 sipserver /usr/sbin/kamailio[11853]: DEBUG:
>>>         {1 3360 REGISTER pgmirc5oirbekeaj3tmrf7 REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:33 sipserver /usr/sbin/kamailio[11853]: DEBUG:
>>>         {1 3360 REGISTER pgmirc5oirbekeaj3tmrf7 REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 5645 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 5645 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 5645 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 5683 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 5683 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:44 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 5683 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:50 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 144820 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:50 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 144820 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:50 sipserver /usr/sbin/kamailio[11829]: DEBUG:
>>>         {1 144820 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:58:59 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 84973 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:58:59 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 84973 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:58:59 sipserver /usr/sbin/kamailio[11828]: DEBUG:
>>>         {1 84973 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:59:01 sipserver /usr/sbin/kamailio[11854]: DEBUG:
>>>         {1 116 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:59:01 sipserver /usr/sbin/kamailio[11854]: DEBUG:
>>>         {1 116 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:59:01 sipserver /usr/sbin/kamailio[11854]: DEBUG:
>>>         {1 116 REGISTER 5ne5ebv674tptk0p1uj4gg REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>         Sep  8 13:59:04 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 81338 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1801]: uldb_delete_attrs_ruid(): trying to
>>>         delete location attributes
>>>         Sep  8 13:59:04 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 81338 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:72]: ucontact_xavp_store(): trying to clone per
>>>         contact xavps
>>>         Sep  8 13:59:04 sipserver /usr/sbin/kamailio[11830]: DEBUG:
>>>         {1 81338 REGISTER [email protected]
>>>         <mailto:[email protected]> REGISTER} usrloc
>>>         [ucontact.c:1857]: uldb_insert_attrs(): trying to insert
>>>         location attributes
>>>
>>>
>>>         What am I doing wrong? It is supposed that the connection is
>>>         by UDP. I also tried to insert the socket value as UDP, but
>>>         it had the same problem.
>>>
>>>         Thanks!
>>>
>>>
>>>
>>>         __________________________________________________________
>>>         Kamailio - Users Mailing List - Non Commercial Discussions
>>>           * [email protected] <mailto:[email protected]>
>>>         Important: keep the mailing list in the recipients, do not reply 
>>> only to the sender!
>>>         Edit mailing list options or unsubscribe:
>>>           * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>>
>>         -- 
>>         Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>>         www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
>> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>>
>     -- 
>     Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>     www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to