diff --git a/applications/teletype/priv/templates/voicemail_to_email.html b/applications/teletype/priv/templates/voicemail_to_email.html index 52047dd9bcc..3cba1895b0f 100644 --- a/applications/teletype/priv/templates/voicemail_to_email.html +++ b/applications/teletype/priv/templates/voicemail_to_email.html @@ -44,7 +44,7 @@

You have a new voicemail from {{caller_id.name_number}} for your voicemail box at {{voicemail.vmbox_name}} ({{voicemail.vmbox_number}}).

-                        {% if voicemail.file_name %}
+                        {% if voicemail.vmbox_include_message_on_notify %}
                             

Please find the message audio file in the attachment. {% endif %}
diff --git a/applications/teletype/priv/templates/voicemail_to_email.text b/applications/teletype/priv/templates/voicemail_to_email.text index 42ac9973bbc..171deff620b 100644 --- a/applications/teletype/priv/templates/voicemail_to_email.text +++ b/applications/teletype/priv/templates/voicemail_to_email.text @@ -5,7 +5,7 @@ Hi{% if user.first_name %} {{user.first_name}}{% endif %}, You have a new voicemail from {{caller_id.name_number}} for your voicemail box at {{voicemail.vmbox_name}} (number: {{voicemail.vmbox_number}}). -{% if voicemail.file_name %} +{% if voicemail.vmbox_include_message_on_notify %} Please find the message audio file in the attachment. {% endif %} {% if voicemail.transcription %} diff --git a/applications/teletype/src/templates/teletype_voicemail_to_email.erl b/applications/teletype/src/templates/teletype_voicemail_to_email.erl index 83f35bc6db3..e164a5930dc 100644 --- a/applications/teletype/src/templates/teletype_voicemail_to_email.erl +++ b/applications/teletype/src/templates/teletype_voicemail_to_email.erl @@ -274,6 +274,9 @@ build_voicemail_data(DataJObj) -> ,{<<"box">>, kz_json:get_value(<<"voicemail_box">>, DataJObj)} %% backward compatibility ,{<<"vmbox_name">>, kz_json:get_value([<<"vmbox_doc">>, <<"name">>], DataJObj)} ,{<<"vmbox_number">>, kz_json:get_value([<<"vmbox_doc">>, <<"mailbox">>], DataJObj)} + ,{<<"vmbox_include_message_on_notify">> + ,kz_json:is_true([<<"vmbox_doc">>, <<"include_message_on_notify">>], DataJObj, 'true') + } ,{<<"msg_id">>, kz_json:get_value(<<"voicemail_id">>, DataJObj)} ,{<<"name">>, kz_json:get_value(<<"voicemail_id">>, DataJObj)} %% backward compatibility ,{<<"transcription">>, maybe_get_transcription(DataJObj)}