Update dialplan.lua

This commit is contained in:
FusionPBX 2019-05-23 13:48:21 -06:00 committed by GitHub
parent c8fc31179f
commit ab8fd432ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@
if (context_name == 'public' and context_type == 'single') then
sql = "select d.domain_name, dialplan_xml from v_dialplans as p, v_domains as d ";
sql = sql .. "where ( ";
sql = sql .. " p.dialplan_uuid in (select dialplan_uuid from v_destinations where destination_number = :destination_number) ";
sql = sql .. " p.dialplan_uuid in (select dialplan_uuid from v_destinations where (destination_number = :destination_number or destination_prefix || destination_number = :destination_number)) ";
sql = sql .. " or (p.dialplan_context like '%public%' and p.domain_uuid is null) ";
sql = sql .. ") ";
sql = sql .. "and p.domain_uuid = d.domain_uuid ";