diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index e6f23db84f..3a30430364 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -1707,69 +1707,69 @@ static char create_registrations_sql[] = static char detailed_calls_sql[] = - "create view detailed_calls as select\n" - "a.uuid,\n" - "a.direction direction,\n" - "a.created created,\n" - "a.created_epoch created_epoch,\n" - "a.name name,\n" - "a.state state,\n" - "a.cid_name cid_name,\n" - "a.cid_num cid_num,\n" - "a.ip_addr ip_addr,\n" - "a.dest dest,\n" - "a.application application,\n" - "a.application_data application_data,\n" - "a.dialplan dialplan,\n" - "a.context context,\n" - "a.read_codec read_codec,\n" - "a.read_rate read_rate,\n" - "a.read_bit_rate read_bit_rate,\n" - "a.write_codec write_codec,\n" - "a.write_rate write_rate,\n" - "a.write_bit_rate write_bit_rate,\n" - "a.secure secure,\n" - "a.hostname hostname,\n" - "a.presence_id presence_id,\n" - "a.presence_data presence_data,\n" - "a.callstate callstate,\n" - "a.callee_name callee_name,\n" - "a.callee_num callee_num,\n" - "a.callee_direction callee_direction,\n" - "a.call_uuid call_uuid,\n" - "b.uuid b_uuid,\n" - "b.direction b_direction,\n" - "b.created b_created,\n" - "b.created_epoch b_created_epoch,\n" - "b.name b_name,\n" - "b.state b_state,\n" - "b.cid_name b_cid_name,\n" - "b.cid_num b_cid_num,\n" - "b.ip_addr b_ip_addr,\n" - "b.dest b_dest,\n" - "b.application b_application,\n" - "b.application_data b_application_data,\n" - "b.dialplan b_dialplan,\n" - "b.context b_context,\n" - "b.read_codec b_read_codec,\n" - "b.read_rate b_read_rate,\n" - "b.read_bit_rate b_read_bit_rate,\n" - "b.write_codec b_write_codec,\n" - "b.write_rate b_write_rate,\n" - "b.write_bit_rate b_write_bit_rate,\n" - "b.secure b_secure,\n" - "b.hostname b_hostname,\n" - "b.presence_id b_presence_id,\n" - "b.presence_data b_presence_data,\n" - "b.callstate b_callstate,\n" - "b.callee_name b_callee_name,\n" - "b.callee_num b_callee_num,\n" - "b.callee_direction b_callee_direction,\n" - "b.call_uuid b_call_uuid\n" - "from channels a \n" - "left join calls c on a.uuid = c.caller_uuid and a.hostname = c.hostname\n" - "left join channels b on b.uuid = c.callee_uuid and b.hostname = c.hostname\n" - "where a.uuid = c.caller_uuid or a.uuid not in (select callee_uuid from calls);\n"; + "create view detailed_calls as select " + "a.uuid as uuid," + "a.direction as direction," + "a.created as created," + "a.created_epoch as created_epoch," + "a.name as name," + "a.state as state," + "a.cid_name as cid_name," + "a.cid_num as cid_num," + "a.ip_addr as ip_addr," + "a.dest as dest," + "a.application as application," + "a.application_data as application_data," + "a.dialplan as dialplan," + "a.context as context," + "a.read_codec as read_codec," + "a.read_rate as read_rate," + "a.read_bit_rate as read_bit_rate," + "a.write_codec as write_codec," + "a.write_rate as write_rate," + "a.write_bit_rate as write_bit_rate," + "a.secure as secure," + "a.hostname as hostname," + "a.presence_id as presence_id," + "a.presence_data as presence_data," + "a.callstate as callstate," + "a.callee_name as callee_name," + "a.callee_num as callee_num," + "a.callee_direction as callee_direction," + "a.call_uuid as call_uuid," + "b.uuid as b_uuid," + "b.direction as b_direction," + "b.created as b_created," + "b.created_epoch as b_created_epoch," + "b.name as b_name," + "b.state as b_state," + "b.cid_name as b_cid_name," + "b.cid_num as b_cid_num," + "b.ip_addr as b_ip_addr," + "b.dest as b_dest," + "b.application as b_application," + "b.application_data as b_application_data," + "b.dialplan as b_dialplan," + "b.context as b_context," + "b.read_codec as b_read_codec," + "b.read_rate as b_read_rate," + "b.read_bit_rate as b_read_bit_rate," + "b.write_codec as b_write_codec," + "b.write_rate as b_write_rate," + "b.write_bit_rate as b_write_bit_rate," + "b.secure as b_secure," + "b.hostname as b_hostname," + "b.presence_id as b_presence_id," + "b.presence_data as b_presence_data," + "b.callstate as b_callstate," + "b.callee_name as b_callee_name," + "b.callee_num as b_callee_num," + "b.callee_direction as b_callee_direction," + "b.call_uuid as b_call_uuid " + "from channels a " + "left join calls c on a.uuid = c.caller_uuid and a.hostname = c.hostname " + "left join channels b on b.uuid = c.callee_uuid and b.hostname = c.hostname " + "where a.uuid = c.caller_uuid or a.uuid not in (select callee_uuid from calls)"; SWITCH_DECLARE(switch_status_t) switch_core_add_registration(const char *user, const char *realm, const char *token, const char *url, uint32_t expires,