I had a request to add the name of the voice mail box in the VM to email template. Can easily be done:
Edit /usr/share/freeswitch/scripts/app/voicemail/index.lua
Under get session variables, add line:
Edit /usr/share/freeswitch/scripts/app/voicemail/resources/functions/send_email.lua
Under prepare the body, add line:
Use ${origination_callee_id_name} in your template
Hope this helps someone!
EDIT: This code is now in the latest git repo; just use ${origination_callee_id_name} in your VM to email template and everything should work
Edit /usr/share/freeswitch/scripts/app/voicemail/index.lua
Under get session variables, add line:
Code:
origination_callee_id_name = session:getVariable("origination_callee_id_name");
Edit /usr/share/freeswitch/scripts/app/voicemail/resources/functions/send_email.lua
Under prepare the body, add line:
Code:
body = body:gsub("${origination_callee_id_name}", origination_callee_id_name);
Use ${origination_callee_id_name} in your template
Hope this helps someone!
EDIT: This code is now in the latest git repo; just use ${origination_callee_id_name} in your VM to email template and everything should work
Last edited: