[sr-dev] Re: [kamailio/kamailio] For Response to In-Dialog Invite the PVs $Ri $Rn etc are not getting updated. (Issue #3481)

2023-06-12 Thread Harish S
Can close this

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3481#issuecomment-1588578865
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] For Response to In-Dialog Invite the PVs $Ri $Rn etc are not getting updated. (Issue #3481)

2023-06-12 Thread Harish S
Closed #3481 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3481#event-9511226621
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] For Response to In-Dialog Invite the PVs $Ri $Rn etc are not getting updated. (Issue #3481)

2023-06-12 Thread Harish S
The variables are getting updated. The request was sent through the worng 
socket. Thankyou

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3481#issuecomment-1588578198
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo pushed 1 commit.

3df99a84a33d1dcdb064f96e6edd36b75f9e7166  rtpengine: fix build failed on 
specific distribution

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3473/files/2ddab46263db2ae94038e672c79faaa769d9c306..3df99a84a33d1dcdb064f96e6edd36b75f9e7166
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] fixed rabbitmq-c deprecation warning (PR #3465)

2023-06-12 Thread sergey-safarov
Closed #3465.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3465#event-9506840856
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] fixed rabbitmq-c deprecation warning (PR #3465)

2023-06-12 Thread sergey-safarov
Closing for now and will reopen when requested changes will be ready.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3465#issuecomment-1587944006
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] [kamailio/kamailio] For Response to In-Dialog Invite the PVs $Ri $Rn etc are not getting updated. (Issue #3481)

2023-06-12 Thread Harish S

For Response to In-Dialog Invite the PVs $Ri $Rn $Ri etc are not getting 
updated.
But in case of initial invite and its responses these PVs are getting updated




in the  reply_route[manage_reply]  xlogs were taken and found the values of  
$Ri $Rn  is same as the invite 

 Reproduction


xlog for Indilaog invite
 6(3739490) INFO: {1 1 INVITE 1800175...@xx.xxx.xx.xxx} 

[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo pushed 1 commit.

2ddab46263db2ae94038e672c79faaa769d9c306  rtpengine: Fix rfuchs's PR comments

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3473/files/7c2d64ffa57bb8ebe6ce46311ca98a100b09a997..2ddab46263db2ae94038e672c79faaa769d9c306
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Daniel-Constantin Mierla
@miconda commented on this pull request.



> + }   
+
+   if(rank == PROC_MAIN) {
+   if(rtpengine_dtmf_event_sock.len > 0) {
+   LM_DBG("Register RTPENGINE DTMF WORKER %d\n", mypid);
+   /* fork worker process */
+   mypid = fork_process(PROC_RPC, "RTPENGINE DTMF WORKER", 
1);
+   if(mypid < 0) {
+   LM_ERR("failed to fork RTPENGINE DTMF WORKER 
process %d\n", mypid);
+   return -1;
+   } else if(mypid == 0) {
+   if(cfg_child_init())
+   return -1;
+   /* this will loop forever */
+   rtpengine_dtmf_events_loop();
+   } 

I think we do not have explicitly `exit` after the functions doing infinite 
loops in the special child process. But it could be a good practice to kill the 
process (and by that kamailio instance) if the function that should do infinite 
loop exits due to some errors before it enters the infinite loop.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1227023280
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> + }   
+
+   if(rank == PROC_MAIN) {
+   if(rtpengine_dtmf_event_sock.len > 0) {
+   LM_DBG("Register RTPENGINE DTMF WORKER %d\n", mypid);
+   /* fork worker process */
+   mypid = fork_process(PROC_RPC, "RTPENGINE DTMF WORKER", 
1);
+   if(mypid < 0) {
+   LM_ERR("failed to fork RTPENGINE DTMF WORKER 
process %d\n", mypid);
+   return -1;
+   } else if(mypid == 0) {
+   if(cfg_child_init())
+   return -1;
+   /* this will loop forever */
+   rtpengine_dtmf_events_loop();
+   } 

Maybe @miconda can comment on that?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1227006547
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> @@ -261,7 +262,7 @@ static int add_rtpp_node_info(
void *ptrs, struct rtpp_node *crt_rtpp, struct rtpp_set 
*rtpp_list);
 static int rtpp_test_ping(struct rtpp_node *node);
 
-static void rtpengine_dtmf_events_loop(int rank);
+static void rtpengine_dtmf_events_loop();

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1227004361
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> +
+end:   
+   close(rtpengine_dtmf_event_fd);
+}
+
+static int rtpengine_raise_dtmf_event(char *buffer, int len) {
+   srjson_doc_t jdoc;
+   srjson_t *it = NULL;
+   struct sip_msg *fmsg = NULL;
+   struct run_act_ctx ctx;
+   int rtb;
+
+   LM_DBG("executing event_route[rtpengine:dtmf-event] (%d)\n", 
dtmf_event_rt);
+   LM_DBG("dispatching buffer: %s\n", buffer);
+
+   srjson_InitDoc(, NULL);

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1227002156
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> + }
+
+   if (dtmf_event_rt == -1) {
+   LM_NOTICE("nothing to do - nobody is listening!\n");
+   goto end;
+   }
+
+   p = shm_malloc(ret + 1);
+   if (!p) {
+   LM_ERR("could not allocate %d for buffer %.*s\n", ret, 
ret, buffer);
+   goto end;
+   }
+   memcpy(p, buffer, ret);
+   p[ret] = '\0';  
+
+   if (rtpengine_raise_dtmf_event(p, ret) < 0) {

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1227001921
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread Henning Westerholt
Or maybe just as other modules are doing (like ndb_redis), assume a few default 
paths if there is no pkg-config available.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3477#issuecomment-1587716165
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread Daniel-Constantin Mierla
I see that the Makefile does a `ls` on a path that is taken from the output of 
`pkg-config hiredis --libs-only-L`, but in my Ubuntu 22.04 the output is empty 
(the libhiredis-dev is installed from package, thus the libs are in the 
standard location).

Therefore I assume that your PR is going to work only when libhiredis is 
installed in a custom location.

Maybe you can leverage libraries paths in the output of `gcc 
-print-search-dirs` or `clang -print-search-dirs` (in Makefile it should be the 
`$(CC) -print-search-dirs` when `pkg-config hiredis --libs-only-L` returns 
empty string.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3477#issuecomment-1587665039
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:6a19434d: modules: readme files regenerated - mqueue ... [skip ci]

2023-06-12 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 6a19434d4b93a8ec6e345b55ff1b83ff6bd38596
URL: 
https://github.com/kamailio/kamailio/commit/6a19434d4b93a8ec6e345b55ff1b83ff6bd38596

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2023-06-12T18:16:32+02:00

modules: readme files regenerated - mqueue ... [skip ci]

---

Modified: src/modules/mqueue/README

---

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

---

diff --git a/src/modules/mqueue/README b/src/modules/mqueue/README
index a8981a68aee..3db56e8f54b 100644
--- a/src/modules/mqueue/README
+++ b/src/modules/mqueue/README
@@ -176,12 +176,12 @@ val character varying(4096) DEFAULT "" NOT NULL
   + size: size of the queue. Specifies the maximum number of items
 in queue. If exceeded the oldest one is removed. If not set
 the queue will be limitless.
-  + dbmode: If set to 1, the content of the queue is written to
-database table when the SIP server is stopped (i.e., ensure
-persistency over restarts). If set to 2, it is written at
-shutdown but not read at startup. If set to 3, it is read at
-sartup but not written at shutdown. Default value is 0 (no db
-table interaction).
+  + dbmode: If set to 1, the content of the queue is read from
+database at startup and is written to database table when the
+SIP server is stopped (i.e., ensure persistency over
+restarts). If set to 2, it is read at startup but not written
+at shutdown. If set to 3, it is written at shutdown but not
+read at startup. Default value is 0 (no db table interaction).
   + addmode: how to add new (key,value) pairs.
o 0: Will push all new (key,value) pairs at the end of the
  queue. (default)

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:23d43645: mqueue: fix documentation to match the code

2023-06-12 Thread Ovidiu Sas
Module: kamailio
Branch: master
Commit: 23d43645332451ec1ec6dab11da777f9c3bfe304
URL: 
https://github.com/kamailio/kamailio/commit/23d43645332451ec1ec6dab11da777f9c3bfe304

Author: Ovidiu Sas 
Committer: Ovidiu Sas 
Date: 2023-06-12T12:00:13-04:00

mqueue: fix documentation to match the code

---

Modified: src/modules/mqueue/doc/mqueue_admin.xml

---

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

---

diff --git a/src/modules/mqueue/doc/mqueue_admin.xml 
b/src/modules/mqueue/doc/mqueue_admin.xml
index 750a54e7f45..ae3fa54f407 100644
--- a/src/modules/mqueue/doc/mqueue_admin.xml
+++ b/src/modules/mqueue/doc/mqueue_admin.xml
@@ -124,10 +124,11 @@ val character varying(4096) DEFAULT "" NOT NULL


dbmode: If set to 1, the 
content of the queue
+   is read from database at startup and  
is written to database table when the SIP 
server is stopped
(i.e., ensure persistency over restarts).
-   If set to 2, it is written at shutdown but not 
read at startup.
-   If set to 3, it is read at sartup but not 
written at shutdown.
+   If set to 2, it is read at startup but not 
written at shutdown.
+   If set to 3, it is written at shutdown but not 
read at startup.
Default value is 0 (no db table interaction).



___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:39f09877: cdp: check setsockopt() return code

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 39f09877e650d66e820ca7eb0d61416818d174fc
URL: 
https://github.com/kamailio/kamailio/commit/39f09877e650d66e820ca7eb0d61416818d174fc

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T17:16:53+02:00

cdp: check setsockopt() return code

---

Modified: src/modules/cdp/tcp_accept.c

---

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

---

diff --git a/src/modules/cdp/tcp_accept.c b/src/modules/cdp/tcp_accept.c
index 968a245eb6a..43ff83c14a2 100644
--- a/src/modules/cdp/tcp_accept.c
+++ b/src/modules/cdp/tcp_accept.c
@@ -139,8 +139,11 @@ int create_socket(
goto error;
}
option = 1;
-   setsockopt(
-   server_sock, SOL_SOCKET, SO_REUSEADDR, , 
sizeof(option));
+   if(setsockopt(server_sock, SOL_SOCKET, SO_REUSEADDR, ,
+  sizeof(option))
+   < 0) {
+   LM_WARN("failed to set SO_REUSEADDR option for server 
socket\n");
+   }
 
if(bind(server_sock, ainfo->ai_addr, ainfo->ai_addrlen) == -1) {
LM_ERR("create_socket(): error binding on %s port %s >"

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> + s_port.len = rtpengine_dtmf_event_sock.s + 
> rtpengine_dtmf_event_sock.len - s_port.s;
+
+   if (s_port.len <= 0 || str2int(_port, ) < 0 || port > 65535) {
+   LM_ERR("failed to initialize dtmf event listener because port 
is invalid %.*s\n", rtpengine_dtmf_event_sock.len, rtpengine_dtmf_event_sock.s);
+   return;
+   }
+   rtpengine_dtmf_event_sock.len -= s_port.len + 1;
+   trim(_dtmf_event_sock);
+   rtpengine_dtmf_event_sock.s[rtpengine_dtmf_event_sock.len] = '\0';
+
+   memset(_addr, 0, sizeof(udp_addr));
+
+   if (rtpengine_dtmf_event_sock.s[0] == '[') {
+   udp_addr.sin6.sin6_family = AF_INET6;
+   udp_addr.sin6.sin6_port = htons(port);
+   ret = inet_pton(AF_INET, rtpengine_dtmf_event_sock.s, 
_addr.sin6.sin6_addr);

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1226819073
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Richard Fuchs
@rfuchs commented on this pull request.



> + s_port.len = rtpengine_dtmf_event_sock.s + 
> rtpengine_dtmf_event_sock.len - s_port.s;
+
+   if (s_port.len <= 0 || str2int(_port, ) < 0 || port > 65535) {
+   LM_ERR("failed to initialize dtmf event listener because port 
is invalid %.*s\n", rtpengine_dtmf_event_sock.len, rtpengine_dtmf_event_sock.s);
+   return;
+   }
+   rtpengine_dtmf_event_sock.len -= s_port.len + 1;
+   trim(_dtmf_event_sock);
+   rtpengine_dtmf_event_sock.s[rtpengine_dtmf_event_sock.len] = '\0';
+
+   memset(_addr, 0, sizeof(udp_addr));
+
+   if (rtpengine_dtmf_event_sock.s[0] == '[') {
+   udp_addr.sin6.sin6_family = AF_INET6;
+   udp_addr.sin6.sin6_port = htons(port);
+   ret = inet_pton(AF_INET, rtpengine_dtmf_event_sock.s, 
_addr.sin6.sin6_addr);

Must be AF_INET6 here

> + ret = inet_pton(AF_INET, rtpengine_dtmf_event_sock.s, 
> _addr.sin.sin_addr);
+   }   
+
+   if (ret != 1) {
+   LM_ERR("failed to initialize dtmf event listener because 
address could not be created for %s\n", rtpengine_dtmf_event_sock.s);
+   return;
+   }
+
+   rtpengine_dtmf_event_fd = socket(udp_addr.s.sa_family, SOCK_DGRAM, 0);
+
+   if(rtpengine_dtmf_event_fd < 0) {
+   LM_ERR("can't create socket\n");
+   return;
+   }
+   
+   if (bind(rtpengine_dtmf_event_fd, (struct sockaddr*)_addr.s, 
sizeof(udp_addr.s)) < 0) {

sizeof(udp_addr.s) is sizeof(struct sockaddr) which I think may be too small 
for INET6. sizeof(udp_addr) would be a better option

> + }
+
+   if (dtmf_event_rt == -1) {
+   LM_NOTICE("nothing to do - nobody is listening!\n");
+   goto end;
+   }
+
+   p = shm_malloc(ret + 1);
+   if (!p) {
+   LM_ERR("could not allocate %d for buffer %.*s\n", ret, 
ret, buffer);
+   goto end;
+   }
+   memcpy(p, buffer, ret);
+   p[ret] = '\0';  
+
+   if (rtpengine_raise_dtmf_event(p, ret) < 0) {

I think this leaks the `p` buffer if the return value == 0

> +
+end:   
+   close(rtpengine_dtmf_event_fd);
+}
+
+static int rtpengine_raise_dtmf_event(char *buffer, int len) {
+   srjson_doc_t jdoc;
+   srjson_t *it = NULL;
+   struct sip_msg *fmsg = NULL;
+   struct run_act_ctx ctx;
+   int rtb;
+
+   LM_DBG("executing event_route[rtpengine:dtmf-event] (%d)\n", 
dtmf_event_rt);
+   LM_DBG("dispatching buffer: %s\n", buffer);
+
+   srjson_InitDoc(, NULL);

jdoc needs to be freed somewhere

> @@ -261,7 +262,7 @@ static int add_rtpp_node_info(
void *ptrs, struct rtpp_node *crt_rtpp, struct rtpp_set 
*rtpp_list);
 static int rtpp_test_ping(struct rtpp_node *node);
 
-static void rtpengine_dtmf_events_loop(int rank);
+static void rtpengine_dtmf_events_loop();

nit: for better standards compliance, be explicit with `(void)`

> + }   
+
+   if(rank == PROC_MAIN) {
+   if(rtpengine_dtmf_event_sock.len > 0) {
+   LM_DBG("Register RTPENGINE DTMF WORKER %d\n", mypid);
+   /* fork worker process */
+   mypid = fork_process(PROC_RPC, "RTPENGINE DTMF WORKER", 
1);
+   if(mypid < 0) {
+   LM_ERR("failed to fork RTPENGINE DTMF WORKER 
process %d\n", mypid);
+   return -1;
+   } else if(mypid == 0) {
+   if(cfg_child_init())
+   return -1;
+   /* this will loop forever */
+   rtpengine_dtmf_events_loop();
+   } 

I suppose there should be an exit() at the end here? Although I'm not too 
familiar with how the Kamailio internals are handling this

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#pullrequestreview-1475119109
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:fb19f0ea: auth_diameter: free req in some cases of errors

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: fb19f0ea4c656afe7b60788efb8804e552fd37f9
URL: 
https://github.com/kamailio/kamailio/commit/fb19f0ea4c656afe7b60788efb8804e552fd37f9

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T16:27:46+02:00

auth_diameter: free req in some cases of errors

---

Modified: src/modules/auth_diameter/authorize.c

---

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

---

diff --git a/src/modules/auth_diameter/authorize.c 
b/src/modules/auth_diameter/authorize.c
index a3cc682b0c2..a15758754f6 100644
--- a/src/modules/auth_diameter/authorize.c
+++ b/src/modules/auth_diameter/authorize.c
@@ -255,12 +255,12 @@ int authorize(struct sip_msg *msg, pv_elem_t *realm, int 
hftype)
 
 /*
  * This function creates and submits diameter authentication request as per
- * draft-srinivas-aaa-basic-digest-00.txt. 
+ * draft-srinivas-aaa-basic-digest-00.txt.
  * Service type of the request is Authenticate-Only.
  * Returns:
  *  1 - success
  * -1 - error
- * 
+ *
  */
 int diameter_authorize(struct hdr_field *hdr, str *p_method, sip_uri_t *uri,
sip_uri_t *ruri, unsigned int m_id, rd_buf_t *rb)
@@ -294,6 +294,7 @@ int diameter_authorize(struct hdr_field *hdr, str 
*p_method, sip_uri_t *uri,
user_name.s = (char *)ad_malloc(user_name.len * 
sizeof(char));
if(!(user_name.s)) {
PKG_MEM_ERROR;
+   AAAFreeMessage();
return -1;
}
memset(user_name.s, 0, user_name.len);
@@ -417,6 +418,7 @@ int diameter_authorize(struct hdr_field *hdr, str 
*p_method, sip_uri_t *uri,
user_name.s = (char *)ad_malloc(user_name.len * sizeof(char));
if(!(user_name.s)) {
PKG_MEM_ERROR;
+   AAAFreeMessage();
return -1;
}
memset(user_name.s, 0, user_name.len);

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:f99b116e: dialplan: restructured condition on input and output params

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f99b116e876170709ad364ac2b8093969a939d4a
URL: 
https://github.com/kamailio/kamailio/commit/f99b116e876170709ad364ac2b8093969a939d4a

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T15:53:38+02:00

dialplan: restructured condition on input and output params

---

Modified: src/modules/dialplan/dialplan.c

---

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

---

diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c
index b7372769813..b5286d2b613 100644
--- a/src/modules/dialplan/dialplan.c
+++ b/src/modules/dialplan/dialplan.c
@@ -857,11 +857,14 @@ static int ki_dp_translate(
return -1;
}
 
-   if(input_spv == NULL && output_spv == NULL) {
-   pvs_i = pv_cache_get(_default_param_s);
+   if(input_spv == NULL || input_spv->len <= 0) {
pvs_o = pv_cache_get(_default_param_s);
} else {
pvs_i = pv_cache_get(input_spv);
+   }
+   if(output_spv == NULL || output_spv->len <= 0) {
+   pvs_i = pv_cache_get(_default_param_s);
+   } else {
pvs_o = pv_cache_get(output_spv);
}
 

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo pushed 1 commit.

7c2d64ffa57bb8ebe6ce46311ca98a100b09a997  Register a new worker process for 
dtmf event listener

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3473/files/87253c36f1b42f5d707ac4d2aeeda2f842f4d46d..7c2d64ffa57bb8ebe6ce46311ca98a100b09a997
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



>  
-static int fixup_set_id(void **param, int param_no)
+static void rtpengine_dtmf_events_loop(int rank)

You are right. I removed it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1226675084
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Joey Golan
@joeygo commented on this pull request.



> @@ -2147,6 +2401,9 @@ static int child_init(int rank)
/* probe rtpengines only in first worker */
if(build_rtpp_socks(0, 1))
return -1;
+   
+   if (rtpengine_dtmf_event_sock.len > 0)
+   rtpengine_dtmf_events_loop(rank);

Thanks for the example.
I fixed the code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1226675881
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] pdb: change log level for pdb query response time from LM_INFO to LM_DBG (PR #3296)

2023-06-12 Thread Daniel-Constantin Mierla
Closed #3296.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3296#event-9501716531
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] pdb: change log level for pdb query response time from LM_INFO to LM_DBG (PR #3296)

2023-06-12 Thread Daniel-Constantin Mierla
I have just pushed a more generic way to allow remapping log levels for local 
purpose of the module when using LLM_XYZ() log macros instead of LM_XYZ() and 
updated the pdb module to offer a modparam for INFO level to be remapped. The 
most relevant commit:

  - 
https://github.com/kamailio/kamailio/commit/03203d1baa5f185db8743a90f889e5483e90e911
  - 
https://github.com/kamailio/kamailio/commit/e818baa1b21249529c93990ef0340dd8b56b26cf

To get the equivalent of what you wanted to change, set ll_info modparam to 3.

If there are problems, open a bug in the issue tracker.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3296#issuecomment-1587193931
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:060a9605: modules: readme files regenerated - pdb ... [skip ci]

2023-06-12 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 060a96057309000592f126956cd343656a26ecba
URL: 
https://github.com/kamailio/kamailio/commit/060a96057309000592f126956cd343656a26ecba

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2023-06-12T14:01:24+02:00

modules: readme files regenerated - pdb ... [skip ci]

---

Modified: src/modules/pdb/README

---

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

---

diff --git a/src/modules/pdb/README b/src/modules/pdb/README
index 60b329d8421..52ebab2e8ae 100644
--- a/src/modules/pdb/README
+++ b/src/modules/pdb/README
@@ -29,6 +29,7 @@ Pawel Kuzak
 
   3.1. timeout (integer)
   3.2. server (string)
+  3.3. ll_info (int)
 
 4. Functions
 
@@ -44,10 +45,11 @@ Pawel Kuzak
 
1.1. Set timeout parameter
1.2. Set server parameter
-   1.3. pdb_query usage
-   1.4. pdb.status usage
-   1.5. pdb.activate usage
-   1.6. pdb.deactivate usage
+   1.3. Set ll_info parameter
+   1.4. pdb_query usage
+   1.5. pdb.status usage
+   1.6. pdb.activate usage
+   1.7. pdb.deactivate usage
 
 Chapter 1. Admin Guide
 
@@ -63,6 +65,7 @@ Chapter 1. Admin Guide
 
 3.1. timeout (integer)
 3.2. server (string)
+3.3. ll_info (int)
 
4. Functions
 
@@ -113,6 +116,7 @@ Chapter 1. Admin Guide
 
3.1. timeout (integer)
3.2. server (string)
+   3.3. ll_info (int)
 
 3.1. timeout (integer)
 
@@ -136,6 +140,19 @@ modparam("pdb", "timeout", 10)
 modparam("pdb", "server", "localhost:10001,host.name:10001,192.168.1.7:10002")
 ...
 
+3.3. ll_info (int)
+
+   Local log level (per module) for specific INFO messages. It has to be a
+   valid log level value (see xlog() function from xlog module for more
+   details).
+
+   Default value is ???2???.
+
+   Example 1.3. Set ll_info parameter
+...
+modparam("pdb", "ll_info", 3)
+...
+
 4. Functions
 
4.1. pdb_query (string query, string dstavp)
@@ -149,7 +166,7 @@ modparam("pdb", "server", 
"localhost:10001,host.name:10001,192.168.1.7:10002")
a two byte integer value in network byte order. The integer value will
be stored in the given AVP.
 
-   Example 1.3. pdb_query usage
+   Example 1.4. pdb_query usage
 ...
 # query external service for routing information
 if (!pdb_query("$rU", "$avp(i:82)"))
@@ -169,7 +186,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id");
Prints the status of the module. This can either be "active" or
"deactivated".
 
-   Example 1.4. pdb.status usage
+   Example 1.5. pdb.status usage
 ...
 kamcmd pdb.status
 ...
@@ -178,7 +195,7 @@ kamcmd pdb.status
 
Activates the module. This is the default after loading the module.
 
-   Example 1.5. pdb.activate usage
+   Example 1.6. pdb.activate usage
 ...
 kamcmd pdb.activate
 ...
@@ -189,7 +206,7 @@ kamcmd pdb.activate
activated again. As long as the module is deactivated, the pdb_query
function will return -1.
 
-   Example 1.6. pdb.deactivate usage
+   Example 1.7. pdb.deactivate usage
 ...
 kamcmd pdb.deactivate
 ...

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:03203d1b: core: new log macros allowing to use local log levels per module

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 03203d1baa5f185db8743a90f889e5483e90e911
URL: 
https://github.com/kamailio/kamailio/commit/03203d1baa5f185db8743a90f889e5483e90e911

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T13:43:31+02:00

core: new log macros allowing to use local log levels per module

- a variable has to be defined inside module like:

ksr_loglevels_t _ksr_loglevels_MODNAME = KSR_LOGLEVELS_DEFAULTS;

- for example, for pdb module:

ksr_loglevels_t _ksr_loglevels_pdb = KSR_LOGLEVELS_DEFAULTS;

- then use LLM_XYZ() macro instead of LM_XYZ() - for example, use
  LLM_INFO() instead of LM_INFO()

---

Modified: src/core/dprint.h

---

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

---

diff --git a/src/core/dprint.h b/src/core/dprint.h
index 993a6ebb826..13957b269c9 100644
--- a/src/core/dprint.h
+++ b/src/core/dprint.h
@@ -109,6 +109,22 @@
 #define LOG2SYSLOG_LEVEL(level) \
(log_level_info[(level) - (L_ALERT)].syslog_level)
 
+/**
+ *
+ */
+typedef struct ksr_loglevels {
+   int ll_alert;
+   int ll_bug;
+   int ll_crit;
+   int ll_err;
+   int ll_warn;
+   int ll_notice;
+   int ll_info;
+   int ll_dbg;
+} ksr_loglevels_t;
+
+#define KSR_LOGLEVELS_DEFAULTS {L_ALERT, L_BUG, L_CRIT2, L_ERR, L_WARN, \
+   L_NOTICE, L_INFO, L_DBG}
 /**
  * data fileds used for structured logging
  */
@@ -406,6 +422,21 @@ void log_prefix_init(void);
 /* obsolete, do not use */
 #define DEBUG(...) DBG(__VA_ARGS__)
 
+/* use local log level mapping (not implemented for sun) */
+#define LLM_ALERT(...) LOG(L_ALERT, __VA_ARGS__)
+#define LLM_BUG(...) LOG(L_BUG, __VA_ARGS__)
+#define LLM_ERR(...) LOG(L_ERR, __VA_ARGS__)
+#define LLM_WARN(...) LOG(L_WARN, __VA_ARGS__)
+#define LLM_NOTICE(...) LOG(L_NOTICE, __VA_ARGS__)
+#define LLM_INFO(...) LOG(L_INFO, __VA_ARGS__)
+#define LLM_CRIT(...) LOG(L_CRIT2, __VA_ARGS__)
+
+#ifdef NO_DEBUG
+#define LLM_DBG(...)
+#else
+#define LLM_DBG(...) LOG(L_DBG, __VA_ARGS__)
+#endif
+
 #else /* ! __SUNPRO_C */
 #define NPRL(fmt, args...) LOG(L_NPRL, fmt, ##args)
 #define ALERT(fmt, args...) LOG(L_ALERT, fmt, ##args)
@@ -425,6 +456,29 @@ void log_prefix_init(void);
 /* obsolete, do not use */
 #define DEBUG(fmt, args...) DBG(fmt, ##args)
 
+#ifdef MOD_NAMEID
+
+#define KSR_LLMODVAR_COMBINEZ(X,Y) X##Y
+#define KSR_LLMODVAR_COMBINE(X,Y) KSR_LLMODVAR_COMBINEZ(X,Y)
+#define KSR_LLMODVAR KSR_LLMODVAR_COMBINE(_ksr_loglevels_,MOD_NAMEID)
+
+/* use local log level mapping */
+#define LLM_ALERT(fmt, args...) LOG(KSR_LLMODVAR.alert, fmt, ##args)
+#define LLM_BUG(fmt, args...) LOG(KSR_LLMODVAR.buf, fmt, ##args)
+#define LLM_ERR(fmt, args...) LOG(KSR_LLMODVAR.bug, fmt, ##args)
+#define LLM_WARN(fmt, args...) LOG(KSR_LLMODVAR.warn, fmt, ##args)
+#define LLM_NOTICE(fmt, args...) LOG(KSR_LLMODVAR.notice, fmt, ##args)
+#define LLM_INFO(fmt, args...) LOG(KSR_LLMODVAR.ll_info, fmt, ##args)
+#define LLM_CRIT(fmt, args...) LOG(KSR_LLMODVAR.crit, fmt, ##args)
+
+#ifdef NO_DEBUG
+#define LLM_DBG(fmt, args...)
+#else
+#define LLM_DBG(fmt, args...) LOG(KSR_LLMODVAR.ll_dbg, fmt, ##args)
+#endif
+
+#endif /* MOD_NAMEID */
+
 #endif /* __SUNPRO_C */
 
 

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:88d8c466: Makefile.modules: define MOD_NAMEID to module name without quotes

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 88d8c46603f6e45ba90c51b7c8d80acae7fb400a
URL: 
https://github.com/kamailio/kamailio/commit/88d8c46603f6e45ba90c51b7c8d80acae7fb400a

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T13:48:31+02:00

Makefile.modules: define MOD_NAMEID to module name without quotes

---

Modified: src/Makefile.modules

---

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

---

diff --git a/src/Makefile.modules b/src/Makefile.modules
index 7c3722d03e1..3521d44a93d 100644
--- a/src/Makefile.modules
+++ b/src/Makefile.modules
@@ -58,7 +58,7 @@ override static_modules_path=
 # INCLUDES += -I$(COREPATH)
 
 # temporary def (visible only in the module, not exported)
-DEFS += -DMOD_NAME='"$(MOD_NAME)"'
+DEFS += -DMOD_NAME='"$(MOD_NAME)"' -DMOD_NAMEID='$(MOD_NAME)'
 
 
 ifneq ($(makefile_defs_included),1)

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:e818baa1: pdb: use local log level for an info log message

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: e818baa1b21249529c93990ef0340dd8b56b26cf
URL: 
https://github.com/kamailio/kamailio/commit/e818baa1b21249529c93990ef0340dd8b56b26cf

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T13:47:18+02:00

pdb: use local log level for an info log message

- new mod param to allow remapping local log level for info
- related to GH #3296

---

Modified: src/modules/pdb/pdb.c

---

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

---

diff --git a/src/modules/pdb/pdb.c b/src/modules/pdb/pdb.c
index 75013cccb7a..2cb54de8372 100644
--- a/src/modules/pdb/pdb.c
+++ b/src/modules/pdb/pdb.c
@@ -48,6 +48,7 @@ static int timeoutlogs = -10;  /*!< for aggregating timeout 
logs */
 static int *active = NULL;
 static uint16_t *global_id = NULL;
 
+ksr_loglevels_t _ksr_loglevels_pdb = KSR_LOGLEVELS_DEFAULTS;
 
 /*!
  * Generic parameter that holds a string, an int or a pseudo-variable
@@ -103,9 +104,15 @@ static cmd_export_t cmds[] = {
{0, 0, 0, 0, 0, 0}};
 
 
-static param_export_t params[] = {{"server", PARAM_STRING, _server},
-   {"timeout", INT_PARAM, }, {0, 0, 0}};
+/* clang-format off */
+static param_export_t params[] = {
+   {"server", PARAM_STRING, _server},
+   {"timeout", PARAM_INT, },
+   {"ll_info", PARAM_INT, &_ksr_loglevels_pdb.ll_info},
 
+   {0, 0, 0}
+};
+/* clang-format on */
 
 struct module_exports exports = {
"pdb",   /* module name */
@@ -429,7 +436,7 @@ static int pdb_query(struct sip_msg *_msg, struct 
multiparam_t *_number,
timeoutlogs = -10;
}
if(gettimeofday(, NULL) == 0) {
-   LM_INFO("got an answer in %f ms\n",
+   LLM_INFO("got an answer in %f ms\n",
((double)(tnow.tv_usec - tstart.tv_usec
  + (tnow.tv_sec - 
tstart.tv_sec) * 100))
/ 1000);

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:7d7e6dfc: pdb: docs for ll_info mod param

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 7d7e6dfcdaf21cae4b98ca5520e667b4f8f09145
URL: 
https://github.com/kamailio/kamailio/commit/7d7e6dfcdaf21cae4b98ca5520e667b4f8f09145

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T13:54:34+02:00

pdb: docs for ll_info mod param

---

Modified: src/modules/pdb/doc/pdb_admin.xml

---

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

---

diff --git a/src/modules/pdb/doc/pdb_admin.xml 
b/src/modules/pdb/doc/pdb_admin.xml
index da2ecb3a01e..19b00bd99d8 100644
--- a/src/modules/pdb/doc/pdb_admin.xml
+++ b/src/modules/pdb/doc/pdb_admin.xml
@@ -94,6 +94,27 @@ modparam("pdb", "timeout", 10)

 ...
 modparam("pdb", "server", "localhost:10001,host.name:10001,192.168.1.7:10002")
+...
+   
+   
+
+   
+   ll_info (int)
+   
+   Local log level (per module) for specific INFO 
messages. It has to
+   be a valid log level value (see xlog() function from 
xlog module for
+   more details).
+   
+   
+   
+   Default value is 2.
+   
+   
+   
+   Set ll_info parameter
+   
+...
+modparam("pdb", "ll_info", 3)
 ...



___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread joelbax
@joelbax commented on this pull request.



> @@ -29,6 +29,12 @@
 #include "redis_dbase.h"
 #include "redis_table.h"
 
+#ifdef WITH_SSL
+int db_redis_opt_tls = 0;
+char *ca_path = 0;
+#endif
+char *db_pass = 0;

Very good point! Thank you very much. 

Done.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3477#discussion_r1226516699
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread joelbax
@joelbax pushed 1 commit.

5cbd4e2f19c9c64e72dbb9026d6b1d420e21a79e  ndb_redis: Fixing global variables 
names

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3477/files/29a0f05e2e4dca5419c17e7052547a8006136677..5cbd4e2f19c9c64e72dbb9026d6b1d420e21a79e
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread joelbax
@joelbax pushed 1 commit.

29a0f05e2e4dca5419c17e7052547a8006136677  db_redis: Fixing global variables

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3477/files/deb3a2b2b206314dd956cd02322d483c397d7d27..29a0f05e2e4dca5419c17e7052547a8006136677
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:e55851ee: kamcmd: clang-format the source code for kamcmd tool

2023-06-12 Thread Henning Westerholt
Module: kamailio
Branch: master
Commit: e55851ee7dfb7a60f0a9288d810b84cf3bcd0f19
URL: 
https://github.com/kamailio/kamailio/commit/e55851ee7dfb7a60f0a9288d810b84cf3bcd0f19

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2023-06-12T10:02:43Z

kamcmd: clang-format the source code for kamcmd tool

---

Modified: utils/kamcmd/kamcmd.c
Modified: utils/kamcmd/license.h
Modified: utils/kamcmd/parse_listen_id.c
Modified: utils/kamcmd/parse_listen_id.h

---

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

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:efa436bc: modules: readme files regenerated - jansson ... [skip ci]

2023-06-12 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: efa436bc228af99cfd1466b5ea1be2fc596f18b8
URL: 
https://github.com/kamailio/kamailio/commit/efa436bc228af99cfd1466b5ea1be2fc596f18b8

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2023-06-12T12:01:34+02:00

modules: readme files regenerated - jansson ... [skip ci]

---

Modified: src/modules/jansson/README
Modified: src/modules/lcr/README
Modified: src/modules/lost/README
Modified: src/modules/lrkproxy/README
Modified: src/modules/presence/README
Modified: src/modules/rtpproxy/README
Modified: src/modules/tmrec/README
Modified: src/modules/tmx/README
Modified: src/modules/topos/README
Modified: src/modules/tsilo/README
Modified: src/modules/uac/README
Modified: src/modules/uac_redirect/README
Modified: src/modules/uid_auth_db/README
Modified: src/modules/uid_domain/README
Modified: src/modules/userblocklist/README

---

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

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] presence: Add htable_db_restore RPC command. (PR #3462)

2023-06-12 Thread Daniel-Constantin Mierla
Merged #3462 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3462#event-9500214070
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:ebf1aa6d: presence: Add OK response to publish_cache_sync RPC command.

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: ebf1aa6dbfeca30d93c63291751417186f9100cd
URL: 
https://github.com/kamailio/kamailio/commit/ebf1aa6dbfeca30d93c63291751417186f9100cd

Author: Jake Greene 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T11:49:27+02:00

presence: Add OK response to publish_cache_sync RPC command.

---

Modified: src/modules/presence/doc/presence_admin.xml
Modified: src/modules/presence/presence.c

---

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

---

diff --git a/src/modules/presence/doc/presence_admin.xml 
b/src/modules/presence/doc/presence_admin.xml
index 22b20f1d46d..c3c86d4ee7a 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -1287,7 +1287,7 @@ pres_update_watchers("sip:t...@kamailio.org", "presence");

 

- presence.htable_db_restore
+ presence.publish_cache_sync
  
Synchronize changes made to the presentity table with the 
publish cache.
  
diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index 4471f809dc1..688b6dfeb3b 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -1860,7 +1860,9 @@ void rpc_presence_publish_cache_sync(rpc_t *rpc, void 
*ctx)
LM_DBG("Synchronizing presentity table with the publish cache.\n");
if (pres_htable_db_restore() == -1 ) {
rpc->fault(ctx, 500, "Failed to sync presinity table with the 
publish cache.");
-   };
+   } else {
+   rpc->rpl_printf(ctx, "OK");
+   }
return;
 }
 

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:07f86a52: Presence: semantical improvments to docs & rpc command name

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 07f86a52271920bc36db3a32c6ffa18434372ebf
URL: 
https://github.com/kamailio/kamailio/commit/07f86a52271920bc36db3a32c6ffa18434372ebf

Author: Jake Greene 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T11:49:27+02:00

Presence: semantical improvments to docs & rpc command name

---

Modified: src/modules/presence/doc/presence_admin.xml
Modified: src/modules/presence/presence.c

---

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

---

diff --git a/src/modules/presence/doc/presence_admin.xml 
b/src/modules/presence/doc/presence_admin.xml
index 41546d87d5b..22b20f1d46d 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -1286,13 +1286,13 @@ pres_update_watchers("sip:t...@kamailio.org", 
"presence");
 

 
-   
+   
  presence.htable_db_restore
  
-   Manually apply changes to the presenity table to the 
publ_cache.  
+   Synchronize changes made to the presentity table with the 
publish cache.
  
  
-   Name: presence.htable_db_restore
+   Name: presence.publish_cache_sync
  
  Parameters: none
  
@@ -1300,7 +1300,7 @@ pres_update_watchers("sip:t...@kamailio.org", "presence");
  
  
 ...
- presence.htable_db_restore
+ presence.publish_cache_sync
 ...
 
 
diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index bb4fc98a66c..4471f809dc1 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -1855,15 +1855,17 @@ static const char *rpc_presence_cleanup_doc[3] = {
0};
 
 
-void rpc_presence_htable_db_restore(rpc_t *rpc, void *c)
+void rpc_presence_publish_cache_sync(rpc_t *rpc, void *ctx)
 {
-   LM_DBG("Restoring presence publ cache from database.\n");
-   pres_htable_db_restore();
+   LM_DBG("Synchronizing presentity table with the publish cache.\n");
+   if (pres_htable_db_restore() == -1 ) {
+   rpc->fault(ctx, 500, "Failed to sync presinity table with the 
publish cache.");
+   };
return;
 }
 
-static const char *rpc_presence_htable_db_restore_doc[4] = {
-   "Sync publ_cache from database. Syncs changes made to presentity table 
with the publ_cache.",
+static const char *rpc_presence_publish_cache_sync_doc[4] = {
+   "Syncs changes made to presentity table with the publish cache.",
0
 };
 
@@ -2133,8 +2135,8 @@ static const char *rpc_presence_watcher_list_doc[2] = {
 
 
 rpc_export_t presence_rpc[] = {
-   {"presence.htable_db_restore", rpc_presence_htable_db_restore, 
-   rpc_presence_htable_db_restore_doc, 0},
+   {"presence.publish_cache_sync", 
rpc_presence_publish_cache_sync, 
+   rpc_presence_publish_cache_sync_doc, 0},
{"presence.cleanup", rpc_presence_cleanup, 
rpc_presence_cleanup_doc, 0},
{"presence.refreshWatchers", rpc_presence_refresh_watchers,
rpc_presence_refresh_watchers_doc, 0},

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:5197e7b4: presence: Add htable_db_restore RPC command.

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 5197e7b41dd5d08451b7a7906177fc04e1c3ce8b
URL: 
https://github.com/kamailio/kamailio/commit/5197e7b41dd5d08451b7a7906177fc04e1c3ce8b

Author: Jake Greene 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T11:49:27+02:00

presence: Add htable_db_restore RPC command.

- Introduced `htable_db_restore`  RPC command to load updates from the 
'presentity' table into the 'publ_cache' specifically for 'publ_cache' modes 1 
or 2.

- update docs for htable_db_restore RPC command

---

Modified: src/modules/presence/doc/presence_admin.xml
Modified: src/modules/presence/presence.c

---

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

---

diff --git a/src/modules/presence/doc/presence_admin.xml 
b/src/modules/presence/doc/presence_admin.xml
index dbad0acf65a..41546d87d5b 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -1284,6 +1284,27 @@ pres_update_watchers("sip:t...@kamailio.org", 
"presence");
 ...
 
 
+   
+
+   
+ presence.htable_db_restore
+ 
+   Manually apply changes to the presenity table to the 
publ_cache.  
+ 
+ 
+   Name: presence.htable_db_restore
+ 
+ Parameters: none
+ 
+   RPC Command Format:
+ 
+ 
+...
+ presence.htable_db_restore
+...
+
+
+   

presence.refreshWatchers

diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index 254315aebbb..bb4fc98a66c 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -1854,6 +1854,20 @@ static const char *rpc_presence_cleanup_doc[3] = {
"presentity, and watchers tables.",
0};
 
+
+void rpc_presence_htable_db_restore(rpc_t *rpc, void *c)
+{
+   LM_DBG("Restoring presence publ cache from database.\n");
+   pres_htable_db_restore();
+   return;
+}
+
+static const char *rpc_presence_htable_db_restore_doc[4] = {
+   "Sync publ_cache from database. Syncs changes made to presentity table 
with the publ_cache.",
+   0
+};
+
+
 /*! \brief
  *  Build the rpc response for listing presentity records
  * - imode - output attributes control
@@ -2119,6 +2133,8 @@ static const char *rpc_presence_watcher_list_doc[2] = {
 
 
 rpc_export_t presence_rpc[] = {
+   {"presence.htable_db_restore", rpc_presence_htable_db_restore, 
+   rpc_presence_htable_db_restore_doc, 0},
{"presence.cleanup", rpc_presence_cleanup, 
rpc_presence_cleanup_doc, 0},
{"presence.refreshWatchers", rpc_presence_refresh_watchers,
rpc_presence_refresh_watchers_doc, 0},

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Typos (PR #3441)

2023-06-12 Thread Daniel-Constantin Mierla
Merged #3441 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3441#event-9500205477
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git: new commits in branch master

2023-06-12 Thread Daniel-Constantin Mierla
- URL:  
https://github.com/kamailio/kamailio/commit/40d012d737dc5f59429b3bca2c0927412d2b4900
Author:   

Date:   2023-06-12T11:48:35+02:00

jansson: typo xavps's ?? xavp's

- URL:  
https://github.com/kamailio/kamailio/commit/70a9ea2b1e5cceeaf050356e7baf00127a58567d
Author:   

Date:   2023-06-12T11:48:35+02:00

lcr: typos

- URL:  
https://github.com/kamailio/kamailio/commit/d7700dd35725b35786dcc9da3dc938c236e845e5
Author:   

Date:   2023-06-12T11:48:35+02:00

lost: typos

- URL:  
https://github.com/kamailio/kamailio/commit/ac773d92e18243e441b5f2e5e8b797642bd0bc03
Author:   

Date:   2023-06-12T11:48:35+02:00

lrkproxy: typos

- URL:  
https://github.com/kamailio/kamailio/commit/d5501cfd654822df286f6916185c01fe4ac2bad7
Author:   

Date:   2023-06-12T11:48:35+02:00

rtpproxy: typos

- URL:  
https://github.com/kamailio/kamailio/commit/6625951ecce9ed84efafd8b07ff055fd49f9557b
Author:   

Date:   2023-06-12T11:48:35+02:00

tmrec: typos recurrence

- URL:  
https://github.com/kamailio/kamailio/commit/39701758116e2ffcc19d62df97b770df47faa0b4
Author:   

Date:   2023-06-12T11:48:35+02:00

tmx: update hyperlink to TM module

- URL:  
https://github.com/kamailio/kamailio/commit/20fa33e4c12ebc12ade4c70e4c91af8b8bff57aa
Author:   

Date:   2023-06-12T11:48:35+02:00

topos: typos

- URL:  
https://github.com/kamailio/kamailio/commit/e138e94bd3e222d0a8a7ef5e36c5dba66e73993b
Author:   

Date:   2023-06-12T11:48:35+02:00

tsilo: typos

- URL:  
https://github.com/kamailio/kamailio/commit/46d4f8bd49cb27e9a1b0219543110a2b82860b01
Author:   

Date:   2023-06-12T11:48:35+02:00

uac: extend documentation

This contains typos and some conclusions I made, while I tried to utilize
the uac module.

- URL:  
https://github.com/kamailio/kamailio/commit/1a449c829a568bf16cf247fe5aa95eded3cebabd
Author:   

Date:   2023-06-12T11:48:35+02:00

uac_redirect: typos

- URL:  
https://github.com/kamailio/kamailio/commit/3c66eeb3cd09e4d4698a6d1a174fbf4c6a2d2485
Author:   

Date:   2023-06-12T11:48:35+02:00

uid_domain: typos

- URL:  
https://github.com/kamailio/kamailio/commit/cf1834c7bfd589d67b602cd0bd6feff56565dd94
Author:   

Date:   2023-06-12T11:48:35+02:00

uid_auth_db: typos

- URL:  
https://github.com/kamailio/kamailio/commit/4774bcff4822f5004472117d37787ed336196420
Author:   

Date:   2023-06-12T11:48:35+02:00

uid_avp_db: typos

- URL:  
https://github.com/kamailio/kamailio/commit/9156897ce4784be45de5c80da0b4d6694acbca75
Author:   

Date:   2023-06-12T11:48:35+02:00

uri_db: typos

- URL:  
https://github.com/kamailio/kamailio/commit/0e01e3afa4dcca66d1f879a09fe3fd70b5dc16e6
Author:   

Date:   2023-06-12T11:48:35+02:00

userblocklist: typos

- URL:  
https://github.com/kamailio/kamailio/commit/90e172bad110c5a27da3908594b45f5bbe035d87
Author:   

Date:   2023-06-12T11:48:35+02:00

modules/utils: typo


___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Adding TLS support to db_redis (also password support) and ndb_redis (PR #3477)

2023-06-12 Thread Daniel-Constantin Mierla
@miconda commented on this pull request.



> @@ -29,6 +29,12 @@
 #include "redis_dbase.h"
 #include "redis_table.h"
 
+#ifdef WITH_SSL
+int db_redis_opt_tls = 0;
+char *ca_path = 0;
+#endif
+char *db_pass = 0;

Add module name prefix to the global variables ca_path and db_pass, like it is 
db_redis_opt_tls.  The are also declared with extern and being prefixed reduce 
the chances of conflicts with similar variables (e.g., ca_path can be quite 
common with some libs).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3477#pullrequestreview-1474500512
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] kamailio 5.7.0 development version can't use siprepo function sr_msg_push() (Issue #3418)

2023-06-12 Thread Daniel-Constantin Mierla
Closed #3418 as completed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3418#event-9500123092
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] kamailio 5.7.0 development version can't use siprepo function sr_msg_push() (Issue #3418)

2023-06-12 Thread Daniel-Constantin Mierla
Reopen if the above commit didn't fix it.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3418#issuecomment-1586970287
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Silence “make: --libs: No such file or directory” warnings (PR #3475)

2023-06-12 Thread Daniel-Constantin Mierla
Afaik `:=` evaluates the variable expression only once, does it evaluate it for 
each module Makefile, or only for the first time that variable is assigned? I 
mean, if module `a` and `b` have something like `BUILDER=...` in their 
Makefile, a `make all` is going to evaluate `BUILDER` variable each time, or 
the one from module `a` propagate to `b` compilation?

On the other hand `=` evaluates every time the variable is used.

GCC 4.4 is really old, I would avoid fixing warning for it if it can create 
side effects by propagating values when not expecting.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3475#issuecomment-1586958651
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Patch 2 (PR #3476)

2023-06-12 Thread Daniel-Constantin Mierla
Closed #3476.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3476#event-9499872492
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Patch 2 (PR #3476)

2023-06-12 Thread Daniel-Constantin Mierla
Thanks! Applied manually to set proper subject line.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3476#issuecomment-1586934649
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:c285b16b: Makefile: fixed paths for init.d scripts install on debian and centos

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: c285b16bc066ca4236ee00cf3e7fb24539fa9f2b
URL: 
https://github.com/kamailio/kamailio/commit/c285b16bc066ca4236ee00cf3e7fb24539fa9f2b

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T11:16:51+02:00

Makefile: fixed paths for init.d scripts install on debian and centos

- GH #3476

---

Modified: src/Makefile

---

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

---

diff --git a/src/Makefile b/src/Makefile
index 46847d03cc..6c2b35b415 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -982,11 +982,11 @@ install_initd_debian install-initd-debian:
-e "s#HOMEDIR=/run/kamailio#HOMEDIR=/run/$(NAME)#g" \
-e 
"s#DEFAULTS=/etc/default/kamailio#DEFAULTS=/etc/default/$(NAME)#g" \
-e 
"s#CFGFILE=/etc/kamailio/kamailio.cfg#CFGFILE=$(cfg_prefix)/$(cfg_dir)$(NAME).cfg#g"
 \
-   < pkg/kamailio/deb/debian/kamailio.init \
+   < ../pkg/kamailio/deb/debian/kamailio.init \
> /etc/init.d/$(NAME)
chmod +x /etc/init.d/$(NAME)
sed -e "s#RUN_KAMAILIO=no#RUN_KAMAILIO=yes#g" \
-   < pkg/kamailio/deb/debian/kamailio.default \
+   < ../pkg/kamailio/deb/debian/kamailio.default \
> /etc/default/$(NAME)
mkdir -p /run/$(NAME)
adduser --quiet --system --group --disabled-password \
@@ -1002,13 +1002,13 @@ install_initd_centos install-initd-centos:
-e "s#PID_FILE=/run/kamailio.pid#PID_FILE=/run/$(NAME).pid#g" \
-e 
"s#LOCK_FILE=/var/lock/subsys/kamailio#LOCK_FILE=/var/lock/subsys/$(NAME)#g" \
-e 
"s#KAMCFG=/etc/kamailio/kamailio.cfg#KAMCFG=$(cfg_prefix)/$(cfg_dir)$(NAME).cfg#g"
 \
-   < pkg/kamailio/rpm/kamailio.init \
+   < ../pkg/kamailio/rpm/kamailio.init \
> /etc/init.d/$(NAME)
chmod +x /etc/init.d/$(NAME)
sed -e "s#RUN_KAMAILIO=no#RUN_KAMAILIO=yes#g" \
-e "s#USER=kamailio#USER=$(NAME)#g" \
-e "s#GROUP=kamailio#GROUP=$(NAME)#g" \
-   < pkg/kamailio/rpm/kamailio.default \
+   < ../pkg/kamailio/rpm/kamailio.default \
> /etc/default/$(NAME)
mkdir -p /run/$(NAME)
/usr/sbin/groupadd -r $(NAME)

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] rtpengine: support receiving events from rtpengine and raise an event (PR #3473)

2023-06-12 Thread Daniel-Constantin Mierla
@miconda commented on this pull request.



> @@ -2147,6 +2401,9 @@ static int child_init(int rank)
/* probe rtpengines only in first worker */
if(build_rtpp_socks(0, 1))
return -1;
+   
+   if (rtpengine_dtmf_event_sock.len > 0)
+   rtpengine_dtmf_events_loop(rank);

It seems to block the child process with rank 1 (PROC_SIPINIT), which should 
not be done, because it can create problems for other modules such as usrloc.

A new process has to be started -- in mod init, it has to be registered with:

```
register_procs(1);
cfg_register_child(1);
```

And in child init created with fork_process(), something like:

```
if(rank == PROC_MAIN) {
/* fork worker process */
newpid = fork_process(PROC_RPC, "RTPENGINE DTMF WORKER", 1);
if(newpid < 0) {
LM_ERR("failed to fork worker process %d\n", i);
return -1;
} else if(newpid == 0) {
if(cfg_child_init())
return -1;
/* child - this will loop forever */
rtpengine_dtmf_events_loop();
} else {
/* parent process*/
}
return 0;
}
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3473#discussion_r1226342322
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:7b1fe048: tools: use python3 for route_graph.py tool, for old systems with both python2/python3, fix file closing

2023-06-12 Thread Henning Westerholt
Module: kamailio
Branch: master
Commit: 7b1fe0483b684693c7baea9b62b471b64c6e22a9
URL: 
https://github.com/kamailio/kamailio/commit/7b1fe0483b684693c7baea9b62b471b64c6e22a9

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2023-06-12T08:24:01Z

tools: use python3 for route_graph.py tool, for old systems with both 
python2/python3, fix file closing

---

Modified: misc/tools/route_graph/route_graph.py

---

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

---

diff --git a/misc/tools/route_graph/route_graph.py 
b/misc/tools/route_graph/route_graph.py
index 307f847b114..ae935a450bf 100755
--- a/misc/tools/route_graph/route_graph.py
+++ b/misc/tools/route_graph/route_graph.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 """
  * $Id$
  *
@@ -232,4 +232,4 @@ def traverse_routes(_level, _name):
 traverse_routes(1, r)
 
 print()
-
+cfg.close()

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:fa2a69e2: tool: port the route_graph.py script to python version 3.x

2023-06-12 Thread Henning Westerholt
Module: kamailio
Branch: master
Commit: fa2a69e2ae919b7ba221e87e2001bde83113ce2a
URL: 
https://github.com/kamailio/kamailio/commit/fa2a69e2ae919b7ba221e87e2001bde83113ce2a

Author: Akash Gupta 
Committer: Henning Westerholt 
Date: 2023-06-12T10:21:16+02:00

tool: port the route_graph.py script to python version 3.x

---

Modified: misc/tools/route_graph/route_graph.py

---

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

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] tool: port the route_graph.py script to python version 3.x (PR #3480)

2023-06-12 Thread Henning Westerholt
Merged #3480 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3480#event-9499202398
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] tool: port the route_graph.py script to python version 3.x (PR #3480)

2023-06-12 Thread Henning Westerholt
Thank you, merged. About the one warning related to the not closing file, its 
of course harmless, but will have a quick look.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3480#issuecomment-1586826212
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:fd7ea1ba: ratelimit: reformat kemi exports for kemidocs.py

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: fd7ea1bac7c5a0bc7e79e5bb90072898c6652e9d
URL: 
https://github.com/kamailio/kamailio/commit/fd7ea1bac7c5a0bc7e79e5bb90072898c6652e9d

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T10:03:06+02:00

ratelimit: reformat kemi exports for kemidocs.py

---

Modified: src/modules/ratelimit/ratelimit.c

---

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

---

diff --git a/src/modules/ratelimit/ratelimit.c 
b/src/modules/ratelimit/ratelimit.c
index 92e68bf0174..4162a04dbfd 100644
--- a/src/modules/ratelimit/ratelimit.c
+++ b/src/modules/ratelimit/ratelimit.c
@@ -1104,6 +1104,17 @@ static ticks_t rl_timer_handle(ticks_t ticks, struct 
timer_ln *tl, void *data)
return (ticks_t)(-1); /* periodical */
 }
 
+static int ki_rl_check(struct sip_msg *msg)
+{
+   return rl_check(msg, -1);
+}
+
+static int ki_rl_check_pipe(struct sip_msg *msg, int pipe)
+{
+
+   LM_DBG("trying kemi pipe %d\n", pipe);
+   return rl_check(msg, pipe);
+}
 
 /* rpc function documentation */
 static const char *rpc_stats_doc[2] = {
@@ -1347,29 +1358,23 @@ static rpc_export_t rpc_methods[] = {{"rl.stats", 
rpc_stats, rpc_stats_doc, 0},
{"rl.push_load", rpc_push_load, rpc_push_load_doc, 0},
{"rl.set_dbg", rpc_set_dbg, rpc_set_dbg_doc, 0}, {0, 0, 0, 0}};
 
+/* clang-format off */
 static sr_kemi_t sr_kemi_ratelimit_exports[] = {
-   {str_init("ratelimit"), str_init("rl_check"), SR_KEMIP_INT, 
ki_rl_check,
-   {SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-   {str_init("ratelimit"), str_init("rl_check_pipe"), SR_KEMIP_INT,
-   ki_rl_check_pipe,
-   {SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-   {{0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0}}
-
+   { str_init("ratelimit"), str_init("rl_check"),
+   SR_KEMIP_INT, ki_rl_check,
+   { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE}
+   },
+   { str_init("ratelimit"), str_init("rl_check_pipe"),
+   SR_KEMIP_INT, ki_rl_check_pipe,
+   { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE}
+   },
+
+   { {0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0} }
 };
+/* clang-format on */
 
-static int ki_rl_check(struct sip_msg *msg)
-{
-   return rl_check(msg, -1);
-}
-
-static int ki_rl_check_pipe(struct sip_msg *msg, int pipe)
-{
-
-   LM_DBG("trying kemi pipe %d\n", pipe);
-   return rl_check(msg, pipe);
-}
 
 int mod_register(char *path, int *dlflags, void *p1, void *p2)
 {

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:d9d4ef01: jansson: reformat kemi exports for kemdocs.py tool

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: d9d4ef011c9ee4f9c664ad945b36197a98efa9cd
URL: 
https://github.com/kamailio/kamailio/commit/d9d4ef011c9ee4f9c664ad945b36197a98efa9cd

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T10:03:06+02:00

jansson: reformat kemi exports for kemdocs.py tool

---

Modified: src/modules/jansson/jansson_mod.c

---

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

---

diff --git a/src/modules/jansson/jansson_mod.c 
b/src/modules/jansson/jansson_mod.c
index 17bf8aefd8f..820a5492574 100644
--- a/src/modules/jansson/jansson_mod.c
+++ b/src/modules/jansson/jansson_mod.c
@@ -250,12 +250,17 @@ static int ki_jansson_get(sip_msg_t *msg, str *spath, str 
*sdoc, str *spv)
 /**
  *
  */
+/* clang-format off */
 static sr_kemi_t sr_kemi_jansson_exports[] = {
-   {str_init("jansson"), str_init("get"), SR_KEMIP_INT, 
ki_jansson_get,
-   {SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
+   { str_init("jansson"), str_init("get"),
+   SR_KEMIP_INT, ki_jansson_get,
+   {SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE}
+   },
 
-   {{0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0}}};
+   { {0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0} }
+};
+/* clang-format on */
 
 /**
  *

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:f867d219: kamzo: kemi exports formatted for kemidocs.py

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f867d2190853b9f21791d83573de3f96f4337242
URL: 
https://github.com/kamailio/kamailio/commit/f867d2190853b9f21791d83573de3f96f4337242

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T10:03:06+02:00

kamzo: kemi exports formatted for kemidocs.py

---

Modified: src/modules/kazoo/kazoo.c

---

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

---

diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c
index 2cf34becebe..757fa2cdce9 100644
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -386,16 +386,22 @@ static int mod_init(void)
return 0;
 }
 
+/* clang-format off */
 static sr_kemi_t kazoo_kemi_exports[] = {
-   {str_init("kazoo"), str_init("kazoo_publish"), SR_KEMIP_INT,
-   ki_kz_amqp_publish,
-   {SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-   {str_init("kazoo"), str_init("kazoo_subscribe"), SR_KEMIP_INT,
-   ki_kz_amqp_subscribe,
-   {SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-   {{0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0}}};
+   { str_init("kazoo"), str_init("kazoo_publish"),
+   SR_KEMIP_INT, ki_kz_amqp_publish,
+   { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
+   { str_init("kazoo"), str_init("kazoo_subscribe"),
+   SR_KEMIP_INT, ki_kz_amqp_subscribe,
+   { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
+
+   { {0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0} }
+};
+/* clang-format on */
 
 int mod_register(char *path, int *dlflags, void *p1, void *p2)
 {

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:d9f9e5c6: ratelimit: ending struct whitespace for kemi exports

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: d9f9e5c6be4d8d30bdccb0154e95a87982d5c736
URL: 
https://github.com/kamailio/kamailio/commit/d9f9e5c6be4d8d30bdccb0154e95a87982d5c736

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T10:03:06+02:00

ratelimit: ending struct whitespace for kemi exports

---

Modified: src/modules/ratelimit/ratelimit.c

---

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

---

diff --git a/src/modules/ratelimit/ratelimit.c 
b/src/modules/ratelimit/ratelimit.c
index 4162a04dbfd..6c20589f8cb 100644
--- a/src/modules/ratelimit/ratelimit.c
+++ b/src/modules/ratelimit/ratelimit.c
@@ -1363,12 +1363,12 @@ static sr_kemi_t sr_kemi_ratelimit_exports[] = {
{ str_init("ratelimit"), str_init("rl_check"),
SR_KEMIP_INT, ki_rl_check,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE}
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("ratelimit"), str_init("rl_check_pipe"),
SR_KEMIP_INT, ki_rl_check_pipe,
{ SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE}
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
 
{ {0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0} }

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] git:master:cabf1968: ims_charging: kemi exports format for kemidocs.py

2023-06-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: cabf1968bf75f2b85894e5cfda63e1cd3cb7bd82
URL: 
https://github.com/kamailio/kamailio/commit/cabf1968bf75f2b85894e5cfda63e1cd3cb7bd82

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2023-06-12T10:03:06+02:00

ims_charging: kemi exports format for kemidocs.py

---

Modified: src/modules/ims_charging/ims_charging_mod.c

---

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

---

diff --git a/src/modules/ims_charging/ims_charging_mod.c 
b/src/modules/ims_charging/ims_charging_mod.c
index 96c50b1c16a..94ac9dbd0a5 100644
--- a/src/modules/ims_charging/ims_charging_mod.c
+++ b/src/modules/ims_charging/ims_charging_mod.c
@@ -743,20 +743,27 @@ static int ro_fixup_stop(void **param, int param_no)
return 0;
 }
 
+/* clang-format off */
 static sr_kemi_t ims_charging_kemi_exports[] = {
-   {str_init("ims_charging"), str_init("Ro_CCR"), SR_KEMIP_INT, 
ki_ro_ccr,
-   {SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT, 
SR_KEMIP_STR,
-   SR_KEMIP_STR, SR_KEMIP_NONE}},
-   {str_init("ims_charging"), str_init("Ro_CCR_Stop"), 
SR_KEMIP_INT,
-   ki_ro_ccr_stop,
-   {SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_STR, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-   {str_init("ims_charging"), str_init("Ro_set_session_id_avp"),
-   SR_KEMIP_INT, ki_ro_set_session_id_avp,
-   {SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, 
SR_KEMIP_NONE,
-   SR_KEMIP_NONE, SR_KEMIP_NONE}},
-
-   {{0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0}}};
+   { str_init("ims_charging"), str_init("Ro_CCR"),
+   SR_KEMIP_INT, ki_ro_ccr,
+   { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_INT,
+   SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE }
+   },
+   { str_init("ims_charging"), str_init("Ro_CCR_Stop"),
+   SR_KEMIP_INT, ki_ro_ccr_stop,
+   { SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_STR,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
+   { str_init("ims_charging"), str_init("Ro_set_session_id_avp"),
+   SR_KEMIP_INT, ki_ro_set_session_id_avp,
+   { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
+
+   { {0, 0}, {0, 0}, 0, NULL, {0, 0, 0, 0, 0, 0} }
+};
+/* clang-format on */
 
 int mod_register(char *path, int *dlflags, void *p1, void *p2)
 {

___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org