Hi,
When using dialog module and track_cseq_updates when needing to update CSeq for authenticated invites, if early media is present the CSeq in the Rack header is not also incremented.
Kamailio version:
version: kamailio 4.4.2 (x86_64/linux) 892ad6
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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: 892ad6
compiled on 11:18:36 Sep 28 2016 with gcc 5.4.0
--
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/801
Sipwise hat ON:
We have more than one server and we need to keep things in db in order to share sca subscription/appearance between servers
--
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/781
### Description
Newer rtpengine versions support manipulating SDP "a=" lines directly. Although kamailio is quite versatile when it comes to editing SIP message body, this functionality is often rather frail, especially when forking and having to use msg_apply_changes several times. I believe it would be beneficial to be able to offload such functionality to rtpengine, especially if one wants to apply different manipulations per outgoing branch.
### Expected behavior
There should be a way to issue rtpengine ng-control protocol commands compatible with the sdp-attr dictionary syntax.
#### Actual observed behavior
Currently sdp-attr tokens are not properly evaluated. For example, **doing**:
> rtpengine_manage("ICE=remove rtcp-mux-demux trust-address replace-origin replace-session-connection replace-SDP-version direction=internal direction=external sdp-attr-audio-substitute=$avp(fmtp_line) sdp-attr-audio-substitute=fmtp:101 0-15");
_[NOTE: $avp(fmtp_line) seems to expand in empty string here, which is a config error, but it doesn't affect the syntax demonstration in this example IMO]_
**results in**:
```
{
"supports": [ "load limit" ],
"sdp": "...",
"ICE": "remove",
"sdp-attr-audio-substitute": "",
"sdp-attr-audio-substitute": "fmtp:101",
"direction": [ "internal", "external" ],
"flags": [ "trust-address", "0-15" ],
"replace": [ "origin", "session-connection", "SDP-version" ],
"rtcp-mux": [ "demux" ],
"call-id": "...",
"received-from": [ "IP4", "..." ],
"from-tag": "...",
"to-tag": "...",
"command": "answer"
}
```
### Possible Solutions
Support the special syntax of sdp-attr as documented here: https://github.com/sipwise/rtpengine/blob/master/docs/ng_control_protocol.md
Here's one way to do it (I guess).
In order to get this:
```
"sdp-attr" :
{
"audio" :
{
"add" : [ "ptime:20", "sendrecv" ],
"substitute": [["fmtp:101 0-15" , "fmtp:126 0-16" ]]
},
"video":
{
"remove" : [ "rtpmap:101 telephone-event/8000" ]
},
"none" :
{
"substitute": [[ "sendrecv" , "sendonly" ], [ "ptime:20" , "ptime:40" ]]
}
}
```
Use a syntax similar to the following:
> rtpengine_manage("... sdp-attr-audio-add=ptime:20 sdp-attr-audio-add=sendrecv sdp-attr-audio-substitute=fmtp:101 0-15 sdp-attr-audio-substitute=fmtp:101 0-16 sdp-attr-video-remove=rtpmap:101 telephone-event/8000 sdp-attr-none-substitute=sendrecv sdp-attr-none-substitute=sendonly sdp-attr-none-substitute=ptime:20 sdp-attr-none-substitute=ptime:40 ...");
It's not very pretty, but it could work. Caveats:
* How to handle whitespace (e.g. there's a space in "fmtp:101 0-15" and in "rtpmap:101 telephone-event/8000" )
* substitute commands must always be in pairs, data type is a list of lists containing exactly two items as value in "substitute" key
Unfortunately my C skills are not up to this task, but if I can provide any other kind of help please let me know. Thanks!
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3509
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3509(a)github.com>
#### 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
- [ ] 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:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
This is a proposed evolution that adds socket timestamping of received UDP packets (using SO_TIMESTAMPNS).
It computes the delay between this timestamp and the time at which the packet is read by Kamailio.
This can then be accessed using pv "$TV(RD)" (RD for "receive relay").
Rationale :
The Kamailio server is handling traffic that is irregular and can temporarily spike to a point where all children are still busy when new packets are incoming on the network interface.
Consequently, these packets have to wait until a worker is available. The client will see a higher response time, that currently cannot be monitored by Kamailio itself.
This evolution allows to make this wait time observable by Kamailio, allowing to log or write the information to CDR for example.
If this is possible, I'd like to merge this feature in Kamailio.
Of course, I'm ready to discuss the PR and make any necessary changes.
All comments and reviews are most welcome.
I've tested this locally on Linux (3.10.0-957.10.1.el7.x86_64) with the latest Kamailio master as of 2023/03/23.
Thanks!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3404
-- Commit Summary --
* core: add socket timestamp of received packets and keep track of receive delay
* pv: add $TV(RD) to get the new information "receive delay"
-- File Changes --
M src/core/ip_addr.h (1)
M src/core/parser/msg_parser.h (1)
M src/core/receive.c (8)
M src/core/udp_server.c (60)
M src/core/ut.h (34)
M src/modules/pv/pv_time.c (15)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3404.patchhttps://github.com/kamailio/kamailio/pull/3404.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3404
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3404(a)github.com>
<!--
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
Currently the functions set_advertised_address and set_advertised_port only accept strings as parameters. Trying to use it with variable causes an error.
Having the function using a hard coded value is not a good practice and in order to add flexibility to the script in different installations it would be nice to have this function accepting variables.
Also, the 'advertise' option on the 'listen' parameter is not always desired because it apply for all messages sent via the socket, and there are situations where different advertised IP for the same interface are necessary.
### Expected behavior
set_advertised_address should receive a variable as parameter and use its value to change the SIP headers.
### Actual observed behavior
Kamailio won't start if set_advertised_address is used with a variable due to script parse error or it will set the SIP message with the literal string "$var(test)" for example, instead of using the value of $var(test).
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
# kamailio -v
version: kamailio 5.2.2 (x86_64/linux) 67f967
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 67f967
compiled on 11:40:41 Mar 11 2019 with gcc 4.8.5
```
* **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`)
-->
```
# uname -a
Linux voice-conn-kamailio-1 3.10.0-514.21.2.el7.x86_64 #1 SMP Tue Jun 20 12:24:47 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/2137
Use tcp_send_timeout config option also on listening socket to timeout outbound messages sent on passive inbound connections.
#### 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
- [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
- [x] Related to issue #3443
#### Description
Based on the description of core parameter "tcp_send_timeout" the timeout should also work for sending on forked incoming tcp connections. But sending on a broken connection causes the kernel to use the default values of `tcp_retries1` and `tcp_retries2` , leading to try to send a SIP message for 15 minutes. This makes absolutely no sense in a real time kamailio application.
Following man 7 tcp TCP_USER_TIMEOUT can be used on recent Linux kernels to utilize tcp_send_timeout:
TCP_USER_TIMEOUT (since Linux 2.6.37)
This option takes an unsigned int as an argument. When the value is greater than 0, it specifies the maximum
amount of time in milliseconds that transmitted data may remain unacknowledged before TCP will forcibly close the
corresponding connection and return ETIMEDOUT to the application. If the option value is specified as 0, TCP will
use the system default.
Increasing user timeouts allows a TCP connection to survive extended periods without end-to-end connectivity. De‐
creasing user timeouts allows applications to "fail fast", if so desired. Otherwise, failure may take up to 20
minutes with the current system defaults in a normal WAN environment.
This option can be set during any state of a TCP connection, but is effective only during the synchronized states
of a connection (ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK). Moreover, when used
with the TCP keepalive (SO_KEEPALIVE) option, TCP_USER_TIMEOUT will override keepalive to determine when to close
a connection due to keepalive failure.
The option has no effect on when TCP retransmits a packet, nor when a keepalive probe is sent.
This option, like many others, will be inherited by the socket returned by accept(2), if it was set on the listen‐
ing socket.
Further details on the user timeout feature can be found in RFC 793 and RFC 5482 ("TCP User Timeout Option").
Having a tcp connection break by firewall or network breakdown the retransmits to this destination are now aborted after `tcp_send_timeout` seconds with a
NOTICE: <core> [core/tcp_read.c:267]: tcp_read_data(): error reading: Connection timed out (110) ([1.2.3.4]:51151 ->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3528
-- Commit Summary --
* core: Add TCP_USER_TIMEOUT socket option on listening socket.
-- File Changes --
M src/core/tcp_main.c (13)
M src/core/tcp_options.h (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3528.patchhttps://github.com/kamailio/kamailio/pull/3528.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3528
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3528(a)github.com>
>From http://lists.kamailio.org/pipermail/sr-dev/2016-August/036231.html
On 24/08/16 10:17, Andreas Granig wrote:
> Hi,
>
> When translating strings with the dialplan module, you sometimes end up
> with very complex patterns for sanitizing the target string and
> performing some replacements, since for a given dialplan id, processing
> stops on the first match within the dialplan entries for a given dpid.
>
> The idea is to introduce a "continue" flag (default 0) in the dialplan
> table indicating to proceed with processing further dialplan entries
> within the given dpid after a match. The use case is to have a sanitize
> rule with highest priority which e.g. removes any spaces, dashes and
> parentheses from the target string, then with a lower priority do
> further processing with the cleaned up string, e.g. stripping leading
> double-zeroes or a plus when normalizing to E164 numbers, or replacing a
> single leading zero with the country code and so on.
>
> This is particularly useful when a user dials a number from an address
> book of some sort (e.g. on a mobile app) where number formats are stored
> with country-specific formating characters like "+1-(234)-567 890", and
> catching all of that in one rule results in really messy match/replace
> patterns.
--
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/764