15 lines
413 B
MySQL
15 lines
413 B
MySQL
|
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
||
|
SQL SECURITY DEFINER
|
||
|
VIEW `pbx`.`queueMemberConf`
|
||
|
AS SELECT `m`.`id` AS `uniqueid`,
|
||
|
`m`.`queue` AS `queue_name`,
|
||
|
concat('SIP/', `m`.`extension`) AS `interface`,
|
||
|
0 AS `paused`
|
||
|
FROM `pbx`.`queueMember` `m`
|
||
|
UNION ALL
|
||
|
SELECT `p`.`id` AS `id`,
|
||
|
`p`.`queue` AS `queue`,
|
||
|
concat('Local/', `p`.`phone`, '@outgoing') AS `phone`,
|
||
|
0 AS `paused`
|
||
|
FROM `pbx`.`queuePhone` `p`
|