Re: [sr-dev] [kamailio/kamailio] KeepAlive Module (#1476)
@miconda the issue is fixed on trunk. Can I backport the fix in 5.1 branch ? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1476#issuecomment-380770783___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:b8a75c1c: keepalive: cleanup rpc output (#1476)
Module: kamailio Branch: master Commit: b8a75c1c4fda079515606eb59273945842aff1be URL: https://github.com/kamailio/kamailio/commit/b8a75c1c4fda079515606eb59273945842aff1be Author: Guillaume Bour <guillaume.b...@diabolocom.com> Committer: Guillaume Bour <guillaume.b...@diabolocom.com> Date: 2018-03-27T21:56:49+02:00 keepalive: cleanup rpc output (#1476) --- Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/b8a75c1c4fda079515606eb59273945842aff1be.diff Patch: https://github.com/kamailio/kamailio/commit/b8a75c1c4fda079515606eb59273945842aff1be.patch --- diff --git a/src/modules/keepalive/keepalive_rpc.c b/src/modules/keepalive/keepalive_rpc.c index 3444cf05c8..8efe0fb117 100644 --- a/src/modules/keepalive/keepalive_rpc.c +++ b/src/modules/keepalive/keepalive_rpc.c @@ -63,26 +63,11 @@ static const char *keepalive_rpc_list_doc[2] = { static void keepalive_rpc_list(rpc_t *rpc, void *ctx) { - void *foo, *bar, *baz; void *sub; ka_dest_t *dest; char *_ctime; char *_utime; char *_dtime; - str text = str_init("foobar"); - - if(rpc->add(ctx, "Sd", , 42) < 0) - LM_ERR("failed creating RPC struct\n"); - if(rpc->add(ctx, "Sd", , 42) < 0) - LM_ERR("failed creating RPC struct\n"); - - rpc->add(ctx, "{", ); - rpc->struct_add(foo, "Sd", "text", , "number", 42); - - rpc->add(ctx, "{", ); - rpc->struct_add(bar, "[", "list", ); - rpc->struct_add(baz, "d", "nn", 17); - rpc->struct_add(baz, "d", "nn", 22); for(dest = ka_destinations_list->first; dest != NULL; dest = dest->next) { rpc->add(ctx, "{", ); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] KeepAlive Module (#1476)
@miconda is it ok to backport the commit in 5.1 branch ? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1476#issuecomment-376664116___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] KeepAlive Module (#1476)
Hello @voztovoice This is some test code I forgot to remove. I will clean it up this weekend. Which kamailio version are you using ? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1476#issuecomment-371785036___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: contacts not deleted while 0x04 flag set in save() function (#1445)
Closed #1445. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1445#event-1482875683___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: contacts not deleted while 0x04 flag set in save() function (#1445)
Hello @charlesrchance. I confirm with kamailio 5.1, contact deletion is replicated also. Could be useful to add a short notice on 4.4 documentation :) Thanks for your help, and your very valuable module -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1445#issuecomment-367043472___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: contacts not deleted while 0x04 flag set in save() function (#1445)
thanks @charlesrchance. I'll check and let you know -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1445#issuecomment-366298209___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: contacts not deleted while 0x04 flag set in save() function (#1445)
I finally found the delete event on server2 (generated by usrloc): > DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f87b6dd0de8, > callback type 4/15, id 0 entered > DEBUG: dmq_usrloc [usrloc_sync.c:578]: dmq_ul_cb_contact(): Callback from > usrloc with type=4 > DEBUG: dmq_usrloc [usrloc_sync.c:600]: dmq_ul_cb_contact(): Contact received > from DMQ... skip I guess the problem comes from usrloc_sync.c, line 582: > if (!(ptr->flags & FL_RPL)) [ My understanding is usrloc delete event is not propagated through DMQ if the contact was not not previously registered from the exact same server. Why is it like that ? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1445#issuecomment-366271566___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] dmq_usrloc: contacts not deleted while 0x04 flag set in save() function (#1445)
### Description Hello, related to #265 , I can reproduce the issue, with kamailio 4.4.6+jessie from kamailio debian repository - 0x04 flag is set on save() - old contacts are deleted on the server receiving the REGISTER message - old contacts are not deleted on servers being notified via DMQ ### Troubleshooting Reproduction - Setup 2 servers with dmq & dmq_usrloc replication between each other, and with registration on 1st - Use 0x04 flag on save() function - Register your softphones a 1st time on 1 server: registration is replicated on 2d server, contact is on both servers - Reregister (with different contact) on same server: - previous contact is deleted on 1st server - new contact is replicated to 2d server - previous contact is *NOT* delete on 2d server Log Messages server1 (REGISTER message): DEBUG: usrloc [ucontact.c:1692]: update_ucontact(): exists callback for type= UL_CONTACT_UPDATE DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f0096e0b548, callback type 2/15, id 0 entered DEBUG: dmq_usrloc [usrloc_sync.c:578]: dmq_ul_cb_contact(): Callback from usrloc with type=2 DEBUG: dmq_usrloc [usrloc_sync.c:548]: usrloc_dmq_send_contact(): sending serialized data {"action":1,"aor":"+33564093848","ruid":"uloc-5a86b8c5-31e0-2","c":"sip:+33564093848@xxx:41502;ob","received":"","path":"","callid":"ntoWjs3R3WpP9Z5rsi7Npmr2rRGKstls","user_agent":"CSipSimple_porridge-23/r2457","instance":"","expires":1518779539,"cseq":55952,"flags":0,"cflags":0,"q":-1,"last_modified":1518778639,"methods":8159,"reg_id":0} DEBUG: dmq_usrloc [usrloc_sync.c:299]: usrloc_dmq_send(): sending dmq broadcast... server2 (DMQ recipient): DEBUG: dmq_usrloc [usrloc_sync.c:327]: usrloc_dmq_handle_msg(): dmq message received from sip:usrloc@172.16.67.15:5060 DEBUG: dmq_usrloc [usrloc_sync.c:429]: usrloc_dmq_handle_msg(): Received DMQ_UPDATE. Update contact info... DEBUG: dmq_usrloc [usrloc_sync.c:64]: add_contact(): aor: +33564093848 DEBUG: dmq_usrloc [usrloc_sync.c:65]: add_contact(): ci->ruid: uloc-5a86b8c5-31e0-2 DEBUG: dmq_usrloc [usrloc_sync.c:66]: add_contact(): aorhash: -1799456359 DEBUG: dmq_usrloc [usrloc_sync.c:72]: add_contact(): Found contact DEBUG: usrloc [ucontact.c:1692]: update_ucontact(): exists callback for type= UL_CONTACT_UPDATE DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f3900243bd0, callback type 2/15, id 0 entered DEBUG: dmq_usrloc [usrloc_sync.c:578]: dmq_ul_cb_contact(): Callback from usrloc with type=2 DEBUG: dmq_usrloc [usrloc_sync.c:600]: dmq_ul_cb_contact(): Contact received from DMQ... skip DEBUG: usrloc [ucontact.c:1004]: db_update_ucontact_ruid(): ruid:uloc-5a86b8c5-31e0-2 DEBUG: usrloc [ucontact.c:1133]: db_update_ucontact_ruid(): contact:sip:+33564093848@xxx:41502;ob DEBUG: dmq_usrloc [usrloc_sync.c:74]: add_contact(): Release record DEBUG: dmq_usrloc [usrloc_sync.c:76]: add_contact(): Unlock udomain the recipient receive an UPDATE message only. according to usrloc_sync.c:usrloc_dmq_handle_msg(), UPDATE message add the new contact only (execute add_contact()), but the other one is not deleted and there is no DMQ_RM message generated from the emitter ### Possible Solutions ### Additional Information ``` version: kamailio 4.4.6 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 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 4.9.2 ``` * **Operating System**: ``` 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1445___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc replication and max_contacts (Kamailio v4.3.1) (#265)
Hello, I can reproduce the issue, with kamailio 4.4.6+jessie from kamailio debian repository: * 0x04 flag is set on save() * old contacts are deleted on the server receiving the REGISTER message * old contacts are not deleted on servers being notified via DMQ server1 (REGISTER message): > DEBUG: usrloc [ucontact.c:1692]: update_ucontact(): exists callback for type= > UL_CONTACT_UPDATE > DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f0096e0b548, > callback type 2/15, id 0 entered > DEBUG: dmq_usrloc [usrloc_sync.c:578]: dmq_ul_cb_contact(): Callback from > usrloc with type=2 > DEBUG: dmq_usrloc [usrloc_sync.c:548]: usrloc_dmq_send_contact(): sending > serialized data > {"action":1,"aor":"+33564093848","ruid":"uloc-5a86b8c5-31e0-2","c":"sip:+33564093848@xxx:41502;ob","received":"","path":"","callid":"ntoWjs3R3WpP9Z5rsi7Npmr2rRGKstls","user_agent":"CSipSimple_porridge-23/r2457","instance":"","expires":1518779539,"cseq":55952,"flags":0,"cflags":0,"q":-1,"last_modified":1518778639,"methods":8159,"reg_id":0} > DEBUG: dmq_usrloc [usrloc_sync.c:299]: usrloc_dmq_send(): sending dmq > broadcast... server2 (DMQ recipient): > DEBUG: dmq_usrloc [usrloc_sync.c:327]: usrloc_dmq_handle_msg(): dmq message > received from sip:usrloc@172.16.67.15:5060 > DEBUG: dmq_usrloc [usrloc_sync.c:429]: usrloc_dmq_handle_msg(): Received > DMQ_UPDATE. Update contact info... > DEBUG: dmq_usrloc [usrloc_sync.c:64]: add_contact(): aor: +33564093848 > DEBUG: dmq_usrloc [usrloc_sync.c:65]: add_contact(): ci->ruid: > uloc-5a86b8c5-31e0-2 > DEBUG: dmq_usrloc [usrloc_sync.c:66]: add_contact(): aorhash: -1799456359 > DEBUG: dmq_usrloc [usrloc_sync.c:72]: add_contact(): Found contact > DEBUG: usrloc [ucontact.c:1692]: update_ucontact(): exists callback for type= > UL_CONTACT_UPDATE > DEBUG: usrloc [ul_callback.h:84]: run_ul_callbacks(): contact=0x7f3900243bd0, > callback type 2/15, id 0 entered > DEBUG: dmq_usrloc [usrloc_sync.c:578]: dmq_ul_cb_contact(): Callback from > usrloc with type=2 > DEBUG: dmq_usrloc [usrloc_sync.c:600]: dmq_ul_cb_contact(): Contact received > from DMQ... skip > DEBUG: usrloc [ucontact.c:1004]: db_update_ucontact_ruid(): > ruid:uloc-5a86b8c5-31e0-2 > DEBUG: usrloc [ucontact.c:1133]: db_update_ucontact_ruid(): > contact:sip:+33564093848@xxx:41502;ob > DEBUG: dmq_usrloc [usrloc_sync.c:74]: add_contact(): Release record > DEBUG: dmq_usrloc [usrloc_sync.c:76]: add_contact(): Unlock udomain the recipient receive an UPDATE message only. according to usrloc_sync.c:usrloc_dmq_handle_msg(), UPDATE message add the new contact only (execute add_contact()), but the other one is not deleted and there is no DMQ_RM message generated from the emitter -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/265#issuecomment-366211445___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc replication and max_contacts (Kamailio v4.3.1) (#265)
Reopened #265. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/265#event-1477698412___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:9875e64a: drouting: pull out unavailable destinations for sort_order 1 and 2
Module: kamailio Branch: master Commit: 9875e64a95da6186ab616f1c560fc245916ac517 URL: https://github.com/kamailio/kamailio/commit/9875e64a95da6186ab616f1c560fc245916ac517 Author: Guillaume Bour <guilla...@bour.cc> Committer: Guillaume Bour <guilla...@bour.cc> Date: 2017-08-10T21:35:54+02:00 drouting: pull out unavailable destinations for sort_order 1 and 2 - destinations are monitored with keepalive module (when 'enable_keepalive' option is set) - it was already supported for sort_order 0 in a previous commit --- Modified: src/modules/drouting/doc/drouting_admin.xml Modified: src/modules/drouting/drouting.c --- Diff: https://github.com/kamailio/kamailio/commit/9875e64a95da6186ab616f1c560fc245916ac517.diff Patch: https://github.com/kamailio/kamailio/commit/9875e64a95da6186ab616f1c560fc245916ac517.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] drouting: pull out unavailable destinations for sort_order 1 and 2 (#1212)
Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description When destinations monitoring is enabled with option 'enable_keepalive' set to 1, unavailable destinations will be ignored when calling do_routing() function It was already implemented for sort_order 0 in a previous commit. This one adds the support for sor_order 1 & 2 also You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1212 -- Commit Summary -- * drouting: pull out unavailable destinations for sort_order 1 and 2 -- File Changes -- M src/modules/drouting/doc/drouting_admin.xml (9) M src/modules/drouting/drouting.c (62) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1212.patch https://github.com/kamailio/kamailio/pull/1212.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1212 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:2d4d66ac: keepalive: improve documentation
Module: kamailio Branch: master Commit: 2d4d66acd5a99ae7b931b7f7e4e7d500d6b9ae96 URL: https://github.com/kamailio/kamailio/commit/2d4d66acd5a99ae7b931b7f7e4e7d500d6b9ae96 Author: Guillaume Bour <guilla...@bour.cc> Committer: Guillaume Bour <guilla...@bour.cc> Date: 2017-07-31T21:59:50+02:00 keepalive: improve documentation - documents internal API - GH #1082 --- Added: src/modules/keepalive/doc/keepalive_devel.xml Modified: src/modules/keepalive/doc/keepalive.xml Modified: src/modules/keepalive/doc/keepalive_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/2d4d66acd5a99ae7b931b7f7e4e7d500d6b9ae96.diff Patch: https://github.com/kamailio/kamailio/commit/2d4d66acd5a99ae7b931b7f7e4e7d500d6b9ae96.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] keepalive: improve documentation (#1196)
Merged #1196. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1196#event-1186467629___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] keepalive: improve documentation (#1196)
- provides documentation for internal API - GH #1082 You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1196 -- Commit Summary -- * keepalive: improve documentation -- File Changes -- M src/modules/keepalive/doc/keepalive.xml (1) M src/modules/keepalive/doc/keepalive_admin.xml (21) A src/modules/keepalive/doc/keepalive_devel.xml (146) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1196.patch https://github.com/kamailio/kamailio/pull/1196.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1196 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Extend keepalive module documentation (#1082)
Hi @agranig, @kamailio-sync @ First, the module is still young, so the documentation may be incomplete. I will improve it asap Second, my primary idea when started this module was to implement the same "destinations probing" mechanism found in dispatcher module, both in drouting & carrierroute modules. So instead of directly patching those modules (and duplicating the same code), I regroup all probing features in *keepalive* module that also expose a set of APIs (to be documented) to register a destination and be notified of destination status change. Following @miconda suggestions, it can also be used standalone _What does that mean?_ So currently you can use it in 2 ways: - standalone: destinations to monitor are statically defined as module parameter then you can use is_alive() function or event route to react to destination state change - as "probing engine" for drouting module: by setting _enable_keepalive_ drouting parameter, drouting destinations will be monitored by keepalive, and a call to do_routing() will ignore inactive destinations in the resultset. I will add examples to the documentation to make things clear, but you can already see a kamailio.cfg example for both case in this ml post: https://lists.kamailio.org/pipermail/sr-users/2017-March/096521.html _What are the use cases and which problems does it solve?_ - monitor remote trunks (allowing to take actions or trigger an alert when a destination is down) - ignore down destinations when routing a call _Which mechanisms does it use (SIP, ICMP, others?)_ It is working the same way as dispatcher does, by regularly sending SIP OPTIONS to destinations Hope I answered all your questions -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1082#issuecomment-296810631___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev