<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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 #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
There was a typo that generated an error when compling in debug mode.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1367
-- Commit Summary --
* typo fix
-- File Changes --
M src/core/events.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1367.patchhttps://github.com/kamailio/kamailio/pull/1367.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/1367
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:
* http://lists.sip-router.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.sip-router.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), you can delete the text of
the template and only 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.
-->
After upgrading from 5.0 to 5.1.0, the use_domain parameter of the group module doesn't seem to work properly. The configuration file was not changed for the upgrade.
### Troubleshooting
#### Reproduction
Verified proper configuration
```
#!define WITH_GROUP
...
#!ifdef WITH_MULTIDOMAIN
#!define MULTIDOMAIN 1
#!else
#!define MULTIDOMAIN 0
#!endif
...
#!ifdef WITH_GROUP
# ----- group params -----
modparam("group", "db_url", DBURL)
modparam("group", "use_domain", MULTIDOMAIN)
#!endif
```
#### 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).
-->
The actual phone number has been replaced by `+1NXXNXXXXXX` below.
```
kamailio[5663]: DEBUG: <core> [core/select.c:412]: run_select(): Calling SELECT 0x7f072eecf700
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 12 chars, out: 12 chars
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 3 chars, out: 3 chars
kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 0 chars, out: 0 chars
kamailio[5663]: DEBUG: db_postgres [km_dbase.c:248]: db_postgres_submit_query(): sending query ok: 0x7f072efefca0 (2) - [select grp from grp where username='+1NXXNXXXXXX' AND grp='did' AND domain='']
kamailio[5663]: DEBUG: <core> [db_res.c:119]: db_new_result(): allocate 56 bytes for result set at 0x7f072efce170
kamailio[5663]: DEBUG: db_postgres [km_dbase.c:530]: db_postgres_store_result(): 0x7f072efefca0 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x14f5d00)
kamailio[5663]: DEBUG: db_postgres [km_res.c:95]: db_postgres_get_columns(): 1 columns returned from the query
kamailio[5663]: DEBUG: <core> [db_res.c:156]: db_allocate_columns(): allocate 8 bytes for result names at 0x7f072f065478
kamailio[5663]: DEBUG: <core> [db_res.c:167]: db_allocate_columns(): allocate 4 bytes for result types at 0x7f072f065118
kamailio[5663]: DEBUG: db_postgres [km_res.c:112]: db_postgres_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f072efef9e8
kamailio[5663]: DEBUG: db_postgres [km_res.c:119]: db_postgres_get_columns(): RES_NAMES(0x7f072efef9e8)[0]=[grp]
kamailio[5663]: DEBUG: db_postgres [km_res.c:154]: db_postgres_get_columns(): use DB1_STRING result type
kamailio[5663]: DEBUG: db_postgres [km_res.c:200]: db_postgres_convert_rows(): no rows returned from the query
kamailio[5663]: DEBUG: group [group.c:182]: is_user_in_helper(): user is not in group 'did'
```
#### 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).
-->
Since the group isn't found with the domain, the call is rejected (but the SIP traffic isn't an issue here).
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.0 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 18:49:15 Dec 11 2017 with gcc 7.2.1
```
* **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`)
-->
```
Linux example.com 4.14.3-300.fc27.x86_64 #1 SMP Mon Dec 4 17:18:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1363
#### 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)
- [ ] 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 -->
Hi there!
So my case, and why I did not use the existing code:
- incoming INVITE to a user with 2 records in usrloc (1st - UDP, 2nd - TLS)
- some time before lookup, TLS connect of 2nd device is closed, but usrloc record still exists (it going to be removed in the next iteration of timer)
- after lookup(location) - 2 branches are created
- send to 1st - UDP succeed
- send to 2nd - TLS failed. And here is my headache.
-- I want to send push notification to this device
-- I set t_on_branch_failure
-- if I try failure_exec_mode=1 - I get control, and I am able to send push, but I need to wait until fr_timer fire (I wanted not to wait, and send immediately)
The idea of changes:
- usrloc -> get_urecord: if t_contact has tcpcon_id & connection is not alive => mark record as expired
- as a result, in the registrar, while lookup, this contact will fail VALID_CONTACT - and will not be returned to the scriptwriter.
All of this is wrapped by handle_lost_tcp parameter (that is 0 by default), so changes are extending of handle_lost_tcp parameter of usrloc. Checked doc for usrloc, and seems to me that current description of this parameter should be untouched.
Marked as expired contact will be removed by timer as usual.
Open for discussion, and thanks in advance.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1366
-- Commit Summary --
* usrloc: extend handle_lost_tcp use for get_urecord
* usrloc: extend handle_lost_tcp, do not use inline functions
-- File Changes --
M src/modules/usrloc/udomain.c (15)
M src/modules/usrloc/urecord.c (4)
M src/modules/usrloc/urecord.h (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1366.patchhttps://github.com/kamailio/kamailio/pull/1366.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/1366
Module: kamailio
Branch: master
Commit: cea7270c7607bb9ca58667f6322f20629e5d2338
URL: https://github.com/kamailio/kamailio/commit/cea7270c7607bb9ca58667f6322f206…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-12-14T13:08:02+01:00
pkg/kamailio/deb: version set to 5.2.0~dev2
---
Modified: pkg/kamailio/deb/buster/changelog
Modified: pkg/kamailio/deb/debian/changelog
Modified: pkg/kamailio/deb/jessie/changelog
Modified: pkg/kamailio/deb/precise/changelog
Modified: pkg/kamailio/deb/sid/changelog
Modified: pkg/kamailio/deb/stretch/changelog
Modified: pkg/kamailio/deb/trusty/changelog
Modified: pkg/kamailio/deb/wheezy/changelog
Modified: pkg/kamailio/deb/xenial/changelog
---
Diff: https://github.com/kamailio/kamailio/commit/cea7270c7607bb9ca58667f6322f206…
Patch: https://github.com/kamailio/kamailio/commit/cea7270c7607bb9ca58667f6322f206…
---
diff --git a/pkg/kamailio/deb/buster/changelog b/pkg/kamailio/deb/buster/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/buster/changelog
+++ b/pkg/kamailio/deb/buster/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/debian/changelog b/pkg/kamailio/deb/debian/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/debian/changelog
+++ b/pkg/kamailio/deb/debian/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/jessie/changelog b/pkg/kamailio/deb/jessie/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/jessie/changelog
+++ b/pkg/kamailio/deb/jessie/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/precise/changelog b/pkg/kamailio/deb/precise/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/precise/changelog
+++ b/pkg/kamailio/deb/precise/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/sid/changelog b/pkg/kamailio/deb/sid/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/sid/changelog
+++ b/pkg/kamailio/deb/sid/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/stretch/changelog b/pkg/kamailio/deb/stretch/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/stretch/changelog
+++ b/pkg/kamailio/deb/stretch/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/trusty/changelog b/pkg/kamailio/deb/trusty/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/trusty/changelog
+++ b/pkg/kamailio/deb/trusty/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/wheezy/changelog b/pkg/kamailio/deb/wheezy/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/wheezy/changelog
+++ b/pkg/kamailio/deb/wheezy/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
diff --git a/pkg/kamailio/deb/xenial/changelog b/pkg/kamailio/deb/xenial/changelog
index ee14ead055..9c23511c6e 100644
--- a/pkg/kamailio/deb/xenial/changelog
+++ b/pkg/kamailio/deb/xenial/changelog
@@ -1,3 +1,9 @@
+kamailio (5.2.0~dev2) UNRELEASED; urgency=medium
+
+ * version set to 5.2.0-dev2
+
+ -- Victor Seva <vseva(a)debian.org> Thu, 14 Dec 2017 13:07:23 +0100
+
kamailio (5.2.0~dev1) unstable; urgency=medium
* version set to 5.2.0-dev1
Module: kamailio
Branch: 5.0
Commit: 89baecd169ce6a0ee0a084eb17dd8a7ea674b960
URL: https://github.com/kamailio/kamailio/commit/89baecd169ce6a0ee0a084eb17dd8a7…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-12-14T12:46:25+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/registrar/README
---
Diff: https://github.com/kamailio/kamailio/commit/89baecd169ce6a0ee0a084eb17dd8a7…
Patch: https://github.com/kamailio/kamailio/commit/89baecd169ce6a0ee0a084eb17dd8a7…
---
diff --git a/src/modules/registrar/README b/src/modules/registrar/README
index 036e44356f..32fe34657f 100644
--- a/src/modules/registrar/README
+++ b/src/modules/registrar/README
@@ -980,7 +980,8 @@ if (registered("location","$rz:$Au", 2)) {
This makes sense only in multiple replicated servers scenarios.
Meaning of the parameters is as follows:
- * hdr_name - header name to be used.
+ * hdr_name - header name to be used, it can be a static string or
+ contain variables.
This function can be used from REQUEST_ROUTE.
@@ -1140,6 +1141,7 @@ event_route[usrloc:contact-expired] {
* regid - reg-id value
* instance - instance value
* conid - TCP socket internal connection ID ($null if UDP)
+ * server_id - server_id value
The pseudo-variable accepts positive index value to access a specific
contact record.