#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual …
[View More]modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
<!-- - [ ] Related to issue # -->
#### Description
Still WIP
* use [PKG|SHM]_MEM_ERROR
* use memset and avoid initialization per field
* init variables
* add cnxcc to lgtm build
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2343
-- Commit Summary --
* cnxcc: minor changes
-- File Changes --
M .lgtm.yml (3)
M src/modules/cnxcc/cnxcc_mod.c (61)
M src/modules/cnxcc/cnxcc_redis.c (29)
M src/modules/cnxcc/cnxcc_rpc.c (30)
M src/modules/cnxcc/cnxcc_sip_msg_faker.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2343.patchhttps://github.com/kamailio/kamailio/pull/2343.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2343
[View Less]
Hi All,
I am experimenting with Kamailio 5.3.3 as an IMS and I am trying to do load
tests
I am using SIPp to generate SIP.REGISTER and MariaDB and a DIAMETER tool (
seagull)
For now I achieved registrations with "speed" 200 per/sec.
When I send SIP.REGISTER faster(let's say 500 per/sec) I see some SARs
missing, not sent at all.
I start debugging and found that cxdx_send_sar is responsible to creating
SAR message. I put my debug message in it.
The strange thing: there is a mismatch of my debug …
[View More]message (cxdx_send_sar
invocation) and real SAR send over the network.
What is the thing I missing ?
Is there anything else responsible for SAR creating except cxdx_send_sar ?
Did someone made similar tests ?
my test machine is Centos 7 with 3.10.0
Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
16G RAM
During this tests I see kamailio very low CPU usage, even when I push it
with 500/sec
The biggest CPU load is in MariaDB, but I do not have issues with UAR and
MAR
[View Less]
**ld_fld.c:273** implicit-function-declaration
```
CC (gcc) [M db2_ldap.so] db2_ldap_mod.o
CC (gcc) [M db2_ldap.so] ld_cfg.o
CC (gcc) [M db2_ldap.so] ld_cmd.o
CC (gcc) [M db2_ldap.so] ld_con.o
CC (gcc) [M db2_ldap.so] ld_fld.o
ld_fld.c: In function 'ldap_gentime2db_datetime':
ld_fld.c:273:10: warning: implicit declaration of function 'timelocal' [-Wimplicit-function-declaration]
273 | *dst = timelocal(&time);
| ^~~~~~~~~
CC (gcc) [M db2_ldap.so] ld_res.o
CC (gcc) [M db2_ldap.so] ld_uri.o
…
[View More]make[3]: 'libsrdb2.so.1.0' is up to date.
```
**redis_table.c:586** maybe-uninitialized
```
CC (gcc) [M db_redis.so] db_redis_mod.o
CC (gcc) [M db_redis.so] redis_connection.o
CC (gcc) [M db_redis.so] redis_dbase.o
CC (gcc) [M db_redis.so] redis_table.o
redis_table.c: In function 'db_redis_parse_keys':
redis_table.c:586:38: warning: 'table' may be used uninitialized in this function [-Wmaybe-uninitialized]
586 | table->types = type_target = type;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
make[3]: 'libsrdb2.so.1.0' is up to date.
make[3]: 'libsrdb1.so.1.0' is up to date.
LD (gcc) [M db_redis.so] db_redis.so
```
**app_python** strict-aliasing
```
CC (gcc) [M app_python.so] app_python_mod.o
CC (gcc) [M app_python.so] apy_kemi.o
In file included from /usr/include/python2.7/Python.h:83,
from apy_kemi.c:25:
apy_kemi.c: In function 'sr_kemi_apy_return_true':
/usr/include/python2.7/object.h:769:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
769 | ((PyObject*)(op))->ob_refcnt++)
| ~^~~~~~~~~~~~~~~~
apy_kemi.c:121:2: note: in expansion of macro 'Py_INCREF'
121 | Py_INCREF(Py_True);
| ^~~~~~~~~
apy_kemi.c: In function 'sr_kemi_apy_return_false':
/usr/include/python2.7/object.h:769:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
769 | ((PyObject*)(op))->ob_refcnt++)
| ~^~~~~~~~~~~~~~~~
apy_kemi.c:130:2: note: in expansion of macro 'Py_INCREF'
130 | Py_INCREF(Py_False);
| ^~~~~~~~~
CC (gcc) [M app_python.so] apy_kemi_export.o
CC (gcc) [M app_python.so] mod_Core.o
```
**pdb.c:348** address-of-packed-member]
```
LD (gcc) [M p_usrloc.so] p_usrloc.so
CC (gcc) [M path.so] path.o
CC (gcc) [M path.so] path_mod.o
LD (gcc) [M path.so] path.so
CC (gcc) [M pdb.so] pdb.o
pdb.c: In function 'pdb_query':
pdb.c:348:60: warning: taking address of packed member of 'struct pdb_msg' may result in an unaligned pointer value [-Waddress-of-packed-member]
348 | _id = (short int *)&(msg.bdy.payload[reqlen]); /* make gcc happy */
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
LD (gcc) [M pdb.so] pdb.so
CC (gcc) [M pdt.so] pdt.o
CC (gcc) [M pdt.so] pdtree.o
make[3]: 'libsrdb1.so.1.0' is up to date.
```
--
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
[View Less]
Module: kamailio
Branch: master
Commit: 4deb51419ab66931459709fe44acd3e7a0acc18d
URL: https://github.com/kamailio/kamailio/commit/4deb51419ab66931459709fe44acd3e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-03T12:45:05+02:00
core: tcp - log details of the exiting tcp connection on insert failure
---
Modified: src/core/tcp_read.c
---
Diff: https://github.com/kamailio/kamailio/commit/…
[View More]4deb51419ab66931459709fe44acd3e…
Patch: https://github.com/kamailio/kamailio/commit/4deb51419ab66931459709fe44acd3e…
---
diff --git a/src/core/tcp_read.c b/src/core/tcp_read.c
index 8147951b21..db6e8b923a 100644
--- a/src/core/tcp_read.c
+++ b/src/core/tcp_read.c
@@ -1720,7 +1720,7 @@ static ticks_t tcpconn_read_timeout(ticks_t t, struct timer_ln* tl, void* data)
* idx - index in the fd_array (or -1 if not known)
* return: -1 on error, or when we are not interested any more on reads
* from this fd (e.g.: we are closing it )
- * 0 on EAGAIN or when by some other way it is known that no more
+ * 0 on EAGAIN or when by some other way it is known that no more
* io events are queued on the fd (the receive buffer is empty).
* Usefull to detect when there are no more io events queued for
* sigio_rt, epoll_et, kqueue.
@@ -1728,7 +1728,7 @@ static ticks_t tcpconn_read_timeout(ticks_t t, struct timer_ln* tl, void* data)
* queued -- the receive buffer might still be non-empty)
*/
inline static int handle_io(struct fd_map* fm, short events, int idx)
-{
+{
int ret;
int n;
int read_flags;
@@ -1736,10 +1736,11 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
int s;
long resp;
ticks_t t;
-
+ fd_map_t *ee = NULL;
+
/* update the local config */
cfg_update();
-
+
switch(fm->type){
case F_TCPMAIN:
again:
@@ -1803,7 +1804,7 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
if (unlikely(read_flags & RD_CONN_REPEAT_READ))
goto repeat_1st_read;
#endif /* USE_TLS */
-
+
/* must be before io_watch_add, io_watch_add might catch some
* already existing events => might call handle_io and
* handle_io might decide to del. the new connection =>
@@ -1816,13 +1817,25 @@ inline static int handle_io(struct fd_map* fm, short events, int idx)
local_timer_reinit(&con->timer);
local_timer_add(&tcp_reader_ltimer, &con->timer,
S_TO_TICKS(TCP_CHILD_TIMEOUT), t);
- if (unlikely(io_watch_add(&io_w, s, POLLIN, F_TCPCONN, con)<0)){
+ if (unlikely(io_watch_add(&io_w, s, POLLIN, F_TCPCONN, con)<0)) {
LM_CRIT("io_watch_add failed for %p id %d fd %d, state %d, flags %x,"
" main fd %d, refcnt %d ([%s]:%u -> [%s]:%u)\n",
con, con->id, con->fd, con->state, con->flags,
con->s, atomic_get(&con->refcnt),
ip_addr2a(&con->rcv.src_ip), con->rcv.src_port,
ip_addr2a(&con->rcv.dst_ip), con->rcv.dst_port);
+ ee = get_fd_map(&io_w, s);
+ if(ee!=0 && ee->type==F_TCPCONN) {
+ tcp_connection_t *ec;
+ ec = (tcp_connection_t*)ee->data;
+ LM_CRIT("existing tcp con %p id %d fd %d, state %d, flags %x,"
+ " main fd %d, refcnt %d ([%s]:%u -> [%s]:%u)\n",
+ ec, ec->id, ec->fd, ec->state, ec->flags,
+ ec->s, atomic_get(&ec->refcnt),
+ ip_addr2a(&ec->rcv.src_ip), ec->rcv.src_port,
+ ip_addr2a(&ec->rcv.dst_ip), ec->rcv.dst_port);
+
+ }
tcpconn_listrm(tcp_conn_lst, con, c_next, c_prev);
local_timer_del(&tcp_reader_ltimer, &con->timer);
goto con_error;
[View Less]
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev…
[View More]Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement) add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
With rtpengine module play_media function it is possible to play media to one of the endpoints(Kamailio is normal proxy) but I like to use Kamailio+rtpengine as an end point playing music for caller(simple media server).
### Expected behavior
Possible to use Kamailio+rtpengine as an end point playing media.
### Possible Solutions
I see some efforts in mailing list trying to build/generate a 183 response inside script to simulate a dummy end point and then use rtpengine_play_media function.
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
Regards.
Babak
--
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/2315
[View Less]
Module: kamailio
Branch: master
Commit: dd15786aba0b48a83efeef258d689217ac5375a9
URL: https://github.com/kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-01T13:10:29+02:00
crypto: aes helper functions relocated to dedicated files
---
Added: src/modules/crypto/crypto_aes.c
Added: src/modules/crypto/crypto_aes.h
---
Diff: https://github.com/…
[View More]kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
Patch: https://github.com/kamailio/kamailio/commit/dd15786aba0b48a83efeef258d68921…
---
diff --git a/src/modules/crypto/crypto_aes.c b/src/modules/crypto/crypto_aes.c
new file mode 100644
index 0000000000..9573c7264d
--- /dev/null
+++ b/src/modules/crypto/crypto_aes.c
@@ -0,0 +1,21 @@
+/**
+ * Copyright (C) 2016-2020 Daniel-Constantin Mierla (asipto.com)
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
diff --git a/src/modules/crypto/crypto_aes.h b/src/modules/crypto/crypto_aes.h
new file mode 100644
index 0000000000..a98a95016e
--- /dev/null
+++ b/src/modules/crypto/crypto_aes.h
@@ -0,0 +1,35 @@
+/**
+ * Copyright (C) 2016-2020 Daniel-Constantin Mierla (asipto.com)
+ *
+ * This file is part of Kamailio, a free SIP server.
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version
+ *
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _CRYPTO_AES_H_
+#define _CRYPTO_AES_H_
+
+#include <openssl/evp.h>
+
+int crypto_aes_init(unsigned char *key_data, int key_data_len,
+ unsigned char *salt, EVP_CIPHER_CTX *e_ctx, EVP_CIPHER_CTX *d_ctx);
+
+unsigned char *crypto_aes_encrypt(EVP_CIPHER_CTX *e, unsigned char *plaintext,
+ int *len);
+
+unsigned char *crypto_aes_decrypt(EVP_CIPHER_CTX *e, unsigned char *ciphertext,
+ int *len);
+#endif
\ No newline at end of file
[View Less]