Update switch.sql

Add accountcode to detailed_calls view.
This commit is contained in:
FusionPBX 2016-07-10 15:12:58 -06:00 committed by GitHub
parent 4609e858fe
commit 9993a93546
1 changed files with 32 additions and 31 deletions

View File

@ -537,37 +537,38 @@ ALTER TABLE basic_calls OWNER TO fusionpbx;
-- Name: detailed_calls; Type: VIEW; Schema: public; Owner: fusionpbx -- Name: detailed_calls; Type: VIEW; Schema: public; Owner: fusionpbx
CREATE VIEW detailed_calls AS CREATE VIEW detailed_calls AS
SELECT a.uuid, SELECT a.uuid AS uuid,
a.direction, a.direction AS direction,
a.created, a.created AS created,
a.created_epoch, a.created_epoch AS created_epoch,
a.name, a.name AS name,
a.state, a.state AS state,
a.cid_name, a.cid_name AS cid_name,
a.cid_num, a.cid_num AS cid_num,
a.ip_addr, a.ip_addr AS ip_addr,
a.dest, a.dest AS dest,
a.application, a.application AS application,
a.application_data, a.application_data AS application_data,
a.dialplan, a.dialplan AS dialplan,
a.context, a.context AS context,
a.read_codec, a.read_codec AS read_codec,
a.read_rate, a.read_rate AS read_rate,
a.read_bit_rate, a.read_bit_rate AS read_bit_rate,
a.write_codec, a.write_codec AS write_codec,
a.write_rate, a.write_rate AS write_rate,
a.write_bit_rate, a.write_bit_rate AS write_bit_rate,
a.secure, a.secure AS secure,
a.hostname, a.hostname AS hostname,
a.presence_id, a.presence_id AS presence_id,
a.presence_data, a.presence_data AS presence_data,
a.callstate, a.accountcode AS accountcode,
a.callee_name, a.callstate AS callstate,
a.callee_num, a.callee_name AS callee_name,
a.callee_direction, a.callee_num AS callee_num,
a.call_uuid, a.callee_direction AS callee_direction,
a.sent_callee_name, a.call_uuid AS call_uuid,
a.sent_callee_num, a.sent_callee_name AS sent_callee_name,
a.sent_callee_num AS sent_callee_num,
b.uuid AS b_uuid, b.uuid AS b_uuid,
b.direction AS b_direction, b.direction AS b_direction,
b.created AS b_created, b.created AS b_created,