Add trim function to is_local.lua.
This commit is contained in:
@@ -35,6 +35,13 @@
|
|||||||
--prepare the api object
|
--prepare the api object
|
||||||
api = freeswitch.API();
|
api = freeswitch.API();
|
||||||
|
|
||||||
|
--add the trim function
|
||||||
|
function trim(s)
|
||||||
|
if (s) then
|
||||||
|
return s:gsub("^%s+", ""):gsub("%s+$", "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--get the cache
|
--get the cache
|
||||||
cache = trim(api:execute("memcache", "get app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name));
|
cache = trim(api:execute("memcache", "get app:dialplan:outbound:is_local:" .. destination_number .. "@" .. domain_name));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user