Voicemail to email

Status
Not open for further replies.

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
HAs anybody got much experience with this. Im trying to set it up but ssing this in the logs
[ERR] mod_lua.cpp:203 ...scripts/app/voicemail/resources/functions/send_email.lua:166: attempt to index global subject (a nil value)

Am I missing something obvious. (Its a learning curve thats getting a little easier each day....)

Here are the settings ive put in:

1585747323276.png
 

ewdpb

Member
Oct 3, 2019
151
19
18
Line 166 on send_email.lua is:

subject = subject:gsub("${caller_id_name}", caller_id_name);

So, I would say, your subject variable is not getting populated. It may be that subject = row["template_subject"]; is not getting any value. So, check the query starting on line 123.

What is your default or domain language set to? Make sure you have email templates defined (and enabled) for that language (Advanced --> Email Templates). So, the query actually fetches results.

If not transcription are enabled the SQL query is:

SQL:
SELECT * FROM v_email_templates WHERE (domain_uuid = :domain_uuid or domain_uuid is null AND template_language = :template_language AND template_category = 'voicemail' AND template_subcategory = 'default';

Hope it helps.
 
  • Like
Reactions: Andyd358

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Line 166 on send_email.lua is:

subject = subject:gsub("${caller_id_name}", caller_id_name);

So, I would say, your subject variable is not getting populated. It may be that subject = row["template_subject"]; is not getting any value. So, check the query starting on line 123.

What is your default or domain language set to? Make sure you have email templates defined (and enabled) for that language (Advanced --> Email Templates). So, the query actually fetches results.

If not transcription are enabled the SQL query is:

SQL:
SELECT * FROM v_email_templates WHERE (domain_uuid = :domain_uuid or domain_uuid is null AND template_language = :template_language AND template_category = 'voicemail' AND template_subcategory = 'default';

Hope it helps.
Where would i find the query you mention

Chhers

Andrew
 

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Like i said forgive my utter stupidity I just realised its the email teplate page you are showing me (It just does not look like mine)
 

ewdpb

Member
Oct 3, 2019
151
19
18
Like i said forgive my utter stupidity I just realised its the email teplate page you are showing me (It just does not look like mine)
There is no stupidity with this thing. We are all on the same boat trying to find our way around. I am not sure why your Templates do not look like that. What version are you running? The one that screenshot was taken from was 4.5.11.
 

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Well im slowly making some progress ive pgraded to 4.5.11 and now when i save a voicemail when i check the logs i dont get the error anylonger. However Im still not getting an email and when i click the email under status i just get File not found instead of a webpage.....
 

ewdpb

Member
Oct 3, 2019
151
19
18
Check the file /tmp/mailer-app.log. It should give you some more information.
 

ewdpb

Member
Oct 3, 2019
151
19
18
No worries, I really hope I can actually help.

You need to log in to the server console. Then you can check the latest entries with: tail -20f /log/mailer-app.log or open the file with vi /log/mailer-app.log.
 

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
mmmm this might point to something then

tail: cannot open '/log/mailer-app.log' for reading: No such file or directory
tail: no files remaining
 

Andyd358

Member
Aug 23, 2018
260
9
18
55
UK
Well blow me its working now. I checked that log aagin this monring and it was magically there. Although I did have an issue saying it could not connect to my mail server. Chnaged a few settings and ist now working. thanks for all the help and ponting me in the right directions.

I do love this forum some very helpful people around.
 

ewdpb

Member
Oct 3, 2019
151
19
18
Well blow me its working now. I checked that log aagin this monring and it was magically there. Although I did have an issue saying it could not connect to my mail server. Chnaged a few settings and ist now working. thanks for all the help and ponting me in the right directions.

I do love this forum some very helpful people around.
I am glad it worked! Sorry I was out of touch yesterday.
 
Status
Not open for further replies.