Module: sip-router
Branch: master
Commit: 71594a81f012432782d1f7b6f59c725130928ee7
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=71594a8…
Author: Jason Penton <jason.penton(a)smilecoms.com>
Committer: Jason Penton <jason.penton(a)smilecoms.com>
Date: Mon Aug 19 13:41:45 2013 +0200
cdp: fixed spelling and removed some erroneous code
---
modules/cdp/acctstatemachine.c | 3 +--
modules/cdp/session.c | 22 ++++++++++++----------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/modules/cdp/acctstatemachine.c b/modules/cdp/acctstatemachine.c
index 957b064..8537d0d 100644
--- a/modules/cdp/acctstatemachine.c
+++ b/modules/cdp/acctstatemachine.c
@@ -245,10 +245,9 @@ inline int cc_acc_client_stateful_sm_process(cdp_session_t* s, int event, AAAMes
}
if (s) {
- if (s->cb)
- (s->cb)(ACC_CC_EV_SESSION_TIMEOUT, s);
AAASessionsUnlock(s->hash);
}
+
return ret;
}
diff --git a/modules/cdp/session.c b/modules/cdp/session.c
index 1577766..dc41e1f 100644
--- a/modules/cdp/session.c
+++ b/modules/cdp/session.c
@@ -116,10 +116,6 @@ void free_session(cdp_session_t *x)
case AUTH_SERVER_STATEFULL:
break;
case ACCT_CC_CLIENT:
- if (x->u.generic_data) {
- LM_ERR("free_session(): The session->u.generic_data should be freed and reset before dropping the session!"
- "Possible memory leak!\n");
- }
break;
default:
LM_ERR("free_session(): Unknown session type %d!\n",x->type);
@@ -415,7 +411,7 @@ void cdp_sessions_log()
case ACCT_CC_CLIENT:
LM_DBG(ANSI_GRAY"\tCCAcct State [%d] Charging Active [%c (%d)s] Reserved Units(valid=%ds) [%d] Generic [%p]\n",
x->u.cc_acc.state,
- x->u.cc_acc.charging_start_time?'Y':'N',
+ (x->u.cc_acc.charging_start_time&&x->u.cc_acc.state!=ACC_CC_ST_DISCON)?'Y':'N',
x->u.cc_acc.charging_start_time?(int)((int)time(0) - (int)x->u.cc_acc.charging_start_time):-1,
x->u.cc_acc.reserved_units?(int)((int)x->u.cc_acc.last_reservation_request_time + x->u.cc_acc.reserved_units_validity_time) - (int)time(0):-1,
x->u.cc_acc.reserved_units,
@@ -441,8 +437,10 @@ int cdp_sessions_timer(time_t now, void* ptr)
switch (x->type){
case ACCT_CC_CLIENT:
if (x->u.cc_acc.type == ACC_CC_TYPE_SESSION) {
- //check for old, stale sessions
- if (time(0) > (x->u.cc_acc.discon_time + GRACE_DISCON_TIMEOUT)) {
+ //check for old, stale sessions, we need to do something more elegant
+ //here to ensure that if a CCR start record is sent and the client never sends anything
+ //else that we catch it and clean up the session from within CDP, calling all callbacks, etc
+ if ((time(0) > (x->u.cc_acc.discon_time + GRACE_DISCON_TIMEOUT)) && (x->u.cc_acc.state==ACC_CC_ST_DISCON)) {
cc_acc_client_stateful_sm_process(x, ACC_CC_EV_SESSION_STALE, 0);
}
//check reservation timers - again here we are assuming CC-Time applications
@@ -458,9 +456,12 @@ int cdp_sessions_timer(time_t now, void* ptr)
}
}
+ /* TODO: if reservation has expired we need to tear down the session. Ideally
+ * the client application (module) should do this but for completeness we should
+ * put a failsafe here too.
+ */
}
break;
-
case AUTH_CLIENT_STATEFULL:
if (x->u.auth.timeout>=0 && x->u.auth.timeout<=now){
//Session timeout
@@ -753,7 +754,8 @@ AAASession* AAACreateCCAccSession(AAASessionCallback_f *cb, int is_session, void
s = cdp_new_cc_acc_session(id, is_session);
if (s) {
- s->u.auth.generic_data = generic_data;
+ if (generic_data)
+ s->u.auth.generic_data = generic_data;
s->cb = cb;
if (s->cb)
(s->cb)(ACC_CC_EV_SESSION_CREATED, s);
@@ -768,7 +770,7 @@ AAASession* AAACreateCCAccSession(AAASessionCallback_f *cb, int is_session, void
int AAAStartChargingCCAccSession(AAASession *s)
{
if (s->type != ACCT_CC_CLIENT && s->u.cc_acc.type != ACC_CC_TYPE_SESSION) {
- LM_ERR("Can't start charing on a credit-control session that is not session based\n");
+ LM_ERR("Can't start charging on a credit-control session that is not session based\n");
return -1;
}
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#331 - dispatcher.reload doesn't work with DB
User who did this - Daniel-Constantin Mierla (miconda)
Reason for closing: Not a bug
Additional comments about closing: Not matching the code in latest 4.0 branch. Provide an unified diff if it is still an issue from your point of view.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=331
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.
Hey Guys,
We are in the process of writing our first Kamailio module and would
need if possible some guidance.
Following questions came up:
* We need to keep track about call-start and call-stop events. Do you
recommend us dialog or dialog-ng module for that?
* To learn the basic of Kamailio module development, can you recommend
us a very simple and basic module to have a look on (like a hello world
or something).
* We would need to be able to control calls (eg kill them when the
account credits are finished, is dialog also the way to go for that)?
* We would need to be able to receive rpc requests from a remote server.
What do you recommend us as approach: using existing rpc modules and
expose our own apis through that or fire up our own rpc server instead?
Thanks in advance for any tip!
DanB
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Seudin Kasumovic (seudin)
Attached to Project - sip-router
Summary - add arbitrary params in Path header
Task Type - Improvement
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - rfc3327 allow Path header to contains arbitrary RR semi pram. This patch allow to configure optional AVP variable to be used when build Path header.
Note: Patch is made on 4.0.3.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=332
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.
Hello,
Kamailio SIP Server v4.0.3 stable release is out.
This is a maintenance release of the latest stable branch, 4.0, that
includes fixes since release of v4.0.0. There is no change to database
schema or configuration language structure that you have to do on
installations of v4.0.0. Deployments running previous v4.x.x versions
are strongly recommended to be upgraded to v4.0.3.
For more details about version 4.0.3 (including links and guidelines to
download the tarball or from GIT repository), visit:
* http://www.kamailio.org/w/2013/08/kamailio-v4-0-3-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#331 - dispatcher.reload doesn't work with DB
User who did this - Daniel-Constantin Mierla (miconda)
----------
Provide the patch with 'diff -u ...' and attach it as a file, don't paste it in the comment, because if it is valid, cannot be applied without manual editing.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=331#comment1051
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.
A new Flyspray task has been opened. Details are below.
User who did this - Jerry Hu (Jerry2013)
Attached to Project - sip-router
Summary - dispatcher.reload doesn't work with DB
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - using DB for dispatcher list, doing 'kamcmd dispatcher.reload' shows "invalid DB handler".
here's the patch:
# diff dispatcher.c dispatcher.c.orig
779,780c779
< if(ds_connect_db()!=0 || ds_load_db()<0) {
< ds_disconnect_db();
---
> if(ds_load_db()<0)
782,783d780
< }
< ds_disconnect_db();
935c932
< if (ds_load_list(dslistfile)!=0)
---
> if (ds_load_list(dslistfile)!=0) {
936a934,935
> return;
> }
938c937
< if(ds_connect_db()!=0 || ds_load_db()<0)
---
> if(ds_load_db()<0) {
940c939,940
< ds_disconnect_db();
---
> return;
> }
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=331
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.