Module: sip-router
Branch: sr_3.0
Commit: 16f622e118daeffa2547243eeaf4d42c03f84b05
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=16f622e…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Henning Westerholt <henning.westerholt(a)1und1.de>
Date: Mon Oct 19 12:46:17 2009 +0300
Fixed carrierroute module exports.
See
http://lists.sip-router.org/pipermail/sr-dev/2009-October/004393.html thread for a
complete description
(cherry picked from commit ca28401667bcf8d65d942fdb29033eadb6bb82b2)
---
modules/carrierroute/carrierroute.c | 6 +++---
modules/carrierroute/cr_func.c | 23 +++++++++++++++++++++++
modules/carrierroute/cr_func.h | 9 +++++++++
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/modules/carrierroute/carrierroute.c b/modules/carrierroute/carrierroute.c
index ab91609..56a76ea 100644
--- a/modules/carrierroute/carrierroute.c
+++ b/modules/carrierroute/carrierroute.c
@@ -87,11 +87,11 @@ static void mod_destroy(void);
/************* Module Exports **********************************************/
static cmd_export_t cmds[]={
{"cr_user_carrier", (cmd_function)cr_load_user_carrier, 3,
cr_load_user_carrier_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
- {"cr_route", (cmd_function)cr_route, 5, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
+ {"cr_route", (cmd_function)cr_route5, 5, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
{"cr_route", (cmd_function)cr_route, 6, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
- {"cr_prime_route", (cmd_function)cr_prime_route, 5, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
+ {"cr_prime_route", (cmd_function)cr_prime_route5, 5, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
{"cr_prime_route", (cmd_function)cr_prime_route, 6, cr_route_fixup,
0, REQUEST_ROUTE | FAILURE_ROUTE },
- {"cr_nofallback_route",(cmd_function)cr_nofallback_route, 5,
cr_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
+ {"cr_nofallback_route",(cmd_function)cr_nofallback_route5, 5,
cr_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
{"cr_nofallback_route",(cmd_function)cr_nofallback_route, 6,
cr_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
{"cr_next_domain", (cmd_function)cr_load_next_domain, 6,
cr_load_next_domain_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
{0, 0, 0, 0, 0, 0}
diff --git a/modules/carrierroute/cr_func.c b/modules/carrierroute/cr_func.c
index 316fde4..425bb0c 100644
--- a/modules/carrierroute/cr_func.c
+++ b/modules/carrierroute/cr_func.c
@@ -677,6 +677,14 @@ int cr_route(struct sip_msg * _msg, gparam_t *_carrier,
_rewrite_user, _hsrc, alg_crc32, _descavp);
}
+int cr_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc)
+{
+ return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
+ _rewrite_user, _hsrc, alg_crc32, NULL);
+}
+
/**
* rewrites the request URI of msg after determining the
@@ -701,6 +709,13 @@ int cr_prime_route(struct sip_msg * _msg, gparam_t *_carrier,
_rewrite_user, _hsrc, alg_prime, _descavp);
}
+int cr_prime_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc)
+{
+ return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
+ _rewrite_user, _hsrc, alg_prime, NULL);
+}
/**
* rewrites the request URI of msg after determining the
* new destination URI with the crc32 hash algorithm. The difference
@@ -726,6 +741,14 @@ int cr_nofallback_route(struct sip_msg * _msg, gparam_t *_carrier,
_rewrite_user, _hsrc, alg_crc32_nofallback, _dstavp);
}
+int cr_nofallback_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc)
+{
+ return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
+ _rewrite_user, _hsrc, alg_crc32_nofallback, NULL);
+}
+
/**
* Loads next domain from failure routing table and stores it in an AVP.
diff --git a/modules/carrierroute/cr_func.h b/modules/carrierroute/cr_func.h
index 9db6131..2fa9960 100644
--- a/modules/carrierroute/cr_func.h
+++ b/modules/carrierroute/cr_func.h
@@ -69,6 +69,9 @@ int cr_route(struct sip_msg * _msg, gparam_t *_carrier,
gparam_t *_domain, gparam_t *_prefix_matching,
gparam_t *_rewrite_user, enum hash_source _hsrc,
gparam_t *_descavp);
+int cr_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc);
/**
@@ -89,6 +92,9 @@ int cr_prime_route(struct sip_msg * _msg, gparam_t *_carrier,
gparam_t *_domain, gparam_t *_prefix_matching,
gparam_t *_rewrite_user, enum hash_source _hsrc,
gparam_t *_descavp);
+int cr_prime_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc);
/**
*
@@ -111,6 +117,9 @@ int cr_nofallback_route(struct sip_msg * _msg, gparam_t *_carrier,
gparam_t *_domain, gparam_t *_prefix_matching,
gparam_t *_rewrite_user, enum hash_source _hsrc,
gparam_t *_dstavp);
+int cr_nofallback_route5(struct sip_msg * _msg, gparam_t *_carrier,
+ gparam_t *_domain, gparam_t *_prefix_matching,
+ gparam_t *_rewrite_user, enum hash_source _hsrc);
/**