Module: kamailio
Branch: master
Commit: 7ac16452539875db390a5fbc6493fd11c9263880
URL:
https://github.com/kamailio/kamailio/commit/7ac16452539875db390a5fbc6493fd1…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: jaybeepee <jason.penton(a)gmail.com>
Date: 2016-02-29T14:03:54+02:00
modules/ims_charging: check msg for reason header and include in Ro CCR if present
---
Modified: modules/ims_charging/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7ac16452539875db390a5fbc6493fd1…
Patch:
https://github.com/kamailio/kamailio/commit/7ac16452539875db390a5fbc6493fd1…
---
diff --git a/modules/ims_charging/dialog.c b/modules/ims_charging/dialog.c
index 248f4eb..4596749 100644
--- a/modules/ims_charging/dialog.c
+++ b/modules/ims_charging/dialog.c
@@ -3,6 +3,7 @@
#include "ro_session_hash.h"
#include "ro_db_handler.h"
#include "ims_charging_stats.h"
+#include "../../parser/hf.h"
struct cdp_binds cdpb;
@@ -145,6 +146,12 @@ void dlg_terminated(struct dlg_cell *dlg, int type, unsigned int
termcode, char*
} else {
LM_DBG("Request is %.*s\n",
_params->req->first_line.u.request.method.len,
_params->req->first_line.u.request.method.s);
}
+
+ struct hdr_field* h = get_hdr_by_name(_params->req, "Reason", 6);
+ if(h!=NULL){
+ LM_DBG("reason header is [%.*s]\n", h->body.len,
h->body.s);
+ s_reason = h->body;
+ }
} else if (_params->rpl) {
LM_DBG("Reply is [%d - %.*s]",
_params->rpl->first_line.u.reply.statuscode,
_params->rpl->first_line.u.reply.reason.len,
_params->rpl->first_line.u.reply.reason.s);
}