Module: sip-router
Branch: 3.2
Commit: 08390a9a79e111e2d22533476d397dd9a92744ac
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=08390a9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Oct 17 18:42:39 2011 +0200
dialplan: added sample records to readme
- added note about limitation in using pseudo-variables in replacement
expressions
---
modules/dialplan/README | 32 ++++++++++++++++++++++++
modules/dialplan/doc/dialplan_admin.xml | 40 +++++++++++++++++++++++++++++-
2 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/modules/dialplan/README b/modules/dialplan/README
index 3036a3f..95f2950 100644
--- a/modules/dialplan/README
+++ b/modules/dialplan/README
@@ -78,6 +78,7 @@ Juha Heinanen
1.12. Set fetch_rows parameter
1.13. dp_translate usage
1.14. dp_translate usage
+ 1.15. Example of rules
Chapter 1. Admin Guide
@@ -456,6 +457,37 @@ xlog("translated to var $var(y) \n");
the complete database documentation on the project webpage,
http://www.kamailio.org/docs/db-tables/kamailio-db-devel.html.
+ Some sample records fromd dialplan table are presented in the next
+ figure.
+
+ Example 1.15. Example of rules
+...
+dpid: 1
+pr: 1
+match_op: 1
+match_exp: ^0([1-9][0-9]+)$
+match_len: 0
+subst_exp: ^0([1-9][0-9]+)$
+repl_exp: 0049\1
+attrs: xyz
+...
+dpid: 1
+pr: 1
+match_op: 1
+match_exp: ^0([1-9][0-9]+)$
+match_len: 0
+subst_exp: ^0(.+)$
+repl_exp: $var(prefix)\1
+attrs: xyz
+...
+
+ Note that you can use config variables in the replacement expression
+ (repl_exp) field. However, not all of config variables are safe to use
+ there - specifically the variables that have in their name other
+ variables (variables with dinamic name). References to sip message,
+ private variables ($var(...)) and AVPs with static name are among those
+ that are safe to use in replacement expressions.
+
Chapter 2. Developer's Guide
The module does not provide any API to use in other Kamailio modules.
diff --git a/modules/dialplan/doc/dialplan_admin.xml b/modules/dialplan/doc/dialplan_admin.xml
index 9e9610b..398b934 100644
--- a/modules/dialplan/doc/dialplan_admin.xml
+++ b/modules/dialplan/doc/dialplan_admin.xml
@@ -563,12 +563,48 @@ xlog("translated to var $var(y) \n");
<section>
<title>Installation</title>
<para>
- The modules requires one table in &kamailio; database: dialplan. The SQL
- syntax to create them can be found in dialplan-create.sql
+ The modules requires one table in &kamailio; database: dialplan.
+ The SQL syntax to create them can be found in dialplan-create.sql
script in the database directories in the kamailio/scripts folder.
You can also find the complete database documentation on the
project webpage, &kamailiodbdocslink;.
</para>
+ <para>
+ Some sample records fromd dialplan table are presented in the next
+ figure.
+ </para>
+ <example>
+ <title>Example of rules</title>
+ <programlisting format="linespecific">
+...
+dpid: 1
+pr: 1
+match_op: 1
+match_exp: ^0([1-9][0-9]+)$
+match_len: 0
+subst_exp: ^0([1-9][0-9]+)$
+repl_exp: 0049\1
+attrs: xyz
+...
+dpid: 1
+pr: 1
+match_op: 1
+match_exp: ^0([1-9][0-9]+)$
+match_len: 0
+subst_exp: ^0(.+)$
+repl_exp: $var(prefix)\1
+attrs: xyz
+...
+ </programlisting>
+ </example>
+ <para>
+ Note that you can use config variables in the replacement expression
+ (repl_exp) field. However, not all of config variables are safe to use
+ there - specifically the variables that have in their name other
+ variables (variables with dinamic name). References to sip message,
+ private variables ($var(...)) and AVPs with static name are among
+ those that are safe to use in replacement expressions.
+ </para>
</section>
</chapter>
Hello,
tomorrow is the day to release the new major version 3.2.0. Since
involves creation of a new branch on GIT repository and some adjustments
to the packaging, the plan is to start in the morning with the
preparations. If any developer has something left to commit, please do
it before 9:00am GMT.
Afterwards it is very likely that the branch 3.2 will be created and
there will be need for backport (which is fine as well). Then by 14:00
GMT the 3.2 branch should be frozen completely to start packaging the
release. From than moment on until the release is announced, please send
an email to sr-dev in case anyone wants to commit to branch 3.2.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda