Module: sip-router
Branch: master
Commit: 826d4a56f2ffb95bb7d23886e3e4248eee9147fa
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=826d4a5…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed May 13 13:52:51 2009 +0200
lcr: added ser RPC support
- copied & adapted lcr_rpc.[ch] from the ser version of lcr.
- register the rpc array from mod_init if RPC_SUPPORT is defined
(defined by default in lcr_rpc.h unless lcr is compiled with
-DNO_RPC_SUPPORT).
- init db for all the children if RPC_SUPPORT is defined
(needed for xmlrpc which does not run in a separate process)
- moved some defines, structs and typedefs from lcr_mod.c to lcr_mod.h.
---
modules/lcr/lcr_mod.c | 62 ++++++++++++--------
modules/lcr/lcr_mod.h | 27 ++++++++
modules/lcr/lcr_rpc.c | 158 +++++++++++++++++++++++++++++++++++++++++++++++++
modules/lcr/lcr_rpc.h | 43 +++++++++++++
4 files changed, 265 insertions(+), 25 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=826…
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)