Module: kamailio
Branch: master
Commit: cb5295234a1b106473c3fdb9ff25c23bfc9fbcd1
URL: https://github.com/kamailio/kamailio/commit/cb5295234a1b106473c3fdb9ff25c23…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-03T09:06:38+01:00
sl: docs for send_reply_error()
---
Modified: src/modules/sl/doc/sl_functions.xml
---
Diff: https://github.com/kamailio/kamailio/commit/cb5295234a1b106473c3fdb9ff25c23…
Patch: https://github.com/kamailio/kamailio/commit/cb5295234a1b106473c3fdb9ff25c23…
---
diff --git a/src/modules/sl/doc/sl_functions.xml b/src/modules/sl/doc/sl_functions.xml
index 11ef4706755..8f2715b7a00 100644
--- a/src/modules/sl/doc/sl_functions.xml
+++ b/src/modules/sl/doc/sl_functions.xml
@@ -130,7 +130,7 @@ send_reply_mode("403", "Invalid user - $fU", "3");
</title>
<para>
Sends back an error reply describing the nature of the last
- internal error. Usually this function should be used after a
+ internal error. Usually this function should be used after a
script function that returned an error code.
</para>
<example>
@@ -174,6 +174,29 @@ sl_reply_error();
if(status=="408")
sl_forward_reply("404", "Not found");
...
+</programlisting>
+ </example>
+ </section>
+
+ <section id="sl.f.send_reply_error">
+ <title>
+ <function moreinfo="none">send_reply_error()</function>
+ </title>
+ <para>
+ For the current request, the internal error code reply is sent back
+ stateful or stateless, depending of the <acronym>TM</acronym> module:
+ if a transaction exists for the current request, then the reply is sent
+ statefully, otherwise stateless.
+ </para>
+ <para>
+ It can be used from REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
+ </para>
+ <example>
+ <title><function>send_reply_error</function> usage</title>
+ <programlisting format="linespecific">
+...
+send_reply_error();
+...
</programlisting>
</example>
</section>
### Description
This new code in pdttree.c is not correct for this new pdt mode, it just print's a debug log instead of error. The return value should be 0 instead of 1 in case _pdt_mode is 1 otherwise it will still not start.
<code>
if(_pdt_mode & 1) {
LM_DBG("prefix already allocated [%.*s/[%.*s] - ignoring\n",
sp->len, sp->s, sd->len, sd->s);
return -1;
} else {
LM_ERR("prefix already allocated [%.*s/[%.*s]\n", sp->len, sp->s,
sd->len, sd->s);
return -1;
}
</code>
### Troubleshooting
#### Reproduction
#### Debugging Data
#### Log Messages
#### SIP Traffic
### Possible Solutions
### Additional Information
* **Operating System**:
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3626
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3626(a)github.com>