Module: kamailio
Branch: master
Commit: f9c336aa9a78169cf9c7f3fd9bfcfd22218078fb
URL: https://github.com/kamailio/kamailio/commit/f9c336aa9a78169cf9c7f3fd9bfcfd2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-24T19:09:35+01:00
ims_qos: typos in comments
---
Modified: src/modules/ims_qos/ims_qos_mod.c
Modified: src/modules/ims_qos/rx_aar.c
---
Diff: https://github.com/kamailio/kamailio/commit/f9c336aa9a78169cf9c7f3fd9bfcfd2…
Patch: https://github.com/kamailio/kamailio/commit/f9c336aa9a78169cf9c7f3fd9bfcfd2…
---
diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index 5fa584bcd7..18d111eb67 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -597,7 +597,7 @@ void callback_pcscf_contact_cb(struct pcontact *c, int type, void *param)
if (type == PCSCF_CONTACT_EXPIRE || type == PCSCF_CONTACT_DELETE) {
- //we dont need to send STR if no QoS was ever succesfully registered!
+ // we dont need to send STR if no QoS was ever successfully registered!
if (must_send_str && (c->reg_state != PCONTACT_REG_PENDING) && (c->reg_state != PCONTACT_REG_PENDING_AAR)) {
LM_DBG("Received notification of contact (in state [%d] deleted for signalling bearer with with Rx session ID: [%.*s]\n",
c->reg_state, c->rx_session_id.len, c->rx_session_id.s);
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index 97d3d7a49d..6a2d60c901 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -328,7 +328,8 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e
}
//at this point we have the contact
- /*set the contact state to say we have succesfully done ARR for register and that we dont need to do it again
+ /*set the contact state to say we have successfully done ARR for register
+ * and that we dont need to do it again
* for the duration of the registration.
* */
if (ul.update_rx_regsession(domain_t, &local_data->auth_session_id, pcontact) != 0) {
I've come across a problem with initializing the htable module based on data in MySQL. We persist a cache in MySQL during runtime and reload it on restart using the built in loading capabilities of htable. But occasionally when MySQL contains too many rows the query to MySQL times out. I've tracked it down to be due to the fact that the query wants the data to be sorted based on the column key_name (src/modules/htable/ht_db.c:236 on tag 5.4.4). Looking at the code this seems completely unnecessary and it seems to be working fine without the sorting (tested with mysql-rewriter). Any thoughts on this?
Best regards
Manfred
### Pre-Submission Checklist
- [x ] Commit message has the format required by CONTRIBUTING guide
- [ x] Commits are split per component (core, individual 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:
- [ x] PR should be backported to stable branches
- [ x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
Fixes minor typo in messages from database config bash scripts.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2648
-- Commit Summary --
* Fix typo in 'core tables successfully installed' msg
-- File Changes --
M utils/kamctl/kamdbctl.mysql (8)
M utils/kamctl/kamdbctl.oracle (6)
M utils/kamctl/kamdbctl.pgsql (8)
M utils/kamctl/kamdbctl.sqlite (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2648.patchhttps://github.com/kamailio/kamailio/pull/2648.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/2648
In sip register: Request-URI: sip:ims.mnc001.mcc460.3gppnetwork.org , sip register is ok.
In sip invite: Request-URI: tel:460010120073501;phone-context=ims.mnc001.mcc460.3gppnetwork.org, return 478 Unresolvable destination .
I saw issue #2287 and #1173 . #2287 deals with register, and #1173 has no result.
I want to know how to support such RURI in sip invite, does it need a patch in code ? If so , where and how to modified it .
Thanks a lot.
--
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/2646
### Description
We tried to use the `xhttp_prom` module, but our Prometheus couldn't read it, because of metrics conflicting with Prometheus data model.
For us, the problem lies in the usrloc module. It exports the following metrics:
```
usrloc:location-contacts = 0
usrloc:location-expires = 0
usrloc:location-users = 0
usrloc:registered_users = 0
```
However, Prometheus allows only ascii characters and digits, as well as underscores and colons.
See: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels
The metrics names should not contain `-`, so they should get converted to `_`.
#### Reproduction
Setup Kamailio with `usrloc`, `xhttp` and `xhttp_prom` module and let Prometheus query it. It will stumble upon the first entry of `usrloc` module stats.
### Possible Solutions
Either the `usrloc` module could export its stats with the dash replaced by underscores, or the xhttp_prom module could sanitize the output. The first one would be a breaking change, I guess, making this a change for a major release.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@ifens5:/# kamailio -v
version: kamailio 5.3.8 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 7.5.0```
* **Operating System**:
```
Ubuntu 18.04
```
--
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/2644
<!--
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
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.
-->
Sometimes need to add rport on outbound uac reg, but seems it's not possible in the current uac module. Would be good to an an extra param to do it, or is it possible to trigger a KEMI event route so a script can add whatever it need before sending the register msg?
Thanks.
### Expected behavior
#### Actual observed behavior
#### Debugging Data
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your log messages here)
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
(paste your output here)
```
--
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/2639
Retry build_rtpp_socks() if any DNS or create, bind, connect
issues happened when kamailio started, and at least one node
from list was skipped.
This retry will happen automatically, when select_rtpp_node() is called
and will avoid a need for a "kamcmd rtpengine.reload"
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### 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 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
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Described above.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2633
-- Commit Summary --
* rtpengine: rebuild sockets if any skipped nodes
-- File Changes --
M src/modules/rtpengine/rtpengine.c (28)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2633.patchhttps://github.com/kamailio/kamailio/pull/2633.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/2633
Hi, I am running docker with this:
https://hub.docker.com/layers/kamailio/kamailio/5.4.3-trusty/images/sha256-…
and
https://hub.docker.com/layers/mysql/library/mysql/8.0.23/images/sha256-8708…
I made some configurations in Kamailio:
/etc/default/kamailio
RUN_KAMAILIO=yes
USER=kamailio
GROUP=kamailio
CFGFILE=/etc/kamailio/kamailio.cfg
DUMP_CORE=yes
/etc/kamailio/kamailio.cfg
#!define WITH_MYSQL
#!define WITH_AUTH
#!define WITH_USRLOCDB
/etc/kamailio/kamctlrc
SIP_DOMAIN=kamailio.org
DBENGINE=MYSQL
DBHOST=172.19.0.3
DBPORT=3306
DBNAME=kamailio
DBRWUSER="kamailio"
DBRWPW="kamailiorw"
DBROUSER="kamailioro"
DBROPW="kamailioro"
DBACCESSHOST=172.19.0.5
DBROOTUSER="root"
DBROOTPW="negro"
CHARSET="latin1"
USERCOL="user"
Then I run creation of database:
/usr/sbin/kamdbctl create
All was ok so I can see in database:
+------------------+------------+-----------------------+
| user | host | plugin |
+------------------+------------+-----------------------+
| root | % | mysql_native_password |
| kamailio | 172.19.0.3 | mysql_native_password |
| kamailioro | 172.19.0.3 | mysql_native_password |
| kamailio | 172.19.0.5 | mysql_native_password |
| kamailioro | 172.19.0.5 | mysql_native_password |
| kamailio | localhost | mysql_native_password |
| kamailioro | localhost | mysql_native_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | caching_sha2_password |
| mysql.sys | localhost | caching_sha2_password |
| root | localhost | mysql_native_password |
+------------------+------------+-----------------------+
At this point, if I try to restart kamailio i got an error and container never go up again, I have to delete it and restart the installation and configuration process with this log:
ON RESTART KAMAILIO FROM CONTAINER CONSOLE:
Listening on
udp: 127.0.0.1:5060
udp: 172.17.0.4:5060
tcp: 127.0.0.1:5060
tcp: 172.17.0.4:5060
Aliases:
tcp: mykamailio:5060
tcp: localhost:5060
udp: mykamailio:5060
udp: localhost:5060
0(1) INFO: <core> [core/tcp_main.c:4984]: init_tcp(): using epoll_lt as the io watch method (auto detected)
0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
0(1) INFO: <core> [main.c:2834]: main(): processes (at least): 33 - shm size: 67108864 - pkg size: 8388608
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
0(1) INFO: <core> [core/udp_server.c:154]: probe_max_receive_buffer(): SO_RCVBUF is initially 212992
0(1) INFO: <core> [core/udp_server.c:206]: probe_max_receive_buffer(): SO_RCVBUF is finally 425984
21(28) INFO: jsonrpcs [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/28
23(30) INFO: ctl [io_listener.c:214]: io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config)
0(1) ALERT: <core> [main.c:774]: handle_sigs(): child process 205 exited normally, status=255
0(1) INFO: <core> [main.c:802]: handle_sigs(): terminating due to SIGCHLD
2(9) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
1(8) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
3(10) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
4(11) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
6(13) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
5(12) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
7(14) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
10(17) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
12(19) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
14(21) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
29(36) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
24(31) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
28(35) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
15(22) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
19(26) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
13(20) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
17(24) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
8(15) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
23(30) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
22(29) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
21(28) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
26(33) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
20(27) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
31(38) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
32(39) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
9(16) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
30(37) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
11(18) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
16(23) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
27(34) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
18(25) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
25(32) INFO: <core> [main.c:857]: sig_usr(): signal 15 received
0(1) ERROR: ctl [ctl.c:390]: mod_destroy(): ERROR: ctl: could not delete unix socket /var/run/kamailio//kamailio_ctl: No such file or directory (2)
0(1) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
SO CONTAINER WAS DOWN, AND THEN IF I TRY TO START CONTAINER AGAIN:
Listening on
udp: 127.0.0.1:5060
udp: 172.17.0.4:5060
udp: 172.19.0.5:5060
tcp: 127.0.0.1:5060
tcp: 172.17.0.4:5060
tcp: 172.19.0.5:5060
Aliases:
tcp: mykamailio:5060
tcp: localhost:5060
udp: mykamailio:5060
udp: localhost:5060
0(1) INFO: <core> [core/tcp_main.c:4984]: init_tcp(): using epoll_lt as the io watch method (auto detected)
0(1) INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
0(1) INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
0(1) INFO: auth [auth_mod.c:346]: mod_init(): qop set, but nonce-count (nonce_count) support disabled
0(1) INFO: <core> [main.c:2834]: main(): processes (at least): 41 - shm size: 67108864 - pkg size: 8388608
0(1) ERROR: db_mysql [km_my_con.c:163]: db_mysql_new_connection(): driver error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
0(1) ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool
0(1) ERROR: usrloc [dlist.c:852]: register_udomain(): failed to open database connection
0(1) ERROR: registrar [registrar.c:711]: domain_fixup(): failed to register domain
0(1) ERROR: <core> [core/route.c:1167]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:698
0(1) ERROR: <core> [core/rvalue.c:3869]: fix_rval_expr(): failure in cfg at line: 698 col: 22
0(1) ERROR: <core> [core/rvalue.c:3869]: fix_rval_expr(): failure in cfg at line: 698 col: 22
0(1) ERROR: <core> [core/route.c:1167]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:701
error -1 while trying to fix configuration
0(1) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
SO NO WAY TO GET IT UP.
Any idea on what is the problem here? I tried giving permissions to some folders in Kamailio docker container:
chown kamailio:kamailio /usr/sbin/kam*
chmod 755 /usr/sbin/kam*
chown -R kamailio:kamailio /etc/kamailio
chmod -R 755 /etc/kamailio
chown -R root:kamailio /var/run
chmod -R 755 /var/run
chown -R kamailio:kamailio /run/kamailio
chown -R 755 /run/kamailio
But had no effect...
thank you in advance.
--
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/2640
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
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
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
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
update libphonenum for the latest metadata please (currently v8.12.18)
### Additional Information
OS is CentOS 8 Stream
```# dnf list installed | grep phone
kamailio-phonenum.x86_64 5.4.3-0.el8.centos @kamailio
libphonenumber.x86_64 8.12.11-2.el8 @kamailio
```
--
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/2635
**core/receive.c:300 - CentOS 7**
```
CC (gcc) [kamailio] core/ip_addr.o
CC (gcc) [kamailio] core/rvalue.o
CC (gcc) [kamailio] core/receive.o
core/receive.c: In function 'receive_msg':
core/receive.c:300:2: warning: missing braces around initializer [-Wmissing-braces]
sr_net_info_t netinfo = {0};
^
core/receive.c:300:2: warning: (near initialization for 'netinfo.data') [-Wmissing-braces]
CC (gcc) [kamailio] core/timer_proc.o
CC (gcc) [kamailio] core/lock_ops.o
CC (gcc) [kamailio] core/counters.o
```
--
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/2636
Hello,
Kamailio SIP Server v5.4.4 stable release is out.
This is a maintenance release of the latest stable branch, 5.4, that
includes fixes since the release of v5.4.3. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.4.x. Deployments running previous v5.4.x
versions are strongly recommended to be upgraded to v5.4.4.
For more details about version 5.4.4 (including links and guidelines to
download the tarball or from GIT repository), visit:
 * https://www.kamailio.org/w/2021/02/kamailio-v5-4-4-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: 2664a51c35a1e8b5adc4c7e6cedde60bc01f0b28
URL: https://github.com/kamailio/kamailio/commit/2664a51c35a1e8b5adc4c7e6cedde60…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2021-02-11T17:27:44+02:00
Fixed typo.
---
Modified: src/modules/rr/doc/rr_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2664a51c35a1e8b5adc4c7e6cedde60…
Patch: https://github.com/kamailio/kamailio/commit/2664a51c35a1e8b5adc4c7e6cedde60…
---
diff --git a/src/modules/rr/doc/rr_admin.xml b/src/modules/rr/doc/rr_admin.xml
index a925014715..7dc08b7b5c 100644
--- a/src/modules/rr/doc/rr_admin.xml
+++ b/src/modules/rr/doc/rr_admin.xml
@@ -560,7 +560,7 @@ remove_record_route();
scheme (sip: or sips:), one is added based on routing requirements. Thus
the value has to be like "address:port;parameters", the port and
parameters are optional. If the second parameter is provided, do not
- forget to add the parameter "r2=0" so the proxy processes both
+ forget to add the parameter "r2=on" so the proxy processes both
corresponding Route headers at once.</para>
<para>When the <quote>outbound</quote> module was loaded before this
Module: kamailio
Branch: master
Commit: 5064ffc6490ed9db3f92a171e6b950fd0e8056e6
URL: https://github.com/kamailio/kamailio/commit/5064ffc6490ed9db3f92a171e6b950f…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-02-15T08:46:22+01:00
modules: readme files regenerated - secsipid ... [skip ci]
---
Modified: src/modules/secsipid/README
---
Diff: https://github.com/kamailio/kamailio/commit/5064ffc6490ed9db3f92a171e6b950f…
Patch: https://github.com/kamailio/kamailio/commit/5064ffc6490ed9db3f92a171e6b950f…
---
diff --git a/src/modules/secsipid/README b/src/modules/secsipid/README
index c125b689d6..87ed1f9287 100644
--- a/src/modules/secsipid/README
+++ b/src/modules/secsipid/README
@@ -30,6 +30,7 @@ Daniel-Constantin Mierla
3.2. timeout (int)
3.3. cache_dir (str)
3.4. cache_expire (int)
+ 3.5. modproc (str)
4. Functions
@@ -47,11 +48,12 @@ Daniel-Constantin Mierla
1.2. Set timeout parameter
1.3. Set cache_dir parameter
1.4. Set cache_expire parameter
- 1.5. secsipid_check_identity usage
- 1.6. secsipid_check_identity_pubkey usage
- 1.7. secsipid_get_url usage
- 1.8. secsipid_add_identity usage
- 1.9. Libsecsipid usage
+ 1.5. Set modproc parameter
+ 1.6. secsipid_check_identity usage
+ 1.7. secsipid_check_identity_pubkey usage
+ 1.8. secsipid_get_url usage
+ 1.9. secsipid_add_identity usage
+ 1.10. Libsecsipid usage
Chapter 1. Admin Guide
@@ -69,6 +71,7 @@ Chapter 1. Admin Guide
3.2. timeout (int)
3.3. cache_dir (str)
3.4. cache_expire (int)
+ 3.5. modproc (str)
4. Functions
@@ -89,6 +92,11 @@ Chapter 1. Admin Guide
It exports the functions to check and generate SIP Identity header.
+ Note that this module needs "secsipid_proc.so" module to be installed,
+ but without loading the "secsipid_proc.so" via "loadmodule". This
+ module loads "secsipid_proc.so" in child init callback in order to
+ initialize the "libsecsipid" per child process.
+
2. Dependencies
2.1. Kamailio Modules
@@ -96,14 +104,15 @@ Chapter 1. Admin Guide
2.1. Kamailio Modules
- The following modules must be loaded before this module:
- * No dependencies on other Kamailio modules.
+ The following modules must be installed (but not loaded) to use this
+ module:
+ * secsipid_proc.
2.2. External Libraries or Applications
The following libraries or applications must be installed before
running Kamailio with this module loaded:
- * libsecsipid - https://github.com/asipto/secsipidx/.
+ * none.
3. Parameters
@@ -111,6 +120,7 @@ Chapter 1. Admin Guide
3.2. timeout (int)
3.3. cache_dir (str)
3.4. cache_expire (int)
+ 3.5. modproc (str)
3.1. expire (int)
@@ -160,6 +170,17 @@ modparam("secsipid", "cache_dir", "/tmp/kamailio/secsipid")
modparam("secsipid", "cache_expire", 7200)
...
+3.5. modproc (str)
+
+ The name of or the path to the required per-process API module.
+
+ Default value is "secsipid_proc.so".
+
+ Example 1.5. Set modproc parameter
+...
+modparam("secsipid", "modproc", "secsipid_proc2.so")
+...
+
4. Functions
4.1. secsipid_check_identity(keyPath)
@@ -181,7 +202,7 @@ modparam("secsipid", "cache_expire", 7200)
This function can be used from ANY_ROUTE.
- Example 1.5. secsipid_check_identity usage
+ Example 1.6. secsipid_check_identity usage
...
request_route {
...
@@ -205,7 +226,7 @@ request_route {
This function can be used from ANY_ROUTE.
- Example 1.6. secsipid_check_identity_pubkey usage
+ Example 1.7. secsipid_check_identity_pubkey usage
...
request_route {
...
@@ -226,7 +247,7 @@ request_route {
This function can be used from ANY_ROUTE.
- Example 1.7. secsipid_get_url usage
+ Example 1.8. secsipid_get_url usage
...
request_route {
...
@@ -250,7 +271,7 @@ request_route {
This function can be used from ANY_ROUTE.
- Example 1.8. secsipid_add_identity usage
+ Example 1.9. secsipid_add_identity usage
...
request_route {
...
@@ -274,7 +295,7 @@ request_route {
installed and its environment configured, then run the following
commands:
- Example 1.9. Libsecsipid usage
+ Example 1.10. Libsecsipid usage
...
go get https://github.com/asipto/secsipidx
cd $GOPATH/src/github.com/asipto/secsipidx/csecsipid/
Module: kamailio
Branch: master
Commit: 25b1a51806dfa661f987958c8e84a16e60e37a4f
URL: https://github.com/kamailio/kamailio/commit/25b1a51806dfa661f987958c8e84a16…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-02-15T08:33:07+01:00
core: split function that locates a module file
---
Modified: src/core/sr_module.c
Modified: src/core/sr_module.h
---
Diff: https://github.com/kamailio/kamailio/commit/25b1a51806dfa661f987958c8e84a16…
Patch: https://github.com/kamailio/kamailio/commit/25b1a51806dfa661f987958c8e84a16…
---
diff --git a/src/core/sr_module.c b/src/core/sr_module.c
index a021cb92c3..0a7ba37848 100644
--- a/src/core/sr_module.c
+++ b/src/core/sr_module.c
@@ -376,44 +376,24 @@ static inline int version_control(void *handle, char *path)
}
/**
- * \brief load a sr module
+ * \brief lookup a module and fill the new path
*
- * tries to load the module specified by mod_path.
- * If mod_path is 'modname' or 'modname.so' then
- * \<MODS_DIR\>/\<modname\>.so will be tried and if this fails
- * \<MODS_DIR\>/\<modname\>/\<modname\>.so
- * If mod_path contain a '/' it is assumed to be the
- * path to the module and tried first. If fails and mod_path is not
- * absolute path (not starting with '/') then will try:
- * \<MODS_DIR\>/mod_path
* @param mod_path path or module name
+ * @param new_path resolved path to the module, must be pkg_free() if != mod_path
* @return 0 on success , <0 on error
*/
-int load_module(char* mod_path)
+int ksr_locate_module(char *mod_path, char **new_path)
{
- void* handle;
- char* error;
- mod_register_function mr;
- module_exports_t* exp;
- struct sr_module* t;
struct stat stat_buf;
str modname;
char* mdir;
char* nxt_mdir;
char* path;
int mdir_len;
- int len;
- int dlflags;
- int new_dlflags;
- int retries;
int path_type;
- str expref;
- char exbuf[64];
+ int len;
-#ifndef RTLD_NOW
-/* for openbsd */
-#define RTLD_NOW DL_LAZY
-#endif
+ *new_path = NULL;
path=mod_path;
path_type = 0;
modname.s = path;
@@ -523,6 +503,57 @@ int load_module(char* mod_path)
goto error;
}
}
+
+ LM_DBG("found module to load <%s>\n", path);
+ *new_path = path;
+ return 0;
+
+error:
+ if(path!=mod_path) {
+ pkg_free(path);
+ }
+
+ return -1;
+}
+
+/**
+ * \brief load a sr module
+ *
+ * tries to load the module specified by mod_path.
+ * If mod_path is 'modname' or 'modname.so' then
+ * \<MODS_DIR\>/\<modname\>.so will be tried and if this fails
+ * \<MODS_DIR\>/\<modname\>/\<modname\>.so
+ * If mod_path contain a '/' it is assumed to be the
+ * path to the module and tried first. If fails and mod_path is not
+ * absolute path (not starting with '/') then will try:
+ * \<MODS_DIR\>/mod_path
+ * @param mod_path path or module name
+ * @return 0 on success , <0 on error
+ */
+int load_module(char* mod_path)
+{
+ void* handle;
+ char* error;
+ mod_register_function mr;
+ module_exports_t* exp;
+ struct sr_module* t;
+ int dlflags;
+ int new_dlflags;
+ int retries;
+ char* path = NULL;
+ str expref;
+ char exbuf[64];
+ char* mdir;
+
+#ifndef RTLD_NOW
+/* for openbsd */
+#define RTLD_NOW DL_LAZY
+#endif
+
+ if(ksr_locate_module(mod_path, &path)<0) {
+ return -1;
+ }
+
LM_DBG("trying to load <%s>\n", path);
retries=2;
diff --git a/src/core/sr_module.h b/src/core/sr_module.h
index 1d3150b326..8de9026c2a 100644
--- a/src/core/sr_module.h
+++ b/src/core/sr_module.h
@@ -549,4 +549,6 @@ int destroy_modules_phase(void);
int ksr_shutdown_phase_init(void);
int ksr_shutdown_phase(void);
+int ksr_locate_module(char *mod_path, char **new_path);
+
#endif /* sr_module_h */