Check for origination_callee_id_name

This was breaking when the variable wasn't set in the dialplan. 

Len discovered this :-)
This commit is contained in:
konradSC
2020-10-21 12:09:28 -04:00
committed by GitHub
parent 3dec7cb307
commit c2688fcf2a

View File

@@ -202,7 +202,9 @@
body = body:gsub("${voicemail_name_formatted}", voicemail_name_formatted);
body = body:gsub("${domain_name}", domain_name);
body = body:gsub("${sip_to_user}", id);
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
if (origination_callee_id_name ~= nil) then
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
end
body = body:gsub("${dialed_user}", id);
if (voicemail_file == "attach") then
body = body:gsub("${message}", text['label-attached']);