26: l_dnis VARCHAR2(3000);
27: l_unknown VARCHAR2(50);
28: l_view_by VARCHAR2(3000);
29:
30: l_custom_rec BIS_QUERY_ATTRIBUTES := BIS_PMV_PARAMETERS_PUB.Initialize_Query_Type;
31:
32: BEGIN
33: --
34: --Initialize p_custom_output
235: p_custom_sql := l_sqltext;
236:
237: l_custom_rec.attribute_name := ':l_row_type';
238: l_custom_rec.attribute_value:= 'CDR';
239: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
240: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
241:
242: p_custom_output.Extend();
243: p_custom_output(p_custom_output.count) := l_custom_rec;
236:
237: l_custom_rec.attribute_name := ':l_row_type';
238: l_custom_rec.attribute_value:= 'CDR';
239: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
240: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
241:
242: p_custom_output.Extend();
243: p_custom_output(p_custom_output.count) := l_custom_rec;
244:
243: p_custom_output(p_custom_output.count) := l_custom_rec;
244:
245: l_custom_rec.attribute_name := ':l_other_class' ;
246: l_custom_rec.attribute_value:= l_other_class;
247: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
248: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
249:
250: p_custom_output.Extend();
251: p_custom_output(p_custom_output.count) := l_custom_rec;
244:
245: l_custom_rec.attribute_name := ':l_other_class' ;
246: l_custom_rec.attribute_value:= l_other_class;
247: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
248: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
249:
250: p_custom_output.Extend();
251: p_custom_output(p_custom_output.count) := l_custom_rec;
252:
253: IF l_call_center IS NOT NULL
254: THEN
255: l_custom_rec.attribute_name := ':l_call_center';
256: l_custom_rec.attribute_value:= l_call_center;
257: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
258: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
259:
260: p_custom_output.Extend();
261: p_custom_output(p_custom_output.count) := l_custom_rec;
254: THEN
255: l_custom_rec.attribute_name := ':l_call_center';
256: l_custom_rec.attribute_value:= l_call_center;
257: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
258: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
259:
260: p_custom_output.Extend();
261: p_custom_output(p_custom_output.count) := l_custom_rec;
262: END IF;
264: IF l_classification IS NOT NULL
265: THEN
266: l_custom_rec.attribute_name := ':l_classification';
267: l_custom_rec.attribute_value:= l_classification;
268: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
269: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
270:
271: p_custom_output.EXTEND;
272: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
265: THEN
266: l_custom_rec.attribute_name := ':l_classification';
267: l_custom_rec.attribute_value:= l_classification;
268: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
269: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
270:
271: p_custom_output.EXTEND;
272: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
273: END IF;
275: IF l_dnis IS NOT NULL AND l_dnis NOT IN ('INBOUND','OUTBOUND')
276: THEN
277: l_custom_rec.attribute_name := ':l_dnis';
278: l_custom_rec.attribute_value:= l_dnis;
279: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
280: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
281:
282: p_custom_output.Extend();
283: p_custom_output(p_custom_output.count) := l_custom_rec;
276: THEN
277: l_custom_rec.attribute_name := ':l_dnis';
278: l_custom_rec.attribute_value:= l_dnis;
279: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
280: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
281:
282: p_custom_output.Extend();
283: p_custom_output(p_custom_output.count) := l_custom_rec;
284: END IF;
284: END IF;
285:
286: l_custom_rec.attribute_name := ':l_period_type_id';
287: l_custom_rec.attribute_value:= 1;
288: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
289: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.NUMERIC_BIND;
290:
291: p_custom_output.Extend();
292: p_custom_output(p_custom_output.count) := l_custom_rec;
285:
286: l_custom_rec.attribute_name := ':l_period_type_id';
287: l_custom_rec.attribute_value:= 1;
288: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
289: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.NUMERIC_BIND;
290:
291: p_custom_output.Extend();
292: p_custom_output(p_custom_output.count) := l_custom_rec;
293:
292: p_custom_output(p_custom_output.count) := l_custom_rec;
293:
294: l_custom_rec.attribute_name := ':l_period_start_time';
295: l_custom_rec.attribute_value:= '00:00';
296: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
297: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
298:
299: p_custom_output.EXTEND;
300: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
293:
294: l_custom_rec.attribute_name := ':l_period_start_time';
295: l_custom_rec.attribute_value:= '00:00';
296: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
297: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
298:
299: p_custom_output.EXTEND;
300: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
301:
300: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
301:
302: l_custom_rec.attribute_name := ':l_unknown';
303: l_custom_rec.attribute_value:= l_unknown;
304: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
305: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
306:
307: p_custom_output.EXTEND;
308: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
301:
302: l_custom_rec.attribute_name := ':l_unknown';
303: l_custom_rec.attribute_value:= l_unknown;
304: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.BIND_TYPE;
305: l_custom_rec.attribute_data_type := BIS_PMV_PARAMETERS_PUB.VARCHAR2_BIND;
306:
307: p_custom_output.EXTEND;
308: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
309:
306:
307: p_custom_output.EXTEND;
308: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
309:
310: l_custom_rec.attribute_name := BIS_PMV_PARAMETERS_PUB.VIEW_BY_VALUE;
311: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.View_By_Type;
312: l_custom_rec.attribute_value := 'BIX_TELEPHONY+BIX_CALL_CLASSIFICATION';
313:
314: p_custom_output.EXTEND;
307: p_custom_output.EXTEND;
308: p_custom_output(p_custom_output.COUNT) := l_custom_rec;
309:
310: l_custom_rec.attribute_name := BIS_PMV_PARAMETERS_PUB.VIEW_BY_VALUE;
311: l_custom_rec.attribute_type := BIS_PMV_PARAMETERS_PUB.View_By_Type;
312: l_custom_rec.attribute_value := 'BIX_TELEPHONY+BIX_CALL_CLASSIFICATION';
313:
314: p_custom_output.EXTEND;
315: p_custom_output(p_custom_output.COUNT) := l_custom_rec;