Module: sip-router
Branch: master
Commit: f7b5a333d29579a700d636787550ff1430a58189
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f7b5a33…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sun Feb 27 06:54:44 2011 +0200
modules/dialplan: change in dp_translate return code
- dp_translate now returns -2 (instead of -1) if dp with given id does
not exist.
---
modules/dialplan/README | 3 +++
modules/dialplan/dialplan.c | 2 +-
modules/dialplan/doc/dialplan_admin.xml | 4 ++++
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules/dialplan/README b/modules/dialplan/README
index cf9d9d5..e03067d 100644
--- a/modules/dialplan/README
+++ b/modules/dialplan/README
@@ -334,6 +334,9 @@ modparam("dialplan", "fetch_rows", 4000)
with dialplan ID equal to id. If dest is missing, only matching and
storing of matching rule's attributes is done.
+ Returns 1, if translation succeeded, -1 in case of some error occurred,
+ and -2 if dialplan with ID equal to id does not exist.
+
Meaning of the parameters is as follows:
* id -the dialplan id of the possible matching rules. This parameter
can have the following types:
diff --git a/modules/dialplan/dialplan.c b/modules/dialplan/dialplan.c
index 4c86778..16050cc 100644
--- a/modules/dialplan/dialplan.c
+++ b/modules/dialplan/dialplan.c
@@ -326,7 +326,7 @@ static int dp_translate_f(struct sip_msg* msg, char* str1, char* str2)
if ((idp = select_dpid(dpid)) ==0 ){
LM_DBG("no information available for dpid %i\n", dpid);
- return -1;
+ return -2;
}
repl_par = (str2!=NULL)? ((dp_param_p)str2):default_par2;
diff --git a/modules/dialplan/doc/dialplan_admin.xml b/modules/dialplan/doc/dialplan_admin.xml
index ac9a84d..43c418b 100644
--- a/modules/dialplan/doc/dialplan_admin.xml
+++ b/modules/dialplan/doc/dialplan_admin.xml
@@ -365,6 +365,10 @@ modparam("dialplan", "fetch_rows", 4000)
missing, only matching and storing of matching rule's
attributes is done.
</para>
+ <para>
+ Returns 1, if translation succeeded, -1 in case of some error
+ occurred, and -2 if dialplan with ID equal to id does not exist.
+ </para>
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#115 - bug in dialplan or core re.c
User who did this - Juha Heinanen (jh)
Reason for closing: Fixed
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=115
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#115 - bug in dialplan or core re.c
User who did this - Juha Heinanen (jh)
----------
i have made the tests with latest 3.1 from git. here is what happens with subst_exp ^(.+:)\+358(.+) and input uri sip:+35892345674@test.fi using various repl_exps:
- if repl_exp is \1\2, i get what is expected, i.e., both \1 and \2 are replaced and consumed:
Feb 22 09:40:39 sip /usr/sbin/sip-proxy[7323]: INFO: uri <sip:92345674@test.fi>
- if repl_exp is \1X\2, \1 is replaced but not consumed and i get:
Feb 22 09:42:48 sip /usr/sbin/sip-proxy[7484]: INFO: uri <sip:\1X92345674@test.fi>
- if repl_exp is \1X\2Y, i get
Feb 22 09:44:50 sip /usr/sbin/sip-proxy[7642]: INFO: uri <sip:\1X92345674@test.fiY>
i.e., \2 is correctly replaced and consumed, but again \1 is replaced, but not consumed.
-- juha
Feb 22 09:44:16 sip /usr/sbin/sip-proxy[7481]: INFO: pai_uri <sip:\1X92345674@test.fi>
Feb 22 09:44:51 sip /usr/sbin/sip-proxy[7640]: NOTICE: Discarding unmatched CANCEL to <sip:032345670@test.fi>
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=115#comment166
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 1147c09665a05d4af5f1b48764a78fb47649a930
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1147c09…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Feb 26 20:26:54 2011 +0100
siputils: readme updated
- updated the description of the functions that can be used in ANY_ROUTE
---
modules_k/siputils/README | 12 +++++++-----
modules_k/siputils/doc/siputils_admin.xml | 8 +++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/modules_k/siputils/README b/modules_k/siputils/README
index e37d933..23ccd30 100644
--- a/modules_k/siputils/README
+++ b/modules_k/siputils/README
@@ -24,6 +24,10 @@ Gabriel Vasile
FhG FOKUS
+Juha Heinanen
+
+ TutPro Inc.
+
Edited by
Jan Janak
@@ -424,7 +428,7 @@ if (is_user("john")) {
Check if To header field uri contains tag parameter.
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
Example 1.13. has_totag usage
...
@@ -613,8 +617,7 @@ reply_route[2] {
The function returns true if the two parameters matches as SIP URI.
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE and BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
Example 1.23. cmp_uri usage
...
@@ -629,8 +632,7 @@ if(cmp_uri("$ru", "sip:kamailio@kamailio.org"))
The function returns true if the two parameters matches as AoR. The
parameters have to be SIP URIs.
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE and BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
Example 1.24. cmp_aor usage
...
diff --git a/modules_k/siputils/doc/siputils_admin.xml b/modules_k/siputils/doc/siputils_admin.xml
index 8511da9..fd8ec1d 100644
--- a/modules_k/siputils/doc/siputils_admin.xml
+++ b/modules_k/siputils/doc/siputils_admin.xml
@@ -375,7 +375,7 @@ if (is_user("john")) {
Check if To header field uri contains tag parameter.
</para>
<para>
- This function can be used from REQUEST_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>has_totag</function> usage</title>
@@ -684,8 +684,7 @@ reply_route[2] {
the two parameters matches as SIP URI.
</para>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE and BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>cmp_uri</function> usage</title>
@@ -710,8 +709,7 @@ if(cmp_uri("$ru", "sip:kamailio@kamailio.org"))
URIs.
</para>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE and BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>cmp_aor</function> usage</title>