From 159d86dc92632378442a260c21fc14efcb236df3 Mon Sep 17 00:00:00 2001 From: Stefan Mititelu Date: Tue, 4 Aug 2015 12:19:27 +0300 Subject: [PATCH] Add codec info in CDR logging Log in CDR also the Payload Type of most of the packets for a media. --- daemon/call.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index fe5879126..2c3db7a7f 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2805,6 +2805,14 @@ void call_destroy(struct call *c) { STR_FMT(&rtp_pt->encoding), rtp_pt->clock_rate, STR_FMT(&rtp_pt->encoding_parameters)); + /* add PayloadType(codec) info in CDR logging */ + if (_log_facility_cdr && rtp_pt) { + cdrbufcur += sprintf(cdrbufcur, + "payload_type=%u, ", rtp_pt->payload_type); + } else if (_log_facility_cdr && !rtp_pt) { + cdrbufcur += sprintf(cdrbufcur, "payload_type=unknown, "); + } + for (o = md->streams.head; o; o = o->next) { ps = o->data;