From d55505ce2a713a409a2a2d37f34893f7d1ccaf4f Mon Sep 17 00:00:00 2001 From: Italo Rossi Date: Fri, 22 Aug 2014 15:35:49 -0300 Subject: [PATCH] Adding switchname to xml_cdr and json_cdr --- src/switch_ivr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index d53d3e6a72..52661e2e1e 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -2308,6 +2308,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_xml_cdr(switch_core_session_ } switch_xml_set_attr_d(cdr, "core-uuid", switch_core_get_uuid()); + switch_xml_set_attr_d(cdr, "switchname", switch_core_get_switchname()); if (!(x_channel_data = switch_xml_add_child_d(cdr, "channel_data", cdr_off++))) { goto error; @@ -2681,7 +2682,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_json_cdr(switch_core_session char tmp[512], *f; cJSON_AddItemToObject(cdr, "core-uuid", cJSON_CreateString(switch_core_get_uuid())); - + cJSON_AddItemToObject(cdr, "switchname", cJSON_CreateString(switch_core_get_switchname())); j_channel_data = cJSON_CreateObject(); cJSON_AddItemToObject(cdr, "channel_data", j_channel_data);