<!-- 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
- [ ] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2409
-- Commit Summary --
* Added compression for rtpengine
-- File Changes --
M src/modules/rtpengine/Makefile (2)
A src/modules/rtpengine/compress.c (71)
A src/modules/rtpengine/compress.h (27)
M src/modules/rtpengine/config.c (3)
M src/modules/rtpengine/config.h (1)
M src/modules/rtpengine/rtpengine.c (64)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2409.patchhttps://github.com/kamailio/kamailio/pull/2409.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/2409
<!--
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
Consider the following setup: an edge proxy is configured with the path module, double rr is enabled (because the proxy is multihomed), add_path_received() is used to cope with NATted endpoints and the registrar is a separate kamailio instance residing on a private network. Contacts are saved successfully by the registrar, along with path information. INVITEs are first sent to the registrar which performs location lookup, and forwards the request based on the contact's Path. This part works as expected.
However, things seem to fail when using the new keepalive functionality of the usrloc module on the registrar. The OPTIONS request is forwarded to the "received" parameter of the first Route header instead of the URI of the first Route header.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### 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).
-->
EXAMPLES (check the first line printed by sngrep for L3/L4 info, public IPs have been censored):
1) INVITE is routed to $route_uri, ignoring the "received" parameter when doing a loose_route():
```
2020/08/18 19:58:29.918672 172.30.154.189:5060 -> 172.28.155.1:5060
INVITE sip:voip-test-user-04@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 172.30.154.189;branch=z9hG4bKa788.302fa172e9b1851973593c7f20d3586d.0
Route: <sip:172.28.155.1;lr;received=sip:2.2.2.2:5060;r2=on>,<sip:3.3.3.3;lr;received=sip:2.2.2.2:5060;r2=on>
Via: SIP/2.0/UDP 172.30.152.3:5060;branch=z9hG4bK104f503d
Max-Forwards: 69
From: "sbcpub-stage-test-01" <sip:1234567890@sip.domain>;tag=as77e25748
To: <sip:voip-test-user-04@sip.domain>
Contact: <sip:1234567890@172.30.152.3:5060>
Call-ID: 53d1089c6bc695875816e25a49da8a29(a)sip.domain
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
X-CID: ac32e4ae-580e164d(a)172.17.173.14
Remote-Party-ID: "sbcpub-stage-test-01" <sip:1234567890@sip.domain>;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 346
X-Called-Username: voip-test-user-04
v=0
o=root 18222507 18222507 IN IP4 172.30.152.3
c=IN IP4 172.30.152.3
t=0 0
m=audio 16106 RTP/AVP 9 8 0 18 101
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
```
2) OPTIONS is routed to "received" value of first Route header when doing keepalives using the usrloc module:
```
2020/08/18 19:58:02.450949 172.30.154.189:5060 -> 2.2.2.2:5064
OPTIONS sip:voip-test-user-05@172.17.173.36:5064 SIP/2.0
Via: SIP/2.0/UDP 172.30.154.189:5060;branch=z9hG4bKx.1.1.0
Route: <sip:172.30.155.1;lr;received=sip:2.2.2.2:5064;r2=on>,<sip:3.3.3.3:6050;lr;received=sip:2.2.2.2:5064;r2=on>
From: <sip:conn-revival@sip.domain>;tag=uloc-5f3be864-5d75-2-8617a458-5f3c089a-6e141-1.1
To: <sip:voip-test-user-05@sip.domain>
Call-ID: ksrulka-1.1
CSeq: 80 OPTIONS
Content-Length: 0
```
#### usrloc entries
The location entries for the examples above are as follows:
```
AoR: voip-test-user-04
Contacts: {
Contact: {
Address: sip:voip-test-user-04@2.2.2.2:5060
Expires: 47
Q: -1.000000
Call-ID: 34b4a487df71412e8e93a7a1c358d723
CSeq: 54
User-Agent: PolycomVVX-VVX_250-UA/6.3.0.14929
Received: sip:2.2.2.2:5060
Path: <sip:172.28.155.1;lr;received=sip:2.2.2.2:5060;r2=on>,<sip:3.3.3.3;lr;received=sip:2.2.2.2:5060;r2=on>
State: CS_DIRTY
Flags: 0
CFlags: 128
Socket: udp:172.30.154.189:5060
Methods: 8159
Ruid: uloc-5f3bf3b8-65c3-b7
Instance: [not set]
Reg-Id: 0
Server-Id: 0
Tcpconn-Id: -1
Keepalive: 0
Last-Keepalive: 1597771086
KA-Roundtrip: 0
Last-Modified: 1597771086
}
}
AoR: voip-test-user-05
Contacts: {
Contact: {
Address: sip:voip-test-user-05@172.17.173.36:5064
Expires: 88
Q: -1.000000
Call-ID: 3279de38-f6ae2c18(a)172.17.173.36
CSeq: 17174
User-Agent: Cisco/SPA525G2-7.6.2e
Received: sip:2.2.2.2:5064
Path: <sip:172.30.155.1;lr;received=sip:2.2.2.2:5064;r2=on>,<sip:3.3.3.3:6050;lr;received=sip:2.2.2.2:5064;r2=on>
State: CS_DIRTY
Flags: 0
CFlags: 128
Socket: udp:172.30.154.189:5060
Methods: 6815
Ruid: uloc-5f3be864-5d75-2
Instance: [not set]
Reg-Id: 0
Server-Id: 0
Tcpconn-Id: -1
Keepalive: 0
Last-Keepalive: 1597771100
KA-Roundtrip: 0
Last-Modified: 1597771100
}
}
```
### Possible Solutions
There are two ways I can thing of to mitigate this:
* Modify the path module so that the received parameter is only set for the first Path header, which corresponds to the interface the request was received on. I believe this is the preferred way to deal with this, as I don't see the point in adding ";received" to both path entries when performing double "r2" path injection.
* Or, make usrloc keepalive behave the same way as loose_route(). It seems loose_route will only honour the ";received=" parameter in a Route header only if it's the last remaining one? I'm not sure this is how it works, but somehow I get the desired behaviour with loose_route()
On a sidenote, usrloc locally generated OPTIONS do not seem to be handled by the local-request event route. Is this intentional? AFAICT it would require engaging the tm module which will add some overhead...
<!--
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.4.0 (x86_64/linux)
```
built with this patch: https://github.com/kamailio/kamailio/commit/19128f2121d8b859a6a546dfdf2c085…
* **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 sbcpub0-stage-lhe0-cn1 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) 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/2447
<!-- 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)
- [ ] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2445
-- Commit Summary --
* uac: added uac_event_callback for kemi
-- File Changes --
M src/modules/uac/doc/uac_admin.xml (32)
M src/modules/uac/uac.c (3)
M src/modules/uac/uac_send.c (40)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2445.patchhttps://github.com/kamailio/kamailio/pull/2445.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/2445
<!-- 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
- [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:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [X] 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 -->
The keepalive functionality of the usrloc module seems to produce invalid messages when a location contact has Path information set. This should fix the issue.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2446
-- Commit Summary --
* Fix missing "Route" header name in usrloc keepalive msgs
-- File Changes --
M src/modules/usrloc/ul_keepalive.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2446.patchhttps://github.com/kamailio/kamailio/pull/2446.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/2446