Re: [sr-dev] [kamailio/kamailio] warning cleanup (#2298)

2020-05-02 Thread Daniel-Constantin Mierla
Closed #2298.

-- 
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/2298#event-3296764892___
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] warning cleanup (#2298)

2020-05-02 Thread Daniel-Constantin Mierla
Closing, commits were also backported to 5.3.

-- 
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/2298#issuecomment-623005705___
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] set_contact_alias() issue with clients adding it to their Contact (#2308)

2020-05-02 Thread Daniel-Constantin Mierla
set_contact_alias() should not be used for registrations, but for requests that 
are typically forwarded. If you do it on an edge proxy between device and 
registrar server, then you should use path module and leave the contact 
unchanged.

If you use it in the registrar server config, then you should replace it with 
fix_nated_register(), like in the default kamailio.cfg.

Otherwise, if you really want to use it, then in case you have to deal with 
such UA, then yes, you will have to remove (or replace) the alias parameter in 
Contact. Probably you can play with the replace/subst functions from textops 
and if you can't get it, then new C code has to be added. A pull request is of 
course appreciated.

-- 
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/2308#issuecomment-623005573___
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] presence module with in-memory presentity records (#2294)

2020-05-02 Thread Daniel-Constantin Mierla
Closed #2294.

-- 
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/2294#event-3296751120___
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] presence module with in-memory presentity records (#2294)

2020-05-02 Thread Daniel-Constantin Mierla
Closing based on a few days running without issues. From now on newly 
discovered bugs can get a dedicated issue on this tracker.

-- 
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/2294#issuecomment-623003536___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] json request fails

2020-05-02 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> I pushed a fix for it (not tested) -- it was the new siptrace mode
> trying to save to database using core callbacks and not checking it is
> sip traffic or not. The errors were for the http traffic.

Thanks, the error messages are now gone.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] json request fails

2020-05-02 Thread Juha Heinanen
This is the config command that my SIP proxy executes on the incoming
JSON over HTTP request:

jsonrpc_dispatch();

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] json request fails

2020-05-02 Thread Juha Heinanen
Juha Heinanen writes:

> I noticed that json rpc commands have started to fail, for example,

Actually, the commands still work even when error messages are produced.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] json request fails

2020-05-02 Thread Juha Heinanen
I noticed that json rpc commands have started to fail, for example,

May  2 15:41:15 char /usr/bin/sip-proxy[10440]: INFO: Executing JSON request 
<{"jsonrpc":"2.0","method":"siptrace.status","params":["on"],"id":1}> from 
<127.0.0.1> with host <127.0.0.1:6060>
May  2 15:41:15 char /usr/bin/sip-proxy[10440]: ERROR:  
[core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM 
header
May  2 15:41:15 char /usr/bin/sip-proxy[10440]: ERROR: siptrace 
[siptrace_send.c:55]: sip_trace_prepare(): cannot parse FROM header

Has something changed that I have missed?  I didn't find anything
related on the wiki upgrade page.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] undefined symbol: ul_cseq_delay

2020-05-02 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> It was introduced by my previous commit. I pushed the fix for it.

OK, thanks, running now.

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] undefined symbol: ul_cseq_delay

2020-05-02 Thread Juha Heinanen
I build my sip proxy from today's master and it didn't start:

May  2 15:12:51 char sip-proxy[22422]:  0(22474) ERROR:  
[core/sr_module.c:512]: load_module(): could not open module 
: 
/usr/lib/x86_64-linux-gnu/sip-proxy/modules/usrloc.so: undefined symbol: 
ul_cseq_delay

-- Juha

___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Merged #2304 into master.

-- 
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/2304#event-3296066480___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Thanks Daniel, documentation added to the wiki.

-- 
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/2304#issuecomment-622961098___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f6c68817: Merge pull request #2304 from kamailio/grumvalski/usrloc_stats

2020-05-02 Thread GitHub
Module: kamailio
Branch: master
Commit: f6c688178902138dff8115cdabd72e8631a635dc
URL: 
https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc

Author: Federico Cabiddu 
Committer: GitHub 
Date: 2020-05-02T16:22:06+02:00

Merge pull request #2304 from kamailio/grumvalski/usrloc_stats

usrloc: change "-" for "_" in stats name to be prometheus compliant

---

Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/counters.c
Modified: src/core/counters.h
Modified: src/core/globals.h
Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c
Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f6c688178902138dff8115cdabd72e8631a635dc.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:3203a657: core: new core parameter stats_name_separator

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 3203a6572b874d191c3be61519853005bd5ab056
URL: 
https://github.com/kamailio/kamailio/commit/3203a6572b874d191c3be61519853005bd5ab056

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-05-01T13:02:39+02:00

core: new core parameter stats_name_separator

---

Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/cfg_core.c
Modified: src/core/cfg_core.h
Modified: src/core/config.h
Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c
Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/3203a6572b874d191c3be61519853005bd5ab056.diff
Patch: 
https://github.com/kamailio/kamailio/commit/3203a6572b874d191c3be61519853005bd5ab056.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:9948696f: core: remove stats_name_separator from cfg_group_core

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 9948696fd84605919e6ce6a7106099f1cdd0de98
URL: 
https://github.com/kamailio/kamailio/commit/9948696fd84605919e6ce6a7106099f1cdd0de98

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-05-02T10:14:23+02:00

core: remove stats_name_separator from cfg_group_core

---

Modified: src/core/cfg.y
Modified: src/core/cfg_core.c
Modified: src/core/cfg_core.h
Modified: src/core/config.h
Modified: src/core/counters.c
Modified: src/core/counters.h
Modified: src/core/globals.h
Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c
Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/9948696fd84605919e6ce6a7106099f1cdd0de98.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9948696fd84605919e6ce6a7106099f1cdd0de98.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:0595795c: ims_usrloc_pcscf, p_usrloc, usrloc: use KSR_STATS_NAMESEP for stats names

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 0595795c659f6af586e63837efe56b45808cd735
URL: 
https://github.com/kamailio/kamailio/commit/0595795c659f6af586e63837efe56b45808cd735

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-04-28T16:24:24+02:00

ims_usrloc_pcscf, p_usrloc, usrloc: use KSR_STATS_NAMESEP for stats names

---

Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c
Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/0595795c659f6af586e63837efe56b45808cd735.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0595795c659f6af586e63837efe56b45808cd735.patch

---

diff --git a/src/modules/ims_usrloc_pcscf/udomain.c 
b/src/modules/ims_usrloc_pcscf/udomain.c
index 7f63932e6b..bd5fabdb60 100644
--- a/src/modules/ims_usrloc_pcscf/udomain.c
+++ b/src/modules/ims_usrloc_pcscf/udomain.c
@@ -82,7 +82,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '_';
+   *(p++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
diff --git a/src/modules/p_usrloc/udomain.c b/src/modules/p_usrloc/udomain.c
index 88612e957b..91db944a0c 100644
--- a/src/modules/p_usrloc/udomain.c
+++ b/src/modules/p_usrloc/udomain.c
@@ -55,7 +55,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '_';
+   *(p++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
diff --git a/src/modules/usrloc/udomain.c b/src/modules/usrloc/udomain.c
index 321b72b64a..9f5e78cfd6 100644
--- a/src/modules/usrloc/udomain.c
+++ b/src/modules/usrloc/udomain.c
@@ -61,7 +61,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '_';
+   *(p++) = KSR_STATS_NAMESEP;
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:ddd27713: usrloc: change "-" for "_" in stats name to be prometheus compliant

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: ddd277139165f39406832ddd557c2b56b75a7100
URL: 
https://github.com/kamailio/kamailio/commit/ddd277139165f39406832ddd557c2b56b75a7100

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-04-28T10:24:04+02:00

usrloc: change "-" for "_" in stats name to be prometheus compliant

---

Modified: src/modules/usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/ddd277139165f39406832ddd557c2b56b75a7100.diff
Patch: 
https://github.com/kamailio/kamailio/commit/ddd277139165f39406832ddd557c2b56b75a7100.patch

---

diff --git a/src/modules/usrloc/udomain.c b/src/modules/usrloc/udomain.c
index 59ddff92d4..321b72b64a 100644
--- a/src/modules/usrloc/udomain.c
+++ b/src/modules/usrloc/udomain.c
@@ -61,7 +61,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '-';
+   *(p++) = '_';
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:4357b5e6: core: define KSR_STATS_NAMESEP for stats name separator

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 4357b5e6be2a71a401e9d53c43e787b9bfcc8ed0
URL: 
https://github.com/kamailio/kamailio/commit/4357b5e6be2a71a401e9d53c43e787b9bfcc8ed0

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-04-28T16:22:40+02:00

core: define KSR_STATS_NAMESEP for stats name separator

---

Modified: src/core/config.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/4357b5e6be2a71a401e9d53c43e787b9bfcc8ed0.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4357b5e6be2a71a401e9d53c43e787b9bfcc8ed0.patch

---

diff --git a/src/core/config.h b/src/core/config.h
index 63ff8dc26c..6af3dfecfd 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -211,4 +211,6 @@
 
 #define DEFAULT_MAX_WHILE_LOOPS 100/*!< Maximum allowed iterations 
for a while (to catch runaways) */
 
+#define KSR_STATS_NAMESEP '_' 
+
 #endif


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:2fe0378c: p_usrloc, ims_usrloc_pcscf: change "-" for "_" in stats name to be prometheus compliant

2020-05-02 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 2fe0378c3d0596e30d8ec9ea4cb7d828321d2030
URL: 
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d828321d2030

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-04-28T14:48:59+02:00

p_usrloc, ims_usrloc_pcscf: change "-" for "_" in stats name to be prometheus 
compliant

---

Modified: src/modules/ims_usrloc_pcscf/udomain.c
Modified: src/modules/p_usrloc/udomain.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d828321d2030.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2fe0378c3d0596e30d8ec9ea4cb7d828321d2030.patch

---

diff --git a/src/modules/ims_usrloc_pcscf/udomain.c 
b/src/modules/ims_usrloc_pcscf/udomain.c
index 1be609ad42..7f63932e6b 100644
--- a/src/modules/ims_usrloc_pcscf/udomain.c
+++ b/src/modules/ims_usrloc_pcscf/udomain.c
@@ -82,7 +82,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '-';
+   *(p++) = '_';
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;
diff --git a/src/modules/p_usrloc/udomain.c b/src/modules/p_usrloc/udomain.c
index c25f1c6253..88612e957b 100644
--- a/src/modules/p_usrloc/udomain.c
+++ b/src/modules/p_usrloc/udomain.c
@@ -55,7 +55,7 @@ static char *build_stat_name( str* domain, char *var_name)
}
memcpy( s, domain->s, domain->len);
p = s + domain->len;
-   *(p++) = '-';
+   *(p++) = '_';
memcpy( p , var_name, strlen(var_name));
p += strlen(var_name);
*(p++) = 0;


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] json request fails

2020-05-02 Thread Daniel-Constantin Mierla
I pushed a fix for it (not tested) -- it was the new siptrace mode
trying to save to database using core callbacks and not checking it is
sip traffic or not. The errors were for the http traffic.

Cheers,
Daniel

On 02.05.20 15:02, Juha Heinanen wrote:
> This is the config command that my SIP proxy executes on the incoming
> JSON over HTTP request:
>
> jsonrpc_dispatch();
>
> -- Juha
>
> ___
> Kamailio (SER) - Development Mailing List
> sr-dev@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:c840fa6e: siptrace: skip non-sip traffic for db storage using core callbacks

2020-05-02 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: c840fa6eb19b4b5d316e36ce534f4d481805ee0b
URL: 
https://github.com/kamailio/kamailio/commit/c840fa6eb19b4b5d316e36ce534f4d481805ee0b

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-05-02T15:02:55+02:00

siptrace: skip non-sip traffic for db storage using core callbacks

---

Modified: src/modules/siptrace/siptrace.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/c840fa6eb19b4b5d316e36ce534f4d481805ee0b.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c840fa6eb19b4b5d316e36ce534f4d481805ee0b.patch

---

diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 5b4c064bec..6cc3471fcf 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -2077,6 +2077,24 @@ int siptrace_net_data_recv(sr_event_param_t *evp)
goto afterdb;
}
 
+   if(tmsg.first_line.type==SIP_REQUEST) {
+   if(!IS_SIP(&tmsg)) {
+   LM_DBG("non sip request message\n");
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+   } else if(tmsg.first_line.type==SIP_REPLY) {
+   if(!IS_SIP_REPLY(&tmsg)) {
+   LM_DBG("non sip reply message\n");
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+   } else {
+   LM_DBG("unknown sip message type %d\n", 
tmsg.first_line.type);
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+
if(sip_trace_msg_attrs(&tmsg, &sto) < 0) {
free_sip_msg(&tmsg);
goto afterdb;
@@ -2179,6 +2197,24 @@ int siptrace_net_data_send(sr_event_param_t *evp)
goto afterdb;
}
 
+   if(tmsg.first_line.type==SIP_REQUEST) {
+   if(!IS_SIP(&tmsg)) {
+   LM_DBG("non sip request message\n");
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+   } else if(tmsg.first_line.type==SIP_REPLY) {
+   if(!IS_SIP_REPLY(&tmsg)) {
+   LM_DBG("non sip reply message\n");
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+   } else {
+   LM_DBG("unknown sip message type %d\n", 
tmsg.first_line.type);
+   free_sip_msg(&tmsg);
+   goto afterdb;
+   }
+
if(sip_trace_msg_attrs(&tmsg, &sto) < 0) {
free_sip_msg(&tmsg);
goto afterdb;


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] undefined symbol: ul_cseq_delay

2020-05-02 Thread Daniel-Constantin Mierla
It was introduced by my previous commit. I pushed the fix for it.

Cheers,
Daniel

On 02.05.20 14:15, Juha Heinanen wrote:
> I build my sip proxy from today's master and it didn't start:
>
> May  2 15:12:51 char sip-proxy[22422]:  0(22474) ERROR:  
> [core/sr_module.c:512]: load_module(): could not open module 
> : 
> /usr/lib/x86_64-linux-gnu/sip-proxy/modules/usrloc.so: undefined symbol: 
> ul_cseq_delay
>
> -- Juha
>
> ___
> Kamailio (SER) - Development Mailing List
> sr-dev@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:d515c93a: usrloc: fixed missing symbol for ul_cseq_delay

2020-05-02 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: d515c93a5c9c9eb920f001d04870dc6333ca60dd
URL: 
https://github.com/kamailio/kamailio/commit/d515c93a5c9c9eb920f001d04870dc6333ca60dd

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-05-02T14:29:53+02:00

usrloc: fixed missing symbol for ul_cseq_delay

---

Modified: src/modules/usrloc/urecord.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/d515c93a5c9c9eb920f001d04870dc6333ca60dd.diff
Patch: 
https://github.com/kamailio/kamailio/commit/d515c93a5c9c9eb920f001d04870dc6333ca60dd.patch

---

diff --git a/src/modules/usrloc/urecord.c b/src/modules/usrloc/urecord.c
index faddeac91a..8e5258bfae 100644
--- a/src/modules/usrloc/urecord.c
+++ b/src/modules/usrloc/urecord.c
@@ -44,7 +44,7 @@
 /*! contact matching mode */
 int ul_matching_mode = CONTACT_ONLY;
 /*! retransmission detection interval in seconds */
-int cseq_delay = 20;
+int ul_cseq_delay = 20;
 
 /*!
  * \brief Create and initialize new record structure
@@ -801,7 +801,7 @@ int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* 
_path, int _cseq,
return -1;
if (_cseq==ptr->cseq) {
ul_get_act_time();
-   return 
(ptr->last_modified+cseq_delay>ul_act_time)?-2:-1;
+   return 
(ptr->last_modified+ul_cseq_delay>ul_act_time)?-2:-1;
}
}
*_co = ptr;


___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Daniel-Constantin Mierla
OK to merge it. Do not forget to add docs in the core cookbook wiki.

-- 
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/2304#issuecomment-622938364___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
Right, I realized after doing it. I've pushed the new suggest implementation.

-- 
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/2304#issuecomment-622852013___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Federico Cabiddu
@grumvalski pushed 1 commit.

9948696fd84605919e6ce6a7106099f1cdd0de98  core: remove stats_name_separator 
from cfg_group_core


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/2304/files/3203a6572b874d191c3be61519853005bd5ab056..9948696fd84605919e6ce6a7106099f1cdd0de98
___
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] usrloc: change "-" for "_" in stats name to be prometheus compliant (#2304)

2020-05-02 Thread Daniel-Constantin Mierla
@grumvalski - I think it makes no sense to added to the `cfg_group_core / 
default_core_cfg` structure, because that is for parameters that can be changed 
at runtime. But, imo, this is not set once and actually use only during 
startup, when the stats names are exported.

It can simply be a global variable like `int ksr_tcp_accept_hep3=0;`. It can be 
added to src/core/counters.c and exposed with extern in src/core/globals.h.

The cfg_group_* structures work as a block and making them larger without a 
reason should be avoided.

In the future probably we should create some structures for global attributes 
grouped per purpose, so instead of many individual global variables, there will 
be a few global structure.

As a side node, I would recommend using the `ksr_` prefix for global variables 
in the core, recently I encounter some issues with global variables being cross 
visible between object files, so db_mode of permissions module was inherited by 
usrloc module. Apparently some compilers (or operating systems) build libraries 
with visibility for all symbols, without adding any prefix.

-- 
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/2304#issuecomment-622762317___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev