New field "header_ppi" is now managed and inserted into
cdr_tag_data mysql table.
This field will store into the aggregated cdr data the
P-Preferred-Identity header of the INVITE.
Change-Id: Ib875976fd7332e80ae100f257c7af701ffe9f661
New added acc data are usually added without strick check of
their presence to avoid that ACC generated before the upgrade
fails and get dropped.
In the code there are some very old cases for upgrades from
mr8.x to mr9.x versions that now are removed.
Change-Id: I295547cd11656adf015a4fe5b6038a792f8cf532
New field "r_ua" is now managed and inserted into
cdr_tag_data mysql table.
This field will store into the aggregated cdr data the user agent
relative to the first 2xx response of an INVITE.
Change-Id: Icf8e80d0d2b63f4b9db006c8a224335989057e86
New field "r_user" is now managed and inserted into
cdr_tag_data mysql table.
This field will store into the aggregated cdr data table the user part
of the RURI relative to the first 2xx response of an INVITE.
Change-Id: Ie61809e9245adfa09c6babb4b3fa328da8c56cbb
New field "hg_ext_response" is now managed and inserted into
cdr_tag_data mysql table.
This field will store into the aggregated cdr data the number
of the extention picking up the call after an HG.
Change-Id: I816eba4a6a227e1a809c2db1ab5ae0665d4c1aa1
Attempt to parse each src/dst leg only once (which is a JSON document
these days) and use the same logic for determining whether to create a
CDR for both intermediate and final CDRs.
Change-Id: If8afae812585cb8624799b0d2f4e6be64980cea9
json_tokener_parse returns a newly created JSON object (tree) which must
be freed by decreasing the ref count before the variable goes out of
scope.
Fix-up for Ia7e8446fe4953d1391f99ea1530990e3d385c056
Change-Id: I2e4b17086df468f66401a71a836d37ed821944e5
The `cdr_index` variable already tracks the number of created CDRs, as
it points to the slot for the next CDR record to be inserted. It's
increased by one at the start of the processing loop, so if we end up
skipping over an entry after it's been increased, it must be decreased
again, which keeps the count intact and prevents empty CDR records from
being created.
Fix-up for Ia7e8446fe4953d1391f99ea1530990e3d385c056
Change-Id: Ibb650a4b00978a272ef8f60751f6efda0491a912
* If there are multiple call leg acc records for a call, ones
that do not contain valid src + dst leg data (either JSON or th
old format), these acc records are skipped and intermediate cdrs
are created for the remaining records that contain valid src and dst
leg data
Change-Id: Ia7e8446fe4953d1391f99ea1530990e3d385c056
With this we can directly use the method code for decision making
purposes before the CDR generation routine runs.
Change-Id: I8967e77e6cd717bb4d3342a1bf7052c33d0f9b45
This makes it possible to reuse the data from the JSON object in several
places in the code without having to re-parse it.
Change-Id: I62f3b2b814acc52ae3fb84c88b7b4f99bff9232f
Using an array in this context (to return a list of acc records) is
mostly pointless as it wastes memory and incurs the additional overhead
of having to initialise the array and an extra layer of copying strings
around. This also ultimately allows us to dynamically append to the list
of acc records without having to reallocate the array.
Change-Id: I1039f01861f8d3f82fdc3a80377fd7535fa24bab
As the number of subscribers grows, the current approach of doing a full
table dump of the subscribers DB and caching it in memory becomes less
and less feasible. The new approach is to simply do a straight DB query
for each subscriber as records are processed, and then cache the result
in memory for a little while.
Change-Id: I19a6271d779bd0abccc29e3548e7bcdb2e00baa3
This is relevant for records coming from Redis, as the insertion into
the trash and backup tables is done from the strings kept in memory.
Change-Id: I1398f7bfc0d4a0c2da8b8104dc4589ea9d983da7
(cherry picked from commit 6e957e69b7)
Kamailio writes src_leg and dst_leg information of ACCs
in json format. Mediator has been adapted to read them
in this new format.
Due to that the size of src_leg and dst_leg has been
increased from char(256) to char (1024).
For backward compatibility the old format has been preserved
and used if the src_leg and dst_leg are not in json format.
This change is transparent for the final CDR's output.
Change-Id: I4de9c61a5bfe5855628412f6aca988ffc9406a59
Json function used to get MOS values has been slitted in
two: one to get the value from the json dict and one to clamp
it in order to have the final value between the desired
range of values.
Change-Id: Ifecb2548ad3d1de8fc307158cb89107c7da6b370
This is necessary to avoid issues with ACC records in the
OLD format during an upgrade.
It should be changed to back to -1 in mr9.+
Change-Id: I81097c0823343de066ec436d6f43a4ed279f372f
Tha value is readed from the last field of the the ACC srcleg.
It contains the ID of the peer_host from where the call was received.
Mediator uses it to find the correct peering_contract_id to write in
the CDR.
Change-Id: I2cfb7d0fadb5ade265fde3c1778475eda431a453
* type=id values are pre-fetched from cdr_tag_data on init
* 3 new data columns are stored in cdr_tag_data
furnished_charing_info,
header=P-Asserted-Identity
header=Diversion
Change-Id: I228743beb05cc09cc28d7df8dedc90dd3cdbcfed
* Fetch acc records both from mysql and redis
* Backup/trash redis acc records into mysql
* Introduce loglevel config option and log macros
Change-Id: I9bc55ed72502feaff03550c99ce481aea33e5e58
* added acc fields: source_lnp_type, destination_lnp_type
* source_lnp_type is stored as NULL if the string is empty
* destination_lnp_type is stored as NULL if the string is empty
Change-Id: Ia81debf9ff56aca87e4f1bcc4a82f8c8b9c1edec