Module: kamailio
Branch: master
Commit: 8c59f8e782381811b1afb6a75b8b8c9fa6959933
URL: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-15T17:31:21+01:00
modules: readme files regenerated - app_python3 ... [skip ci]
---
Modified: src/modules/app_python3/README
---
Diff: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
Patch: https://github.com/kamailio/kamailio/commit/8c59f8e782381811b1afb6a75b8b8c9…
---
diff --git a/src/modules/app_python3/README b/src/modules/app_python3/README
index f59291a078..914350572b 100644
--- a/src/modules/app_python3/README
+++ b/src/modules/app_python3/README
@@ -195,9 +195,9 @@ python_exec("my_python_function", "$rU");
in each worker when it next invokes a Python method. The module uses a
worker process lock to prevent recursive reloads.
- This function only reloads the user script and creates a new script
- object. It does not reinitialize the interpreter. E.g., references in
- the old module remain if not redefined by the new version.
+ This function only reloads (re-executes) the user script and creates a
+ new script object. It does not reinitialize the interpreter (references
+ in the old module remain if not redefined by the new version).
Name: app_python.reload
@@ -208,6 +208,24 @@ python_exec("my_python_function", "$rU");
kamcmd app_python.reload
...
+ Note that reload is done for the Python script provided as parameter to
+ this Kamailio module. To reload the Python libraries imported in this
+ script, use something like:
+...
+import mod1
+...
+import modN
+from importlib import reload
+
+def mod_init():
+ reload(mod1)
+ ...
+ reload(modN)
+ return kamailio()
+...
+
+ Where "modX" are the modules imported at the top.
+
5.2. app_python.api_list
List the functions available via Kemi framework.
Module: kamailio
Branch: master
Commit: 34d60608bea449ab7258a5d88894651303b80adf
URL: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-11-15T17:24:23+01:00
app_python3: docs - added note about how Python modules used in script can be reloaded
---
Modified: src/modules/app_python3/doc/app_python3_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
Patch: https://github.com/kamailio/kamailio/commit/34d60608bea449ab7258a5d88894651…
---
diff --git a/src/modules/app_python3/doc/app_python3_admin.xml b/src/modules/app_python3/doc/app_python3_admin.xml
index 0f4c63ffd0..67f6058020 100644
--- a/src/modules/app_python3/doc/app_python3_admin.xml
+++ b/src/modules/app_python3/doc/app_python3_admin.xml
@@ -203,12 +203,12 @@ python_exec("my_python_function", "$rU");
<para>
Marks the need to reload the Python script.
The actual reload is done in each worker when it next invokes a Python method.
- The module uses a worker process lock to prevent recursive reloads.
+ The module uses a worker process lock to prevent recursive reloads.
</para>
<para>
- This function only reloads the user script and creates a new script object.
- It does not reinitialize the interpreter.
- E.g., references in the old module remain if not redefined by the new version.
+ This function only reloads (re-executes) the user script and creates
+ a new script object. It does not reinitialize the interpreter (references
+ in the old module remain if not redefined by the new version).
</para>
<para>
Name: <emphasis>app_python.reload</emphasis>
@@ -222,6 +222,28 @@ python_exec("my_python_function", "$rU");
&kamcmd; app_python.reload
...
</programlisting>
+ <para>
+ Note that reload is done for the Python script provided as parameter
+ to this &kamailio; module. To reload the Python libraries imported
+ in this script, use something like:
+ </para>
+ <programlisting format="linespecific">
+...
+import mod1
+...
+import modN
+from importlib import reload
+
+def mod_init():
+ reload(mod1)
+ ...
+ reload(modN)
+ return kamailio()
+...
+ </programlisting>
+ <para>
+ Where "modX" are the modules imported at the top.
+ </para>
</section>
<section id="app_python3.r.api_list">
<title>
Hello,
as some of you may know from previous announcements, a few of us meet
tomorrow and the day after in Dusseldorf at sipgate.de for a Kamailio
development event. Should anyone want to join remotely, we can make
available a video conference bridge.
Join if you want to work together to add new features to Kamailio or
help improving existing tools and documentation. It is not an event for
discussing about Kamailio or how to use it.
Reply to this email (can be only to me this time) if you want to join
remotely and eventually provide the time you think you would be around
and, if you have something in mind, what you would like to work on. You
can also join if you don't have already something to work on, you can
become part of another team and help them.
You will receive privately the details of how to join the video
conference room.
Tomorrow we plan to to start the day around 10:30 Berlin time zone (UTC
+ 1), probably wrapping up around 17:00. The schedule for Thursday will
be given tomorrow once it is decided.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: 5ecae10fabb5da1911c7a7843ba3fb595bfb39e0
URL: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-11-10T12:01:36+01:00
modules: readme files regenerated - dialog ... [skip ci]
---
Modified: src/modules/dialog/README
---
Diff: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
Patch: https://github.com/kamailio/kamailio/commit/5ecae10fabb5da1911c7a7843ba3fb5…
---
diff --git a/src/modules/dialog/README b/src/modules/dialog/README
index d850087b7f..06e279ec4f 100644
--- a/src/modules/dialog/README
+++ b/src/modules/dialog/README
@@ -1814,7 +1814,7 @@ if(dlg_get_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
Meaning of the parameters is as follows:
* callid - SIP call-id.
* ftag - SIP From tag.
- * ttag - SIP To tag.
+ * ttag - SIP To tag. Use "" value to indicate early dialog.
* name - key name of the $dlg_var.
* value - string value to store at $dlg_var(name).
@@ -1827,6 +1827,11 @@ if(dlg_set_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
{
xdbg("set $$dlg_var(test):$var(tmp)\n");
}
+# you can set vars in early dialog too
+if(dlg_set_var("$var(ci)", "$var(ft)", "", "test", "$var(tmp)"))
+{
+ xdbg("set $$dlg_var(test):$var(tmp)\n");
+}
...
7.15. is_known_dlg()
<!--
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 -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
#### Description
support setting vars for non established dialogs
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3277
-- Commit Summary --
* dialog: dlg_set_var() support empty totag parameter
* dialog: add a note for early dialogs in dlg_set_var()
-- File Changes --
M src/modules/dialog/dialog.c (8)
M src/modules/dialog/doc/dialog_admin.xml (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3277.patchhttps://github.com/kamailio/kamailio/pull/3277.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3277
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3277(a)github.com>
Hello,
are there any objections to extend the https://github.com/kamailio/kamailio-docker packages to support some environment variables to allow some customization?
* add a run.sh script
* evaluate SHM_MEMORY and PKG_MEMORY variables
* set "-M" and "-m" parameters appropriately for startup
The shared memory pool can be set in the kamailio.cfg, but AFAIK the private memory pool not. Additionally using environment variables would be the common way that is used also in other well-known packages. If no variable is set, the default would be used.
Thanks,
Henning
Module: kamailio
Branch: master
Commit: 065a83fbb1a8b9b1912aadecff039a485c2d46dd
URL: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-29T09:31:37+02:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
Patch: https://github.com/kamailio/kamailio/commit/065a83fbb1a8b9b1912aadecff039a4…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 9d4287804f..abf41a6d85 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -1206,7 +1206,9 @@ With congestion control the formula becomes :
set is chosen.
* limit - the maximum number of items to be stored in XAVP list for
further fail-overs (the first selected destination and default
- destination are the first to be put in the list)
+ destination are the first to be put in the list). This can improve
+ the performance especially if you are using a large list of
+ gateways.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
Module: kamailio
Branch: master
Commit: 0dc7d711c4c2d16d532862344f9ccd629de38e20
URL: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:17:10Z
dispatcher: small docs extensions regarding to ds_select_dst
---
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
Patch: https://github.com/kamailio/kamailio/commit/0dc7d711c4c2d16d532862344f9ccd6…
---
diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 1c9de29ba78..022c915e139 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1399,7 +1399,8 @@ With congestion control the formula becomes :
<emphasis>limit</emphasis> - the maximum number of items to be
stored in XAVP list for further fail-overs (the first selected
destination and default destination are the first to be put in
- the list)
+ the list). This can improve the performance especially if you
+ are using a large list of gateways.
</para>
</listitem>
</itemizedlist>
Module: kamailio
Branch: master
Commit: 9b4d4d059e6222a64a9b9cadb0b867bea27ed0d8
URL: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:15:10Z
dispatcher: small spelling fix in comment
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
Patch: https://github.com/kamailio/kamailio/commit/9b4d4d059e6222a64a9b9cadb0b867b…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index 8f06f6f5cbb..66ebd19996e 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2065,7 +2065,7 @@ int ds_select_dst(struct sip_msg *msg, int set, int alg, int mode)
* Set destination address from group 'set' selected with alogorithm 'alg'
* - the rest of addresses in group are added as next destination in xavps,
* up to the 'limit'
- * - mode specify to set address in R-URI or outboud proxy
+ * - mode specify to set address in R-URI or outbound proxy
*
*/
int ds_select_dst_limit(sip_msg_t *msg, int set, int alg, uint32_t limit,
Module: kamailio
Branch: master
Commit: e7e2366634f7b56136b11d4b196150467a18b651
URL: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-10-29T07:14:57Z
core: small spelling fix in comment
---
Modified: src/core/parser/msg_parser.h
---
Diff: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
Patch: https://github.com/kamailio/kamailio/commit/e7e2366634f7b56136b11d4b1961504…
---
diff --git a/src/core/parser/msg_parser.h b/src/core/parser/msg_parser.h
index 595c1be8957..d582ddf7200 100644
--- a/src/core/parser/msg_parser.h
+++ b/src/core/parser/msg_parser.h
@@ -110,7 +110,7 @@ typedef enum request_method {
#define FL_MSG_NOREPLY (1<<23) /*!< do not send sip reply for request */
#define FL_SIPTRACE (1<<24) /*!< message to be traced in stateless replies */
#define FL_ROUTE_ADDR (1<<25) /*!< request has Route address for next hop */
-#define FL_USE_OTCPID (1<<26) /*!< request to be routed using outboud tcp con id */
+#define FL_USE_OTCPID (1<<26) /*!< request to be routed using outbound tcp con id */
/* WARNING: Value (1 << 28) is reserved for use in kamailio call_control
* module (flag FL_USE_CALL_CONTROL )! */
Module: kamailio
Branch: master
Commit: 77840e465e1e074ede44fbc262faa850e1c4f862
URL: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-10-27T10:16:43+02:00
modules: readme files regenerated - app_python3 ... [skip ci]
---
Modified: src/modules/app_python3/README
---
Diff: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
Patch: https://github.com/kamailio/kamailio/commit/77840e465e1e074ede44fbc262faa85…
---
diff --git a/src/modules/app_python3/README b/src/modules/app_python3/README
index 49bc577444..f59291a078 100644
--- a/src/modules/app_python3/README
+++ b/src/modules/app_python3/README
@@ -87,6 +87,11 @@ Chapter 1. Admin Guide
module, look at the files inside the source tree located at
'modules/app_python3/python_examples/'.
+ Note: if symbols exported to KEMI (module or function names) conflict
+ with Python's reserved keywords, use the 'getattr()' function or the
+ '__dict__' attribute for 'KSR' (e.g.,
+ 'KSR.__dict__["async"].task_route("myroute")').
+
2. Dependencies
2.1. Kamailio Modules
Module: kamailio
Branch: master
Commit: 0d6d434a92ae69cf1e503f07ffa6f46a9948593e
URL: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-27T10:07:36+02:00
app_python3: note about kemi symbols and python reserved words
---
Modified: src/modules/app_python3/doc/app_python3_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
Patch: https://github.com/kamailio/kamailio/commit/0d6d434a92ae69cf1e503f07ffa6f46…
---
diff --git a/src/modules/app_python3/doc/app_python3_admin.xml b/src/modules/app_python3/doc/app_python3_admin.xml
index c2648c48c82..0f4c63ffd04 100644
--- a/src/modules/app_python3/doc/app_python3_admin.xml
+++ b/src/modules/app_python3/doc/app_python3_admin.xml
@@ -34,6 +34,11 @@
this module, look at the files inside the source tree located at
'modules/app_python3/python_examples/'.
</para>
+ <para>
+ Note: if symbols exported to KEMI (module or function names) conflict
+ with Python's reserved keywords, use the 'getattr()' function or the
+ '__dict__' attribute for 'KSR' (e.g., 'KSR.__dict__["async"].task_route("myroute")').
+ </para>
</section>
<section>
<title>Dependencies</title>
### Description
Using the KEMI async module in Python is not possible, since the `async` word is a reserved word in Python3. This leads to a syntax error.
#### Reproduction
```python
import KSR
KSR.async.task_route("")
```
### Possible Solutions
The below code works, but not sure if this is a right approach to this issue.
`KSR.__dict__["async"].task_route("my_route")`
### Additional Information
```
version: kamailio 5.6.1 (x86_64/linux) b36a13
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: b36a13
compiled on 10:06:47 Oct 25 2022 with gcc 10.2.1
```
```
Linux b0fe2a764c5e 5.10.124-linuxkit #1 SMP Thu Jun 30 08:19:10 UTC 2022 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3272
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3272(a)github.com>
Hi,
maybe im wrong, but it seems the sipt module is not implemented in KEMI Framework.
Is it planned? :)
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3264
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3264(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
- [ ] 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 -->
Adding add_uri_param method to kemi
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3268
-- Commit Summary --
* siputils: adding add_uri_param to kemi
-- File Changes --
M src/modules/siputils/siputils.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3268.patchhttps://github.com/kamailio/kamailio/pull/3268.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3268
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3268(a)github.com>