Added ringback silence capability (#5162)

* Update format_ringback.lua

* Update ringbacks.php
This commit is contained in:
agree
2020-02-27 17:42:07 -05:00
committed by GitHub
parent 9171de9edc
commit 7ac144fe05
2 changed files with 5 additions and 1 deletions

View File

@@ -14,6 +14,8 @@
ringback = trim(api:execute("global_getvar", "ringback"));
--convert to tone_stream
ringback = "tone_stream://" .. ringback .. ";loops=-1";
elseif (ringback == "silence") then
ringback = "silence"
elseif (ringback:match("%${.*}")) then
--strip the ${ and }
ringback = ringback:gsub("%${", "");
@@ -28,4 +30,4 @@
ringback = "tone_stream://" .. ringback .. ";loops=-1";
end
return ringback;
end
end