Here are some proposed modifications to handle the P-Charging-Vector header as defined in rfc3455 section 4.6 to
- parse charging vector from SIP message
- generate new unique charging vector
- remove a charging vector header
a new pseudo variable
pseudo variables are exported and enable Read onlly access to charging vector fields
$pcv = whole field
$pcv.value = icid-value field (see RFC3455 section 5.6)
$pcv.genaddr = icid-generated-at field (see RFC3455 section 5.6)
a new function acc_charging_vector()
- g = generate a new charging vector or forward the orginal one
- f = generate a new charging vector regardless of the orginal charging vector
- r = remote the P-Charging vector header from the packet
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/214
-- Commit Summary --
* P-Charging-Vector implementation
* Merge remote branch 'upstream/master'
-- File Changes --
A modules/acc/chargingvector.c (435)
A modules/acc/chargingvector.h (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/214.patchhttps://github.com/kamailio/kamailio/pull/214.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/214
Module: kamailio
Branch: master
Commit: f995edfb7fc9305dc72a6b04575e6112cd873473
URL: https://github.com/kamailio/kamailio/commit/f995edfb7fc9305dc72a6b04575e611…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Committer: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Date: 2015-06-18T13:28:16+03:00
pdb: new protocol between pdb_server and kama pdb module
Modified the communication protocol between the pdb clent <-> server such
that the server will give more feedback on scenarios like "pdb_id not found" or
"request number contains letters". New msg types or reply codes can be easily
added. Curent version of the protocol is 1 (0x01).
Also backwards compatibility is maintained when the first received byte is
different than the known versions (now, just 0x01).
Updated the http link for the get_carrier_germany script. Created a new perl
script to get german carrier id.
Updated doku (utils/pdbt/docs/network_protocol.txt).
added the perls script
---
Added: modules/pdb/common.h
Added: utils/pdbt/common.c
Added: utils/pdbt/scripts/get_carrier_names_germany.pl
Modified: modules/pdb/doc/pdb_admin.xml
Modified: modules/pdb/pdb.c
Modified: utils/pdbt/Makefile
Modified: utils/pdbt/common.h
Modified: utils/pdbt/docs/network_protocol.txt
Modified: utils/pdbt/log.c
Modified: utils/pdbt/log.h
Modified: utils/pdbt/pdb_server.c
Modified: utils/pdbt/pdbt.c
Modified: utils/pdbt/scripts/get_carrier_names_germany.sh
---
Diff: https://github.com/kamailio/kamailio/commit/f995edfb7fc9305dc72a6b04575e611…
Patch: https://github.com/kamailio/kamailio/commit/f995edfb7fc9305dc72a6b04575e611…
Module: kamailio
Branch: master
Commit: 96e5a6aa5d3c00d0020315f5455b6c98c73d4a19
URL: https://github.com/kamailio/kamailio/commit/96e5a6aa5d3c00d0020315f5455b6c9…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: 2015-06-18T08:56:20+02:00
modules/ims_qos: improve reliability of active media sessions stat
---
Modified: modules/ims_qos/cdpeventprocessor.c
Modified: modules/ims_qos/rx_aar.c
---
Diff: https://github.com/kamailio/kamailio/commit/96e5a6aa5d3c00d0020315f5455b6c9…
Patch: https://github.com/kamailio/kamailio/commit/96e5a6aa5d3c00d0020315f5455b6c9…
---
diff --git a/modules/ims_qos/cdpeventprocessor.c b/modules/ims_qos/cdpeventprocessor.c
index 2b38050..ae683c6 100644
--- a/modules/ims_qos/cdpeventprocessor.c
+++ b/modules/ims_qos/cdpeventprocessor.c
@@ -262,8 +262,11 @@ void cdp_cb_event_process() {
}
} else {
LM_DBG("This is a media bearer session session");
+ if(p_session_data->session_has_been_opened) {
+ LM_DBG("Session was opened so decrementing active_media_rx_sessions\n");
+ counter_add(ims_qos_cnts_h.active_media_rx_sessions, -1);
+ }
- counter_add(ims_qos_cnts_h.active_media_rx_sessions, -1);
//we only terminate the dialog if this was triggered from the transport plane or timeout - i.e. if must_terminate_dialog is set
//if this was triggered from the signalling plane (i.e. someone hanging up) then we don'y need to terminate the dialog
if (p_session_data->must_terminate_dialog) {
diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
index fcc91de..4871dc5 100644
--- a/modules/ims_qos/rx_aar.c
+++ b/modules/ims_qos/rx_aar.c
@@ -98,6 +98,8 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
struct cell *t = 0;
unsigned int cdp_result;
int result = CSCF_RETURN_ERROR;
+ AAASession *auth = 0;
+ rx_authsessiondata_t* p_session_data = 0;
LM_DBG("Received AAR callback\n");
saved_transaction_t* data = (saved_transaction_t*) param;
@@ -145,8 +147,29 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
LM_DBG("Auth session ID [%.*s]", aaa->sessionId->data.len, aaa->sessionId->data.s);
if(!data->aar_update) {
- LM_DBG("This is an AAA response to an initial AAR");
+ LM_DBG("This is an AAA response to an initial AAR - active_media_rx_sessions");
+
+ //need to set Rx auth data to say this session has been successfully opened
+ //This is used elsewhere to prevent acting on termination events when the session has not been opened
+ //getting auth session
+ auth = cdpb.AAAGetAuthSession(aaa->sessionId->data);
+ if (!auth) {
+ LM_DBG("Could not get Auth Session for session id: [%.*s]\n", aaa->sessionId->data.len, aaa->sessionId->data.s);
+ goto error;
+ }
+ //getting session data
+ p_session_data = (rx_authsessiondata_t*) auth->u.auth.generic_data;
+ if (!p_session_data) {
+ LM_DBG("Could not get session data on Auth Session for session id: [%.*s]\n", aaa->sessionId->data.len, aaa->sessionId->data.s);
+ if (auth) cdpb.AAASessionsUnlock(auth->hash);
+ goto error;
+ }
+
+ LM_DBG("Setting session_has_been_opened and incrementing active_media_rx_sessions\n");
+ p_session_data->session_has_been_opened = 1;
counter_inc(ims_qos_cnts_h.active_media_rx_sessions);
+
+ if (auth) cdpb.AAASessionsUnlock(auth->hash);
str * passed_rx_session_id = shm_malloc(sizeof (struct _str));
passed_rx_session_id->s = 0;
@@ -252,7 +275,7 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e
if (cdp_result >= 2000 && cdp_result < 3000) {
counter_inc(ims_qos_cnts_h.successful_registration_aars);
- if (is_rereg) {
+ if (is_rereg) {
LM_DBG("this is a re-registration, therefore we don't need to do anything except know that the the subscription was successful\n");
result = CSCF_RETURN_TRUE;
create_return_code(result);
@@ -273,7 +296,7 @@ void async_aar_reg_callback(int is_timeout, void *param, AAAMessage *aaa, long e
if (auth) cdpb.AAASessionsUnlock(auth->hash);
goto error;
}
- p_session_data->session_has_been_opened = 1;
+ p_session_data->session_has_been_opened = 1;
counter_inc(ims_qos_cnts_h.active_registration_rx_sessions);
if (auth) cdpb.AAASessionsUnlock(auth->hash);