This commit fixes paths to various header files included by the module: * DB API headers are now included from libsrdb1 * libkcore/km_ut.h included in files where functions from kamailio/ut.h are used * Included flags.h for flag setters and getters * Included local_route.h from libkcore intead of the top level directory --- modules/acc/acc.c | 3 ++- modules/acc/acc_extra.c | 1 + modules/acc/acc_logic.c | 2 ++ modules/acc/acc_mod.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c index b84c49d..3f43685 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -50,7 +50,8 @@ #include "../../error.h" #include "../../mem/mem.h" #include "../../usr_avp.h" -#include "../../db/db.h" +#include "../../lib/srdb1/db.h" +#include "../../lib/kcore/km_ut.h" #include "../../parser/hf.h" #include "../../parser/msg_parser.h" #include "../../parser/parse_from.h" diff --git a/modules/acc/acc_extra.c b/modules/acc/acc_extra.c index cf2d92c..1e0e06e 100644 --- a/modules/acc/acc_extra.c +++ b/modules/acc/acc_extra.c @@ -48,6 +48,7 @@ #include "../../ut.h" #include "../../usr_avp.h" #include "../../mem/mem.h" +#include "../../lib/kcore/km_ut.h" #include "acc_extra.h"
#define EQUAL '=' diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index 6654d40..59e4440 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -43,6 +43,8 @@ #include "../../parser/parse_content.h" #include "../tm/tm_load.h" #include "../rr/api.h" +#include "../../lib/kcore/km_ut.h" +#include "../../flags.h" #include "acc.h" #include "acc_mod.h" #include "acc_logic.h" diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index ea881d9..7e234e6 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -63,7 +63,7 @@ #include <string.h>
#include "../../sr_module.h" -#include "../../local_route.h" +#include "../../lib/kcore/local_route.h" #include "../../dprint.h" #include "../../mem/mem.h" #include "../tm/tm_load.h"
Database fixes done by kam_to_sr.sh script
This patch makes the module compatible with the changes done in the database library of kamailio/ser when it was converted to shared library libsrdb1. These changes are mostly needed to avoid conflicts with the symbols defined in the newer version of the library libsrdb2.
List of changes: * Rename db_con_t to db1_con_t * Rename database field type names from DB_* to DB1_* --- modules/acc/acc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c index 3f43685..49afdf0 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -88,7 +88,7 @@ extern struct acc_extra *dia_extra;
#ifdef SQL_ACC static db_func_t acc_dbf; -static db_con_t* db_handle=0; +static db1_con_t* db_handle=0; extern struct acc_extra *db_extra; #endif
@@ -318,10 +318,10 @@ static void acc_db_init_keys(void)
/* init the values */ for(i=0; i<n; i++) { - VAL_TYPE(db_vals+i)=DB_STR; + VAL_TYPE(db_vals+i)=DB1_STR; VAL_NULL(db_vals+i)=0; } - VAL_TYPE(db_vals+time_idx)=DB_DATETIME; + VAL_TYPE(db_vals+time_idx)=DB1_DATETIME; }
--- modules/acc/acc_logic.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index 59e4440..4182a92 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -363,9 +363,9 @@ static inline void acc_onreply( struct cell* t, struct sip_msg *req, return;
/* for reply processing, set as new_uri the winning branch */ - if (t->relaied_reply_branch>=0) { + if (t->relayed_reply_branch>=0) { new_uri_bk = req->new_uri; - req->new_uri = t->uac[t->relaied_reply_branch].uri; + req->new_uri = t->uac[t->relayed_reply_branch].uri; req->parsed_uri_ok = 0; } else { new_uri_bk.len = -1;
--- modules/acc/acc_mod.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/acc/acc_mod.h b/modules/acc/acc_mod.h index 6cb69ca..d565773 100644 --- a/modules/acc/acc_mod.h +++ b/modules/acc/acc_mod.h @@ -49,6 +49,7 @@ extern int early_media; extern int failed_transaction_flag; extern int detect_direction;
+extern int log_facility; extern int log_level; extern int log_flag; extern int log_missed_flag;
This flag was originally defined in file msg_parser.h. But the sip-router core does not contain this definition and it does not make much sense to add it there because the acc module is the only module using it and later, if we merge acc implementations from ser and kamailio, this flag will be probably gone.
File sip_router/msg_parser.h contains a warning about the flag being defined here, this is to make sure we don't create another flag with conflicting value. --- modules/acc/acc.h | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/modules/acc/acc.h b/modules/acc/acc.h index 3c99212..576de17 100644 --- a/modules/acc/acc.h +++ b/modules/acc/acc.h @@ -73,6 +73,14 @@
#define MAX_SYSLOG_SIZE 65536
+/* WARNING: This is a flag stored in the sip_msg structure, the flag is + * temporarily defined here to make the module work with the sip-router core, + * I assume it won't be needed once we merge acc implementations from both + * projects. The value of the flag must be kept synchronized with other flags + * defined in parser/msg_parser.h! + */ +#define FL_REQ_UPSTREAM (1<<11) + void acc_log_init(void); int acc_log_request( struct sip_msg *req);
In the kamailio version of tm module function register_tmcb accepts an extra parameter, some kind of clean up function. There is no such parameter in ser and thus sip-router (remember, we imported tm from ser) and thus we need to remove the parameter here too.
In acc module it was set to 0 anyway so there is no harm done. --- modules/acc/acc_logic.c | 2 +- modules/acc/acc_mod.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index 4182a92..e92d827 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -241,7 +241,7 @@ void acc_onreq( struct cell* t, int type, struct tmcb_params *ps ) TMCB_RESPONSE_IN | /* report on missed calls */ ((is_invite && is_mc_on(ps->req))?TMCB_ON_FAILURE:0) ; - if (tmb.register_tmcb( 0, t, tmcb_types, tmcb_func, 0, 0 )<=0) { + if (tmb.register_tmcb( 0, t, tmcb_types, tmcb_func, 0)<=0) { LM_ERR("cannot register additional callbacks\n"); return; } diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index 7e234e6..a9da577 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -401,7 +401,7 @@ static int mod_init( void ) }
/* listen for all incoming requests */ - if ( tmb.register_tmcb( 0, 0, TMCB_REQUEST_IN, acc_onreq, 0, 0 ) <=0 ) { + if ( tmb.register_tmcb( 0, 0, TMCB_REQUEST_IN, acc_onreq, 0) <=0 ) { LM_ERR("cannot register TMCB_REQUEST_IN callback\n"); return -1; }
The original (kamailio) version of acc module accesed the flags in sip_msg structure directly through a few macros declared in this module. In SER we introduced the concept of named flags and created a set of functions that can be used to access and modify the flags.
First of all we need to replace calls to flag_idx2mask from mod_init function, this function does not exist in the sip-router core because all flag related functions there get the index of the flag as parameter. This means that we do not have to convert values of flag-related modparams in this module, all we have to do is check whether they have a valid value. This is done using flag_is_in_range. But because the module uses -1 to denote that a particular flag is not set, we need only need to call that function if the flag is not set to -1.
After that we need to update is_acc_flag_set and reset_acc_flag macros to call functions from flags.h, instead of modifying the flags directly. But again, the functions from flags.h should only be called if the particular flag is not set to -1.
If we also wanted to add support for named flags then we would need to update the definition of modparams holding the value of flags in this module. This is not done in this patch. We can do it later after we merge acc modules from ser and kamailio. --- modules/acc/acc_logic.c | 4 ++-- modules/acc/acc_mod.c | 33 ++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index e92d827..90426a5 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -55,8 +55,8 @@ extern struct rr_binds rrb; struct acc_enviroment acc_env;
-#define is_acc_flag_set(_rq,_flag) (((_rq)->flags)&(_flag)) -#define reset_acc_flag(_rq,_flag) (_rq)->flags &= ~(_flag) +#define is_acc_flag_set(_rq,_flag) (((_flag) != -1) && (isflagset((_rq), (_flag)) == 1)) +#define reset_acc_flag(_rq,_flag) (resetflag((_rq), (_flag)))
#define is_failed_acc_on(_rq) is_acc_flag_set(_rq,failed_transaction_flag)
diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index a9da577..17f159a 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -377,8 +377,11 @@ static int mod_init( void )
/* ----------- GENERIC INIT SECTION ----------- */
- if (flag_idx2mask(&failed_transaction_flag)<0) + if ((failed_transaction_flag != -1) && + !flag_in_range(failed_transaction_flag)) { + LM_ERR("failed_transaction_flag set to invalid value\n"); return -1; + }
/* load the TM API */ if (load_tm_api(&tmb)!=0) { @@ -423,11 +426,15 @@ static int mod_init( void ) return -1; }
- if (flag_idx2mask(&log_flag)<0) + if ((log_flag != -1) && !flag_in_range(log_flag)) { + LM_ERR("log_flag set to invalid value\n"); return -1; + }
- if (flag_idx2mask(&log_missed_flag)<0) + if ((log_missed_flag != -1) && !flag_in_range(log_missed_flag)) { + LM_ERR("log_missed_flag set to invalid value\n"); return -1; + }
acc_log_init();
@@ -445,10 +452,16 @@ static int mod_init( void ) return -1; } /* fix the flags */ - if (flag_idx2mask(&db_flag)<0) + + if ((db_flag != -1) && !flag_in_range(db_flag)) { + LM_ERR("db_flag set to invalid value\n"); return -1; - if (flag_idx2mask(&db_missed_flag)<0) + } + + if ((db_missed_flag != -1) && !flag_in_range(db_missed_flag)) { + LM_ERR("db_missed_flag set to invalid value\n"); return -1; + } } else { db_flag = 0; db_missed_flag = 0; @@ -466,10 +479,16 @@ static int mod_init( void ) }
/* fix the flags */ - if (flag_idx2mask(&radius_flag)<0) + if ((radius_flag != -1) && !flag_in_range(radius_flag)) { + LM_ERR("radius_flag set to invalid value\n"); return -1; - if (flag_idx2mask(&radius_missed_flag)<0) + } + + if ((radius_missed_flag != -1) && !flag_in_range(radius_missed_flag)) { + LM_ERR("radius_missed_flag set to invalid value\n"); return -1; + } + if (init_acc_rad( radius_config, service_type)!=0 ) { LM_ERR("failed to init radius\n"); return -1;
This patch adds -DOPENSER_MOD_INTERFACE to the modules Makefile, this is needed to make Kamailio modules compile with the sip router core. --- modules/acc/Makefile | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/acc/Makefile b/modules/acc/Makefile index 395d79f..a25c0f5 100644 --- a/modules/acc/Makefile +++ b/modules/acc/Makefile @@ -28,4 +28,6 @@ ifeq ($(ENABLE_DIAMETER_ACC),true) DEFS+=-DDIAM_ACC endif
+DEFS+=-DOPENSER_MOD_INTERFACE + include ../../Makefile.modules
The kamailio acc module needs to be linked with libsrdb1 database library, this is the library which contains the database api from kamailio/db directory, and libkcore. libkcore contains ut.h and local_route init functions from kamailio core. --- modules/acc/Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/acc/Makefile b/modules/acc/Makefile index a25c0f5..ee6d3ff 100644 --- a/modules/acc/Makefile +++ b/modules/acc/Makefile @@ -30,4 +30,7 @@ endif
DEFS+=-DOPENSER_MOD_INTERFACE
+SERLIBPATH=../../lib +SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kcore/kcore + include ../../Makefile.modules
File radius.h from kamailio core was moved to libkcore and we need to update paths to the header file accordingly. --- modules/acc/acc.c | 2 +- modules/acc/acc_extra.h | 2 +- modules/acc/acc_mod.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c index 49afdf0..b9fd933 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -63,7 +63,7 @@ #include "acc_logic.h"
#ifdef RAD_ACC -#include "../../radius.h" +#include "../../lib/kcore/radius.h" #endif
#ifdef DIAM_ACC diff --git a/modules/acc/acc_extra.h b/modules/acc/acc_extra.h index 3ecd4aa..9550793 100644 --- a/modules/acc/acc_extra.h +++ b/modules/acc/acc_extra.h @@ -77,7 +77,7 @@ int legs2strar( struct acc_extra *legs, struct sip_msg *rq, str *val_arr, int extra2int( struct acc_extra *extra, int *attrs );
#ifdef RAD_ACC -#include "../../radius.h" +#include "../../lib/kcore/radius.h" int extra2attrs( struct acc_extra *extra, struct attr *attrs, int offset); #endif
diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index 17f159a..fa32222 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -74,7 +74,7 @@ #include "acc_logic.h"
#ifdef RAD_ACC -#include "../../radius.h" +#include "../../lib/kcore/radius.h" #endif
#ifdef DIAM_ACC
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 7:16 PM, Jan Janak jan@iptel.org wrote:
In the kamailio version of tm module function register_tmcb accepts an extra parameter, some kind of clean up function. There is no such parameter in ser and thus sip-router (remember, we imported tm from ser) and thus we need to remove the parameter here too.
In acc module it was set to 0 anyway so there is no harm done.
modules/acc/acc_logic.c | 2 +- modules/acc/acc_mod.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index 4182a92..e92d827 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -241,7 +241,7 @@ void acc_onreq( struct cell* t, int type, struct tmcb_params *ps ) TMCB_RESPONSE_IN | /* report on missed calls */ ((is_invite && is_mc_on(ps->req))?TMCB_ON_FAILURE:0) ;
- if (tmb.register_tmcb( 0, t, tmcb_types, tmcb_func, 0, 0 )<=0) {
- if (tmb.register_tmcb( 0, t, tmcb_types, tmcb_func, 0)<=0) {
LM_ERR("cannot register additional callbacks\n"); return; } diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index 7e234e6..a9da577 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -401,7 +401,7 @@ static int mod_init( void ) }
/* listen for all incoming requests */
- if ( tmb.register_tmcb( 0, 0, TMCB_REQUEST_IN, acc_onreq, 0, 0 ) <=0 ) {
- if ( tmb.register_tmcb( 0, 0, TMCB_REQUEST_IN, acc_onreq, 0) <=0 ) {
LM_ERR("cannot register TMCB_REQUEST_IN callback\n"); return -1; } -- 1.5.6.5
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
Hello Ovidiu,
they will get there, but cannot be done all at once. The kamailio release kept me busy for a while, I will resume my work on sip-router soon.
Just summit your ssh key and you will get the devel access for sip-router to create your branch for converting/maintaining the kamailio modules you authored.
Thanks, Daniel
On 03/10/2009 04:22 AM, Ovidiu Sas wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
Kamailio (OpenSER) - Devel mailing list Devel@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
Here's a patch with updates for the k tm callback signatures. Please review it.
Regards, Ovidiu Sas
On Mon, Mar 9, 2009 at 10:22 PM, Ovidiu Sas osas@voipembedded.com wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
Any updates on this?
Regards, Ovidiu Sas
On Sat, Mar 14, 2009 at 4:16 PM, Ovidiu Sas osas@voipembedded.com wrote:
Here's a patch with updates for the k tm callback signatures. Please review it.
Regards, Ovidiu Sas
On Mon, Mar 9, 2009 at 10:22 PM, Ovidiu Sas osas@voipembedded.com wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
I am on it, sorry for the delay, I've received lots of patches recently.
Jan.
On 20-03 10:54, Ovidiu Sas wrote:
Any updates on this?
Regards, Ovidiu Sas
On Sat, Mar 14, 2009 at 4:16 PM, Ovidiu Sas osas@voipembedded.com wrote:
Here's a patch with updates for the k tm callback signatures. Please review it.
Regards, Ovidiu Sas
On Mon, Mar 9, 2009 at 10:22 PM, Ovidiu Sas osas@voipembedded.com wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
It is now in the repository. I've also updated all affected modules and discarded the patch which removed the extra parameter from register_tmcb.
Jan.
On 20-03 10:54, Ovidiu Sas wrote:
Any updates on this?
Regards, Ovidiu Sas
On Sat, Mar 14, 2009 at 4:16 PM, Ovidiu Sas osas@voipembedded.com wrote:
Here's a patch with updates for the k tm callback signatures. Please review it.
Regards, Ovidiu Sas
On Mon, Mar 9, 2009 at 10:22 PM, Ovidiu Sas osas@voipembedded.com wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Thanks for all the hard work!
Ovidiu
On Mon, Mar 23, 2009 at 2:55 PM, Jan Janak jan@iptel.org wrote:
It is now in the repository. I've also updated all affected modules and discarded the patch which removed the extra parameter from register_tmcb.
Jan.
On 20-03 10:54, Ovidiu Sas wrote:
Any updates on this?
Regards, Ovidiu Sas
On Sat, Mar 14, 2009 at 4:16 PM, Ovidiu Sas osas@voipembedded.com wrote:
Here's a patch with updates for the k tm callback signatures. Please review it.
Regards, Ovidiu Sas
On Mon, Mar 9, 2009 at 10:22 PM, Ovidiu Sas osas@voipembedded.com wrote:
As I mentioned in my previous e-mail, the dialog module relies on the new kamailio signature of the register_tmcb. If we want to compile the dialog module under the sip-router project. we need to update the tm module with kamailio enhancements.
Regards, Ovidiu Sas
On Mon, Mar 2, 2009 at 8:48 PM, Jan Janak jan@iptel.org wrote:
On 02-03 19:24, Ovidiu Sas wrote:
The last parameter from the register_tmcb is vital for the dialog module from kamailio to work properly. The tm modules should be merged instead of removing functionality from kamailio modules.
I can easily update the patch once this is done. Currently the tm module in the sip router repository does not have the last parameter.
Jan.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Tuesday 03 March 2009, Jan Janak wrote:
--- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -363,9 +363,9 @@ static inline void acc_onreply( struct cell* t, struct sip_msg *req, return;
/* for reply processing, set as new_uri the winning branch */
- if (t->relaied_reply_branch>=0) {
- if (t->relayed_reply_branch>=0) { new_uri_bk = req->new_uri;
req->new_uri = t->uac[t->relaied_reply_branch].uri;
req->new_uri = t->uac[t->relayed_reply_branch].uri;
Hi Jan,
i've fixed this type also all instances in our trunk. Thanks for pointing this out.
Cheers,
Henning
Hello,
This is a series of patches that make the kamailio acc module compile and load with the shared sip-router core.
I've updated many kamailio modules and got them to the point where they compile and load with the shared sip router core.
I've decided to send the patches that I have to the mailing lists for review and suggestions, please review them if you can and let me know if you find a problem or if you have suggestions how to do something better.
Most of the changes are split logically into several patches end extensively commented in hope that it will make them easier to review and k. module maintainers could easily adapt them for their own migration work.
Please take it as a suggestion of how to migrate k. modules to the sip router core, nothing more, respective module maintainers have the right to decide how (or if at all) they want to have their modules converted.
Hope this helps. I can regenerate each path series easily if you do changes in the svn repository or if we change something in the sip-router core repository.
Jan.
On 03-03 01:16, Jan Janak wrote:
This commit fixes paths to various header files included by the module:
- DB API headers are now included from libsrdb1
- libkcore/km_ut.h included in files where functions from kamailio/ut.h are used
- Included flags.h for flag setters and getters
- Included local_route.h from libkcore intead of the top level directory
modules/acc/acc.c | 3 ++- modules/acc/acc_extra.c | 1 + modules/acc/acc_logic.c | 2 ++ modules/acc/acc_mod.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/acc/acc.c b/modules/acc/acc.c index b84c49d..3f43685 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c @@ -50,7 +50,8 @@ #include "../../error.h" #include "../../mem/mem.h" #include "../../usr_avp.h" -#include "../../db/db.h" +#include "../../lib/srdb1/db.h" +#include "../../lib/kcore/km_ut.h" #include "../../parser/hf.h" #include "../../parser/msg_parser.h" #include "../../parser/parse_from.h" diff --git a/modules/acc/acc_extra.c b/modules/acc/acc_extra.c index cf2d92c..1e0e06e 100644 --- a/modules/acc/acc_extra.c +++ b/modules/acc/acc_extra.c @@ -48,6 +48,7 @@ #include "../../ut.h" #include "../../usr_avp.h" #include "../../mem/mem.h" +#include "../../lib/kcore/km_ut.h" #include "acc_extra.h"
#define EQUAL '=' diff --git a/modules/acc/acc_logic.c b/modules/acc/acc_logic.c index 6654d40..59e4440 100644 --- a/modules/acc/acc_logic.c +++ b/modules/acc/acc_logic.c @@ -43,6 +43,8 @@ #include "../../parser/parse_content.h" #include "../tm/tm_load.h" #include "../rr/api.h" +#include "../../lib/kcore/km_ut.h" +#include "../../flags.h" #include "acc.h" #include "acc_mod.h" #include "acc_logic.h" diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c index ea881d9..7e234e6 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c @@ -63,7 +63,7 @@ #include <string.h>
#include "../../sr_module.h" -#include "../../local_route.h" +#include "../../lib/kcore/local_route.h" #include "../../dprint.h" #include "../../mem/mem.h" #include "../tm/tm_load.h"