introduce proper code indentation in examples
<!-- 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/4278
-- Commit Summary --
* rtpengine: fix formatting of subscribe/unsubscribe examples
-- File Changes --
M src/modules/rtpengine/doc/rtpengine_admin.xml (153)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4278.patchhttps://github.com/kamailio/kamailio/pull/4278.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4278
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4278(a)github.com>
Module: kamailio
Branch: master
Commit: a0a92fa6e829bdc2ef8f1e537cf9209ada32ef0b
URL: https://github.com/kamailio/kamailio/commit/a0a92fa6e829bdc2ef8f1e537cf9209…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2025-06-10T15:16:10+02:00
modules: readme files regenerated - pdb ... [skip ci]
---
Modified: src/modules/pdb/README
---
Diff: https://github.com/kamailio/kamailio/commit/a0a92fa6e829bdc2ef8f1e537cf9209…
Patch: https://github.com/kamailio/kamailio/commit/a0a92fa6e829bdc2ef8f1e537cf9209…
---
diff --git a/src/modules/pdb/README b/src/modules/pdb/README
index 0c2ec72e122..d5c1c1fa16a 100644
--- a/src/modules/pdb/README
+++ b/src/modules/pdb/README
@@ -38,7 +38,7 @@ Muhammad Shahzad Shafi
4. Functions
- 4.1. pdb_query (string query, string dstavp)
+ 4.1. pdb_query (string query, string dstpv)
5. RPC Commands
@@ -76,7 +76,7 @@ Chapter 1. Admin Guide
4. Functions
- 4.1. pdb_query (string query, string dstavp)
+ 4.1. pdb_query (string query, string dstpv)
5. RPC Commands
@@ -163,24 +163,24 @@ modparam("pdb", "ll_info", 3)
4. Functions
- 4.1. pdb_query (string query, string dstavp)
+ 4.1. pdb_query (string query, string dstpv)
-4.1. pdb_query (string query, string dstavp)
+4.1. pdb_query (string query, string dstpv)
Sends the query string to all configured servers and stores the answer
- in dstavp. If it takes more than the configured timeout, false is
- returned. Pseudo-variables or AVPs can be used for the query string.
- The answer must consist of the null terminated query string followed by
- a two byte integer value in network byte order. The integer value will
- be stored in the given AVP.
+ in dstvp. If it takes more than the configured timeout, false is
+ returned. In addition to a string, any pseudo-variable can be used as
+ query. The answer must consist of the null terminated query string
+ followed by a two byte integer value in network byte order. The integer
+ value will be stored in the given pseudo-variable dstvp.
Example 1.4. pdb_query usage
...
# query external service for routing information
-if (!pdb_query("$rU", "$avp(i:82)"))
- $avp(i:82) = 0; # default routing
+if (!pdb_query("$rU", "$avp(routing)"))
+ $avp(routing) = 0; # default routing
}
-cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id");
+cr_route("$avp(routing)", "$rd", "$rU", "$rU", "call_id");
...
5. RPC Commands
Module: kamailio
Branch: master
Commit: ae133c0765c01827b172f2c3e38e2d33d5cdcd6b
URL: https://github.com/kamailio/kamailio/commit/ae133c0765c01827b172f2c3e38e2d3…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2025-06-10T13:14:55Z
pdb: remove AVP references completely, add some doxygen notes for helper function
---
Modified: src/modules/pdb/pdb.c
---
Diff: https://github.com/kamailio/kamailio/commit/ae133c0765c01827b172f2c3e38e2d3…
Patch: https://github.com/kamailio/kamailio/commit/ae133c0765c01827b172f2c3e38e2d3…
---
diff --git a/src/modules/pdb/pdb.c b/src/modules/pdb/pdb.c
index 1add3e1a075..eb6731d4ce7 100644
--- a/src/modules/pdb/pdb.c
+++ b/src/modules/pdb/pdb.c
@@ -216,7 +216,7 @@ int ki_pdb_query(sip_msg_t *_msg, str *number, str *dstvar)
*
* @param _msg the current SIP message
* @param _number the phone number to query
- * @param _dstavp the name of the AVP where to store the result
+ * @param _dstvar the name of the pv where to store the result
*
* @return 1 on success, -1 on failure
*/
@@ -234,7 +234,13 @@ int pdb_query(sip_msg_t *_msg, str *_number, str *_dstvar)
/*!
- * \return 1 if query for the number succeeded and the avp with the corresponding carrier id was set,
+ * Helper function for queries
+ *
+ * @param _msg the current SIP message
+ * @param number the phone number to query
+ * @param dstvar the name of the pv where to store the result
+ *
+ * @return 1 if query for the number succeeded and the pv with the corresponding carrier id was set,
* -1 otherwise
*/
int ki_pdb_query_helper(sip_msg_t *_msg, str *number, pv_spec_t *dvar)
@@ -495,7 +501,7 @@ int pdb_query_fixup(void **arg, int arg_no)
return -1;
}
} else if(arg_no == 2) {
- /* destination avp name */
+ /* destination pv name */
if(fixup_pvar_null(arg, 1) != 0) {
LM_ERR("cannot fixup parameter %d\n", arg_no);
return -1;
Module: kamailio
Branch: master
Commit: 7be5b4c96561430c6d5ec528dcceb5ffba56f7c6
URL: https://github.com/kamailio/kamailio/commit/7be5b4c96561430c6d5ec528dcceb5f…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2025-06-10T13:14:34Z
pdb: remove AVP references completely in docs, improve example
---
Modified: src/modules/pdb/doc/pdb_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7be5b4c96561430c6d5ec528dcceb5f…
Patch: https://github.com/kamailio/kamailio/commit/7be5b4c96561430c6d5ec528dcceb5f…
---
diff --git a/src/modules/pdb/doc/pdb_admin.xml b/src/modules/pdb/doc/pdb_admin.xml
index f638a29ed32..797fd510d82 100644
--- a/src/modules/pdb/doc/pdb_admin.xml
+++ b/src/modules/pdb/doc/pdb_admin.xml
@@ -124,27 +124,27 @@ modparam("pdb", "ll_info", 3)
<title>Functions</title>
<section>
<title>
- <function moreinfo="none">pdb_query (string query, string dstavp)</function>
+ <function moreinfo="none">pdb_query (string query, string dstpv)</function>
</title>
<para>
Sends the query string to all configured servers and stores the answer in
- dstavp. If it takes more than the configured timeout, false is returned.
+ dstvp. If it takes more than the configured timeout, false is returned.
In addition to a string, any pseudo-variable can be used as query.
The answer must consist of the null terminated query string followed by
a two byte integer value in network byte order. The integer value will
- be stored in the given pseudo-variable dstavp.
+ be stored in the given pseudo-variable dstvp.
</para>
<example>
<title><function>pdb_query</function> usage</title>
<programlisting format="linespecific">
...
# query external service for routing information
-if (!pdb_query("$rU", "$avp(i:82)"))
- $avp(i:82) = 0; # default routing
+if (!pdb_query("$rU", "$avp(routing)"))
+ $avp(routing) = 0; # default routing
}
-cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id");
+cr_route("$avp(routing)", "$rd", "$rU", "$rU", "call_id");
...
</programlisting>
</example>
<!-- 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)
- [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 -->
- [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 -->
Added support for KEMI API in PDB module.
Here is example usage in KEMI Python.
```
if not (KSR.pdb.pdb_query(KSR.pv.gete("$var(pdb_user)"), "$avp(carrier_id)") > 0):
KSR.err(F"""[{HERE()}]: PDB query failed for user '{KSR.pv.get("$var(pdb_user)")}' \n""")
else:
KSR.info(F""" PDB query return carrier_id = '{KSR.pv.getw("$avp(carrier_id)")}' \n""")
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4265
-- Commit Summary --
* pdb: added KEMI support for PDB module
-- File Changes --
M src/modules/pdb/pdb.c (339)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4265.patchhttps://github.com/kamailio/kamailio/pull/4265.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4265
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4265(a)github.com>
Module: kamailio
Branch: master
Commit: 5897af3dd46cb1167dc1493c83c79fb57ad7d6d0
URL: https://github.com/kamailio/kamailio/commit/5897af3dd46cb1167dc1493c83c79fb…
Author: Muhammad Shafi <muhammad.shafi(a)1und1.de>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2025-06-10T15:05:56+02:00
pdb: updated documentation
---
Modified: src/modules/pdb/doc/pdb_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5897af3dd46cb1167dc1493c83c79fb…
Patch: https://github.com/kamailio/kamailio/commit/5897af3dd46cb1167dc1493c83c79fb…
---
diff --git a/src/modules/pdb/doc/pdb_admin.xml b/src/modules/pdb/doc/pdb_admin.xml
index 50fb4190dae..f638a29ed32 100644
--- a/src/modules/pdb/doc/pdb_admin.xml
+++ b/src/modules/pdb/doc/pdb_admin.xml
@@ -130,11 +130,11 @@ modparam("pdb", "ll_info", 3)
Sends the query string to all configured servers and stores the answer in
dstavp. If it takes more than the configured timeout, false is returned.
- Pseudo-variables or AVPs can be used for the query string.
+ In addition to a string, any pseudo-variable can be used as query.
The answer must consist of the null terminated query string followed by
a two byte integer value in network byte order. The integer value will
- be stored in the given AVP.
+ be stored in the given pseudo-variable dstavp.
</para>
<example>
<title><function>pdb_query</function> usage</title>
tsearle created an issue (kamailio/kamailio#4273)
### Description
For forking media and sip rec flows the following rtpengine commands need to be exposed
* subscribe reqeust
* subscribe answer
* unsubscribe
currently these commands are only exposed for internal api use.
This patch exposes these commands in both kemi and the kamailio scripting language
### Possible Solutions
merge the corresponding pr
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.0.1 (aarch64/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-NOSMP, 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 12.2.0```
* **Operating System**:
```
Linux dev-ew1-blue-app-208 6.1.0-37-cloud-arm64 #1 SMP Debian 6.1.140-1 (2025-05-22) aarch64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4273
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4273(a)github.com>
add rtpengine_subscribe_request rtpengine_subscribe_answer and rtpengine_unsubscribe methods to both th cfg and kemi interfaces
#### 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)
- [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
- [x] Related to issue #4273
#### Description
new kemi and cfg script commands added. existing internal api modifed in a backwards compatible way (though no means of testing this)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4274
-- Commit Summary --
* rtpengine: add support for commands needed for siprec
-- File Changes --
M src/modules/rtpengine/rtpengine.c (542)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4274.patchhttps://github.com/kamailio/kamailio/pull/4274.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4274
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4274(a)github.com>
fix compile warning introduced by #4250
<!-- 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, ...)
- [ ] 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 -->
- [x] 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/4277
-- Commit Summary --
* tm: fix compile warning in uac.c
-- File Changes --
M src/modules/tm/uac.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4277.patchhttps://github.com/kamailio/kamailio/pull/4277.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4277
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4277(a)github.com>
tsearle created an issue (kamailio/kamailio#4249)
### Description
I'm trying to make a SIP Rec callflow using t_uac_send to Generate the INVITE and BYE. This automatically generates the ACK in response to the 200 OK. I want to be able to use tm:local-request to do 2 things.
* Add a Contact header to the ACK
* Save Route/Callid/CSeq etc so I can generate an in-dialog bye afterwards.
### Expected behavior
tm:local-request gets called so I can save the relevant headers & modify the outgoing ack
#### Actual observed behavior
tm:local-request does not get called
### Possible Solutions
the associated PR adds this functionality
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.0.1 (aarch64/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-NOSMP, 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 on 06:24:22 May 22 2025 with gcc 12.2.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4249
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4249(a)github.com>
<!-- 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
- [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 #4247
<!--Describe your changes in detail -->
- Add debug log when trying to ping a node.
Do not ping manually disabled nodes!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4248
-- Commit Summary --
* rtpengine: Add check for skipping pings on manually disabled nodes.
-- File Changes --
M src/modules/rtpengine/rtpengine.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4248.patchhttps://github.com/kamailio/kamailio/pull/4248.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4248
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4248(a)github.com>