diff --git a/resources/install/scripts/app/is_local/index.lua b/resources/install/scripts/app/is_local/index.lua index 347b4c7b13..6e9ded9eaf 100644 --- a/resources/install/scripts/app/is_local/index.lua +++ b/resources/install/scripts/app/is_local/index.lua @@ -35,6 +35,13 @@ --prepare the api object api = freeswitch.API(); +--add the trim function + function trim(s) + if (s) then + return s:gsub("^%s+", ""):gsub("%s+$", "") + end + end + --get the cache cache = trim(api:execute("memcache", "get app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name));