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/…
[View More]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.
[View Less]
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://…
[View More]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>
[View Less]
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 …
[View More]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
[View Less]
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/…
[View More]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()
[View Less]