denyspozniak created an issue (kamailio/kamailio#4314)
### Description
The code below causes Kamailio to crash when sending a simple OPTIONS request.
I agree that this is not the most proper way to call the sl function,
but it's probably worth paying attention to this issue.
#### Reproduction
```import sys
import KSR as KSR
def mod_init():
return kamailio()
class kamailio:
def __init__(self):
KSR.info('== kamailio init ==\n')
def child_init(self, rank):
return 0
def ksr_request_route(self, msg):
KSR.x.modf("sl_send_reply", "200", "OK");
return 1
```
#### Debugging Data
[(gdb) bt full.txt](https://github.com/user-attachments/files/21149798/gdb.bt.full.tx…
[(gdb) info locals.txt](https://github.com/user-attachments/files/21149836/gdb.info.loc…
```
(gdb) list
154 in sl_funcs.c
```
#### Log Messages
```
Program received signal SIGSEGV, Segmentation fault.
sl_reply_helper (msg=msg@entry=0x7ffff6fada80, code=200, reason=reason@entry=0x7ffff75d2070 "OK", tag=tag@entry=0x0) at sl_funcs.c:159
159 sl_funcs.c: No such file or directory.
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.1.0-dev1 (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, MEM_JOIN_FREE, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_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 9.4.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4314
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4314(a)github.com>
tsearle created an issue (kamailio/kamailio#4308)
while rtpengine_subscribe_request is the correct method name in kemi, when using the kamailio scripting engine the correct name is rtpengine_subscribe_offer
the documentation for the module needs to be updated to reflect this
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4308
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4308(a)github.com>
<!-- Kamailio Pull Request Template -->
#### 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)
- [x] 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
- [x] Related to issue #4308
#### Description
the method rtpengine_subscribe_offer has been renamed to rtpengine_subscribe_request to align with the method exposed to kemi as well as to match the name of the actual control message in rtpengine
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4312
-- Commit Summary --
* rtpengine: revert documentation change for rtpengine_subscribe
* rtpengine: make rtpengine_subscribe_request align with kemi name
-- File Changes --
M src/modules/rtpengine/doc/rtpengine_admin.xml (16)
M src/modules/rtpengine/rtpengine.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4312.patchhttps://github.com/kamailio/kamailio/pull/4312.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4312
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4312(a)github.com>
Module: kamailio
Branch: master
Commit: 30a65e34bb2d240cd3cfa22779ef0f5f575388ec
URL: https://github.com/kamailio/kamailio/commit/30a65e34bb2d240cd3cfa22779ef0f5…
Author: Torrey Searle <torrey.searle(a)wavecrest.com>
Committer: tsearle <tsearle(a)gmail.com>
Date: 2025-07-09T13:04:03+02:00
rtpengine: revert documentation change for rtpengine_subscribe
---
Modified: src/modules/rtpengine/doc/rtpengine_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/30a65e34bb2d240cd3cfa22779ef0f5…
Patch: https://github.com/kamailio/kamailio/commit/30a65e34bb2d240cd3cfa22779ef0f5…
---
diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml
index 6d079f0bfaa..463386b5878 100644
--- a/src/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/src/modules/rtpengine/doc/rtpengine_admin.xml
@@ -3252,9 +3252,9 @@ rtpengine_manage();
</programlisting>
</example>
</section>
- <section id="rtpengine.f.rtpengine_subscribe_offer">
+ <section id="rtpengine.f.rtpengine_subscribe_request">
<title>
- <function moreinfo="none">rtpengine_subscribe_offer(flags,sdp_avp,to_tag_avp,stream_xavp[,via-branch])</function>
+ <function moreinfo="none">rtpengine_subscribe_request(flags,sdp_avp,to_tag_avp,stream_xavp[,via-branch])</function>
</title>
<para>
Generates &sdp; body for forking the current &rtp; stream and stores it in the
@@ -3266,7 +3266,7 @@ rtpengine_manage();
</para>
<para>
The function will return true on success and false (-1) on various failures,
- like using rtpengine_subscribe_offer() before an rtpengine session was established.
+ like using rtpengine_subscribe_request() before an rtpengine session was established.
</para>
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
@@ -3365,7 +3365,7 @@ rtpengine_manage();
This function can be used from ANY_ROUTE.
</para>
<example>
- <title><function>rtpengine_subscribe_offer</function> usage</title>
+ <title><function>rtpengine_subscribe_request</function> usage</title>
<programlisting format="linespecific">
route {
...
@@ -3383,7 +3383,7 @@ onreply_route[1]
...
if (has_body("application/sdp")) {
rtpengine_answer();
- rtpengine_subscribe_offer("all siprec", "$avp(siprec_offer)",
+ rtpengine_subscribe_request("all siprec", "$avp(siprec_offer)",
"$avp(siprec_to_tag)", "siprec_streams");
xinfo("SIPREC participant $xavp(siprec_streams[0]=>tag) with label $xavp(siprec_streams[0]=>label[0])\n");
xinfo("SIPREC participant $xavp(siprec_streams[1]=>tag) with label $xavp(siprec_streams[0]=>label[0])\n");
@@ -3460,7 +3460,7 @@ onreply_route[1] {
<itemizedlist>
<listitem><para>
<emphasis>to-tag=...</emphasis> - value of the to tag returned by
- <quote>rtpengine_subscribe_offer</quote>
+ <quote>rtpengine_subscribe_request</quote>
</para></listitem>
<listitem><para>
<emphasis>from-tag=...</emphasis> - value of the from tag of the original call.
@@ -3474,7 +3474,7 @@ onreply_route[1] {
<example>
<title><function>rtpengine_subscribe_answer</function> usage</title>
<para>
- See rtpengine_subscribe_offer() function example above for example.
+ See rtpengine_subscribe_request() function example above for example.
</para>
</example>
</section>
@@ -3505,7 +3505,7 @@ onreply_route[1] {
<itemizedlist>
<listitem><para>
<emphasis>to-tag=...</emphasis> - value of the to tag returned by
- <quote>rtpengine_subscribe_offer</quote>
+ <quote>rtpengine_subscribe_request</quote>
</para></listitem>
<listitem><para>
<emphasis>from-tag=...</emphasis> - value of the from tag of the original call.