diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua index c75f38e627..2139539f36 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -498,115 +498,115 @@ table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); table.insert(xml, [[ ]]); - if (string.len(call_group) > 0) then + if (call_group ~= nil) and (string.len(call_group) > 0) then table.insert(xml, [[ ]]); end - if (string.len(call_screen_enabled) > 0) then + if (call_screen_enabled ~= nil) and (string.len(call_screen_enabled) > 0) then table.insert(xml, [[ ]]); end - if (string.len(user_record) > 0) then + if (user_record ~= nil) and (string.len(user_record) > 0) then table.insert(xml, [[ ]]); end - if (string.len(hold_music) > 0) then + if (hold_music ~= nil) and (string.len(hold_music) > 0) then table.insert(xml, [[ ]]); end - if (string.len(toll_allow) > 0) then + if (toll_allow ~= nil) and (string.len(toll_allow) > 0) then table.insert(xml, [[ ]]); end - if (string.len(accountcode) > 0) then + if (accountcode ~= nil) and (string.len(accountcode) > 0) then table.insert(xml, [[ ]]); end table.insert(xml, [[ ]]); - if (string.len(effective_caller_id_name) > 0) then + if (effective_caller_id_name ~= nil) and (string.len(effective_caller_id_name) > 0) then table.insert(xml, [[ ]]); end - if (string.len(effective_caller_id_number) > 0) then + if (effective_caller_id_number ~= nil) and (string.len(effective_caller_id_number) > 0) then table.insert(xml, [[ ]]); end - if (string.len(outbound_caller_id_name) > 0) then + if (outbound_caller_id_name ~= nil) and (string.len(outbound_caller_id_name) > 0) then table.insert(xml, [[ ]]); end - if (string.len(outbound_caller_id_number) > 0) then + if (outbound_caller_id_number ~= nil) and (string.len(outbound_caller_id_number) > 0) then table.insert(xml, [[ ]]); end - if (string.len(emergency_caller_id_name) > 0) then + if (emergency_caller_id_name ~= nil) and (string.len(emergency_caller_id_name) > 0) then table.insert(xml, [[ ]]); end - if (string.len(emergency_caller_id_number) > 0) then + if (emergency_caller_id_number ~= nil) and (string.len(emergency_caller_id_number) > 0) then table.insert(xml, [[ ]]); end - if (string.len(missed_call_app) > 0) then + if (missed_call_app ~= nil) and (string.len(missed_call_app) > 0) then table.insert(xml, [[ ]]); end - if (string.len(missed_call_data) > 0) then + if (missed_call_data ~= nil) and (string.len(missed_call_data) > 0) then table.insert(xml, [[ ]]); end - if (string.len(directory_full_name) > 0) then + if (directory_full_name ~= nil) and (string.len(directory_full_name) > 0) then table.insert(xml, [[ ]]); end - if (string.len(directory_visible) > 0) then + if (directory_visible ~= nil) and (string.len(directory_visible) > 0) then table.insert(xml, [[ ]]); end - if (string.len(directory_exten_visible) > 0) then + if (directory_exten_visible ~= nil) and (string.len(directory_exten_visible) > 0) then table.insert(xml, [[ ]]); end - if (string.len(limit_max) > 0) then + if (limit_max ~= nil) and (string.len(limit_max) > 0) then table.insert(xml, [[ ]]); else table.insert(xml, [[ ]]); end - if (string.len(limit_destination) > 0) then + if (limit_destination ~= nil) and (string.len(limit_destination) > 0) then table.insert(xml, [[ ]]); end - if (string.len(sip_force_contact) > 0) then + if (sip_force_contact ~= nil) and (string.len(sip_force_contact) > 0) then table.insert(xml, [[ ]]); end - if (string.len(sip_force_expires) > 0) then + if (sip_force_expires ~= nil) and (string.len(sip_force_expires) > 0) then table.insert(xml, [[ ]]); end - if (string.len(nibble_account) > 0) then + if (nibble_account ~= nil) and (string.len(nibble_account) > 0) then table.insert(xml, [[ ]]); end - if (string.len(absolute_codec_string) > 0) then + if (absolute_codec_string ~= nil) and (string.len(absolute_codec_string) > 0) then table.insert(xml, [[ ]]); end - if (string.len(force_ping) > 0) then + if (force_ping ~= nil) and (string.len(force_ping) > 0) then table.insert(xml, [[ ]]); end - if (sip_bypass_media == "bypass-media") then + if (sip_bypass_media ~= nil) and (sip_bypass_media == "bypass-media") then table.insert(xml, [[ ]]); end - if (sip_bypass_media == "bypass-media-after-bridge") then + if (sip_bypass_media ~= nil) and (sip_bypass_media == "bypass-media-after-bridge") then table.insert(xml, [[ ]]); end - if (sip_bypass_media == "proxy-media") then + if (sip_bypass_media ~= nil) and (sip_bypass_media == "proxy-media") then table.insert(xml, [[ ]]); end - if (string.len(forward_all_enabled) > 0) then + if (forward_all_enabled ~= nil) and (string.len(forward_all_enabled) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_all_destination) > 0) then + if (forward_all_destination ~= nil) and (string.len(forward_all_destination) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_busy_enabled) > 0) then + if (forward_busy_enabled ~= nil) and (string.len(forward_busy_enabled) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_busy_destination) > 0) then + if (forward_busy_destination ~= nil) and (string.len(forward_busy_destination) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_no_answer_enabled) > 0) then + if (forward_no_answer_enabled ~= nil) and (string.len(forward_no_answer_enabled) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_no_answer_destination) > 0) then + if (forward_no_answer_destination ~= nil) and (string.len(forward_no_answer_destination) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_user_not_registered_enabled) > 0) then + if (forward_user_not_registered_enabled ~= nil) and (string.len(forward_user_not_registered_enabled) > 0) then table.insert(xml, [[ ]]); end - if (string.len(forward_user_not_registered_destination) > 0) then + if (forward_user_not_registered_destination ~= nil) and (string.len(forward_user_not_registered_destination) > 0) then table.insert(xml, [[ ]]); end - if (string.len(do_not_disturb) > 0) then + if (do_not_disturb ~= nil) and (string.len(do_not_disturb) > 0) then table.insert(xml, [[ ]]); end table.insert(xml, [[ ]]);