diff --git a/app/call_centers/app_config.php b/app/call_centers/app_config.php index 5f93e6bb71..ca5fc2b0e3 100644 --- a/app/call_centers/app_config.php +++ b/app/call_centers/app_config.php @@ -37,7 +37,7 @@ $apps[$x]['destinations'][$y]['name'] = "call_centers"; $apps[$x]['destinations'][$y]['sql'] = "select call_center_queue_uuid, call_center_queue_uuid as uuid, queue_name as name, queue_extension as destination, queue_extension as extension, queue_description as description from v_call_center_queues"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' "; - $apps[$x]['destinations'][$y]['order_by'] = "queue_name asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(queue_extension) asc"; $apps[$x]['destinations'][$y]['field']['name'] = "queue_name"; $apps[$x]['destinations'][$y]['field']['destination'] = "queue_extension"; $apps[$x]['destinations'][$y]['field']['extension'] = "queue_extension"; diff --git a/app/call_flows/app_config.php b/app/call_flows/app_config.php index 13182c1734..6d4d53784f 100644 --- a/app/call_flows/app_config.php +++ b/app/call_flows/app_config.php @@ -36,7 +36,7 @@ $apps[$x]['destinations'][$y]['name'] = "call_flows"; $apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_extension as destination, call_flow_context as context from v_call_flows "; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "call_flow_name asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_extension) asc"; $apps[$x]['destinations'][$y]['field']['call_flow_uuid'] = "call_flow_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "call_flow_name"; $apps[$x]['destinations'][$y]['field']['destination'] = "destination"; @@ -51,7 +51,7 @@ $apps[$x]['destinations'][$y]['name'] = "call_flows"; $apps[$x]['destinations'][$y]['sql'] = "select call_flow_name as name, call_flow_uuid, call_flow_uuid as uuid, call_flow_extension as extension, call_flow_feature_code as destination, call_flow_context as context from v_call_flows "; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and call_flow_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "call_flow_extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(call_flow_feature_code) asc"; $apps[$x]['destinations'][$y]['field']['uuid'] = "uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "name"; $apps[$x]['destinations'][$y]['field']['destination'] = "destination"; diff --git a/app/conference_centers/app_config.php b/app/conference_centers/app_config.php index 4d452cac1d..185d132473 100644 --- a/app/conference_centers/app_config.php +++ b/app/conference_centers/app_config.php @@ -35,7 +35,7 @@ $apps[$x]['destinations'][$y]['label'] = "conference_centers"; $apps[$x]['destinations'][$y]['name'] = "conference_centers"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_center_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "conference_center_name asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(conference_center_extension) asc"; $apps[$x]['destinations'][$y]['field']['conference_center_uuid'] = "conference_center_uuid"; $apps[$x]['destinations'][$y]['field']['uuid'] = "conference_center_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "conference_center_name"; diff --git a/app/conferences/app_config.php b/app/conferences/app_config.php index 7f83645ac1..6d7c5d4443 100644 --- a/app/conferences/app_config.php +++ b/app/conferences/app_config.php @@ -35,7 +35,7 @@ $apps[$x]['destinations'][$y]['label'] = "conferences"; $apps[$x]['destinations'][$y]['name'] = "conferences"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and conference_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "conference_name asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(conference_extension) asc"; $apps[$x]['destinations'][$y]['field']['conference_uuid'] = "conference_uuid"; $apps[$x]['destinations'][$y]['field']['uuid'] = "conference_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "conference_name"; diff --git a/app/extensions/app_config.php b/app/extensions/app_config.php index 84a2597bb2..6a05c6beca 100644 --- a/app/extensions/app_config.php +++ b/app/extensions/app_config.php @@ -36,7 +36,7 @@ $apps[$x]['destinations'][$y]['name'] = "extensions"; $apps[$x]['destinations'][$y]['sql'] = "select extension_uuid, extension_uuid as uuid, extension, number_alias, effective_caller_id_name as name, user_context as context, description from v_extensions "; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "number_alias, extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(number_alias) asc, natural_sort(extension) asc"; $apps[$x]['destinations'][$y]['field']['extension_uuid'] = "extension_uuid"; $apps[$x]['destinations'][$y]['field']['destination'] = "number_alias,extension"; $apps[$x]['destinations'][$y]['field']['extension'] = "number_alias,extension"; diff --git a/app/fax/app_config.php b/app/fax/app_config.php index d73c939c92..dd8e3e7821 100644 --- a/app/fax/app_config.php +++ b/app/fax/app_config.php @@ -35,7 +35,7 @@ $apps[$x]['destinations'][$y]['label'] = "fax"; $apps[$x]['destinations'][$y]['name'] = "fax"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' "; - $apps[$x]['destinations'][$y]['order_by'] = "fax_extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(fax_extension) asc"; $apps[$x]['destinations'][$y]['field']['fax_uuid'] = "fax_uuid"; $apps[$x]['destinations'][$y]['field']['uuid'] = "fax_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "fax_name"; diff --git a/app/ivr_menus/app_config.php b/app/ivr_menus/app_config.php index 115f1df091..82c5364639 100644 --- a/app/ivr_menus/app_config.php +++ b/app/ivr_menus/app_config.php @@ -35,7 +35,7 @@ $apps[$x]['destinations'][$y]['label'] = "ivr_menus"; $apps[$x]['destinations'][$y]['name'] = "ivr_menus"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ivr_menu_extension) asc"; $apps[$x]['destinations'][$y]['field']['ivr_menu_uuid'] = "ivr_menu_uuid"; $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; @@ -52,7 +52,7 @@ $apps[$x]['destinations'][$y]['name'] = "ivr_menus_sub"; $apps[$x]['destinations'][$y]['sql'] = "select ivr_menu_name as name, ivr_menu_uuid as uuid from v_ivr_menus "; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ivr_menu_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "ivr_menu_extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ivr_menu_extension) asc"; $apps[$x]['destinations'][$y]['field']['name'] = "ivr_menu_name"; $apps[$x]['destinations'][$y]['field']['uuid'] = "ivr_menu_uuid"; $apps[$x]['destinations'][$y]['select_value']['ivr'] = "menu-sub:\${uuid}"; diff --git a/app/ring_groups/app_config.php b/app/ring_groups/app_config.php index 52d3090509..93b1a409f0 100644 --- a/app/ring_groups/app_config.php +++ b/app/ring_groups/app_config.php @@ -35,7 +35,7 @@ $apps[$x]['destinations'][$y]['label'] = "ring_groups"; $apps[$x]['destinations'][$y]['name'] = "ring_groups"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and ring_group_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "ring_group_extension asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(ring_group_extension) asc"; $apps[$x]['destinations'][$y]['field']['ring_group_uuid'] = "ring_group_uuid"; $apps[$x]['destinations'][$y]['field']['uuid'] = "ring_group_uuid"; $apps[$x]['destinations'][$y]['field']['name'] = "ring_group_name"; diff --git a/app/time_conditions/app_config.php b/app/time_conditions/app_config.php index 5ead1890a9..dcc3223e04 100644 --- a/app/time_conditions/app_config.php +++ b/app/time_conditions/app_config.php @@ -36,7 +36,7 @@ $apps[$x]['destinations'][$y]['name'] = "time_conditions"; $apps[$x]['destinations'][$y]['sql'] = "select dialplan_uuid as time_condition_uuid, dialplan_uuid as uuid, dialplan_name as name, dialplan_number as destination, dialplan_number as extension, dialplan_context as context, dialplan_description as description from v_dialplans "; $apps[$x]['destinations'][$y]['where'] = "where (domain_uuid = '\${domain_uuid}' or domain_uuid is null) and app_uuid = '4b821450-926b-175a-af93-a03c441818b1' and dialplan_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "dialplan_number asc"; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(dialplan_number) asc"; $apps[$x]['destinations'][$y]['field']['context'] = "context"; $apps[$x]['destinations'][$y]['field']['name'] = "dialplan_name"; $apps[$x]['destinations'][$y]['field']['destination'] = "dialplan_number"; diff --git a/app/voicemails/app_config.php b/app/voicemails/app_config.php index 4c1c1d9441..31e8100851 100644 --- a/app/voicemails/app_config.php +++ b/app/voicemails/app_config.php @@ -36,7 +36,7 @@ $apps[$x]['destinations'][$y]['name'] = "voicemails"; $apps[$x]['destinations'][$y]['sql'] = "select voicemail_uuid, voicemail_uuid as uuid, voicemail_id as destination, '*99' || voicemail_id as extension, voicemail_description as description, voicemail_description as name from v_voicemails"; $apps[$x]['destinations'][$y]['where'] = "where domain_uuid = '\${domain_uuid}' and voicemail_enabled = 'true' "; - $apps[$x]['destinations'][$y]['order_by'] = "voicemail_id asc "; + $apps[$x]['destinations'][$y]['order_by'] = "natural_sort(voicemail_id) asc "; $apps[$x]['destinations'][$y]['field']['uuid'] = "voicemail_uuid"; $apps[$x]['destinations'][$y]['field']['voicemail_uuid'] = "voicemail_uuid"; $apps[$x]['destinations'][$y]['field']['destination'] = "voicemail_id";