Mailbox name on VM to email template

Status
Not open for further replies.

junction1153

Member
Jul 15, 2020
52
11
8
33
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:

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:

junction1153

Member
Jul 15, 2020
52
11
8
33
I am using cidlookup, and I remember I had to set one of these, which ever is missing:

effective_caller_id_name=${cidlookup_caller_id_name}
caller_id_name=${cidlookup_caller_id_name}
 
Status
Not open for further replies.