Module: sip-router
Branch: master
Commit: 948e083f7c681b9aaa8729aea019ebea3ee1ac2c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=948e083…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Wed May 13 14:57:26 2009 +0200
@ruri.params["foo"] checks also the original sip: URI parameters
This patch increases the compatibility with non-standard implementations when the parameters are added to the end of the sip: URI
instead of the userinfo part in case of a tel: URI embedded in a sip: URI.
For example:
sip:123@domain;foo=bar;user=phone
instead of
sip:123;foo=bar@domain;user=phone
---
select_core.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/select_core.c b/select_core.c
index 68a1b37..ffe874d 100644
--- a/select_core.c
+++ b/select_core.c
@@ -806,6 +806,7 @@ int select_uri_proto(str* res, select_t* s, struct sip_msg* msg)
int select_uri_params(str* res, select_t* s, struct sip_msg* msg)
{
+ int ret;
if (!msg || !res) {
return select_any_params(res, s, msg);
}
@@ -817,7 +818,16 @@ int select_uri_params(str* res, select_t* s, struct sip_msg* msg)
RETURN0_res(uri.params);
*res=uri.params;
- return select_any_params(res, s, msg);
+ ret = select_any_params(res, s, msg);
+ if ((ret < 0)
+ && (uri.sip_params.s != NULL)
+ && (uri.sip_params.s != uri.params.s)
+ ) {
+ /* Search also in the original sip: uri parameters. */
+ *res = uri.sip_params;
+ ret = select_any_params(res, s, msg);
+ }
+ return ret;
}
int select_any_params(str* res, select_t* s, struct sip_msg* msg)
Hello,
I am wondering whether I can add a new parameter (or possibly
parameters) to the sip_uri structure because of performance reasons.
There are some parameter values that need to be accessed frequently, and
having a short-cut to them would be very good, otherwise the linked list
for the parameters is always constructed and freed.
The current request is for the "rn" parameter from RFC 4694 which may be
checked as frequently as ruri.user in certain deployments. If the memory
usage is a concern then I can also introduce a #define statement,
something like URI_PARAM_SHORTCUTS.
Thanks,
Miklos
Module: sip-router
Branch: master
Commit: 205c28ae0de03703fedf235d27f5244a45e3b1d1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=205c28a…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Wed May 13 08:51:27 2009 +0200
typo correction
---
modules_s/cfg_rpc/README | 2 +-
modules_s/cfg_rpc/doc/rpc.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_s/cfg_rpc/README b/modules_s/cfg_rpc/README
index 7e457da..c3cdc80 100644
--- a/modules_s/cfg_rpc/README
+++ b/modules_s/cfg_rpc/README
@@ -33,7 +33,7 @@ Miklos Tirpak
accepts three parameters: group name, variable name, string value.
* cfg_rpc.commit - Commit the previously prepared configuration
changes. The function does not have any parameters.
- * cfg_rpc.rollback - Drop the prepared configuration changed. The
+ * cfg_rpc.rollback - Drop the prepared configuration changes. The
function does not have any parameters.
* cfg_rpc.get - Get the value of a configuration variable. The
function accepts two parameters: group name, variable name.
diff --git a/modules_s/cfg_rpc/doc/rpc.xml b/modules_s/cfg_rpc/doc/rpc.xml
index eb1e8a0..9307c0a 100644
--- a/modules_s/cfg_rpc/doc/rpc.xml
+++ b/modules_s/cfg_rpc/doc/rpc.xml
@@ -52,7 +52,7 @@
<listitem>
<para>
<emphasis>cfg_rpc.rollback</emphasis> - Drop the prepared
- configuration changed. The function does not have any
+ configuration changes. The function does not have any
parameters.
</para>
</listitem>
Hi, which would be the best example of an already ported Kamailio module? I
mean a Kamailio module that has been *fully* ported (this involves using the
"new"/definitive MI system and so on). I know that there are some K module
ported but they still use the K MI functions.
Thanks a lot.
--
Iñaki Baz Castillo <ibc(a)aliax.net>