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
CREATE VIEW detailed_calls AS
SELECT a.uuid,
a.direction,
a.created,
a.created_epoch,
a.name,
a.state,
a.cid_name,
a.cid_num,
a.ip_addr,
a.dest,
a.application,
a.application_data,
a.dialplan,
a.context,
a.read_codec,
a.read_rate,
a.read_bit_rate,
a.write_codec,
a.write_rate,
a.write_bit_rate,
a.secure,
a.hostname,
a.presence_id,
a.presence_data,
a.callstate,
a.callee_name,
a.callee_num,
a.callee_direction,
a.call_uuid,
a.sent_callee_name,
a.sent_callee_num,
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.accountcode AS accountcode,
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,
a.sent_callee_name AS sent_callee_name,
a.sent_callee_num AS sent_callee_num,
b.uuid AS b_uuid,
b.direction AS b_direction,
b.created AS b_created,