SOLVED Voicemail and Missed Call to email error

Status
Not open for further replies.

olf

New Member
May 2, 2018
3
1
3
43
FusionPBX 4.5.0
Switch 1.6.20 (64bit)
OS Debian 8.10
Does not work sending email missed call and voicemail. I get such errors. How to fix this?

5fa69ba2-5c62-4396-abc4-6851fc985996 2018-05-02 15:14:17.515446 [ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/app/failure_handler/index.lua:80: attempt to index global subject (a nil value)
5fa69ba2-5c62-4396-abc4-6851fc985996 /usr/share/freeswitch/scripts/app/failure_handler/index.lua:80: in function missed
5fa69ba2-5c62-4396-abc4-6851fc985996 /usr/share/freeswitch/scripts/app/failure_handler/index.lua:220: in main chunk
5fa69ba2-5c62-4396-abc4-6851fc985996 /usr/share/freeswitch/scripts/app.lua:48: in main chunk

5fa69ba2-5c62-4396-abc4-6851fc985996 2018-05-02 15:14:39.155488 [ERR] mod_lua.cpp:203 ...scripts/app/voicemail/resources/functions/send_email.lua:166: attempt to index global subject (a nil value)
5fa69ba2-5c62-4396-abc4-6851fc985996 ...scripts/app/voicemail/resources/functions/send_email.lua:166: in function send_email
5fa69ba2-5c62-4396-abc4-6851fc985996 /usr/share/freeswitch/scripts/app/voicemail/index.lua:579: in main chunk
5fa69ba2-5c62-4396-abc4-6851fc985996 /usr/share/freeswitch/scripts/app.lua:48: in main chunk

2018-05-02 15:21:11.395456 [ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/app/hangup/index.lua:80: attempt to index global 'subject' (a nil value)
/usr/share/freeswitch/scripts/app/hangup/index.lua:80: in function 'missed'
/usr/share/freeswitch/scripts/app/hangup/index.lua:148: in main chunk
/usr/share/freeswitch/scripts/app.lua:48: in main chunk
 
  • Like
Reactions: porrivmi

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,075
577
113
Version 4.5.0 is master and can become broken at any time. Unless you can debug it yourself you shouldn't really be using it.
 

leooliveira

New Member
Oct 13, 2018
1
0
1
42
Hello Olf

I had same problem on my FS and I resolv disabling all Email templates from another languages like en-us, en-gb, de-at etc. I create only a Email template on Portuguese (pt-br) and I started to receive emails from FS. So view if this could help you on your FS. My FS is on version 1.8.2 Debian 9.

Before Template:
Capture_Error_Before.PNG

After Creation of New Template:
Capture_Error_After.PNG

Screen Email Templates:
Screen_Email_Template.PNG
Email Template Configs
Screen_Email_Template2.PNG
 

markjcrane

Active Member
Staff member
Jul 22, 2018
509
180
43
50
You shouldn't need to disable all the other email templates. However yo do need to have a template for the language your language. We currently don't have many translations for the email templates.
 
  • Like
Reactions: leooliveira

olf

New Member
May 2, 2018
3
1
3
43
Hello Olf

I had same problem on my FS and I resolv disabling all Email templates from another languages like en-us, en-gb, de-at etc. I create only a Email template on Portuguese (pt-br) and I started to receive emails from FS. So view if this could help you on your FS. My FS is on version 1.8.2 Debian 9.

Before Template:
View attachment 547

After Creation of New Template:
View attachment 548

Screen Email Templates:
View attachment 549
Email Template Configs
View attachment 550
Thanks to your screenshots, I was able to figure problem. Besides creating the template, it was also necessary to prescribe the category correctly.

1540297521330.png
 
D

Deleted member 1951

Guest
Hey guys,

I've the same issue and can't fix it. Could someone give me a hint please?

- SMTP settings are configured
- Already checked the email templates, language in Advanced -> Default Settings is "en-us" so the email template for en-us is activated, the default one.

FusionPBX 4.4.3
Switch 1.8.2 (64bit)
OS Debian 9.6

2019-01-09 16:56:44.800591 [NOTICE] switch_cpp.cpp:1442 [voicemail]
2019-01-09 16:56:46.300591 [ERR] mod_lua.cpp:203 ...scripts/app/voicemail/resources/functions/send_email.lua:166: attempt to index global 'subject' (a nil value)
stack traceback:
...scripts/app/voicemail/resources/functions/send_email.lua:166: in function 'send_email'
/usr/share/freeswitch/scripts/app/voicemail/index.lua:588: in main chunk
/usr/share/freeswitch/scripts/app.lua:48: in main chunk

Thanks in advance!

Best Regards,
C

smtp-settings.png email-templates.png
 

Edson

Member
Aug 1, 2017
59
4
8
47
Hello Dears,

Iam facing the same error in here. Tried to apply the workarounds without success.
 

Attachments

  • email error.png
    email error.png
    12 KB · Views: 47

Miguel San Miguel

New Member
Apr 10, 2017
2
2
3
51
Germany
I found the bug (at least in my version). I edited /usr/share/freeswitch/scripts/app/voicemail/resources/functions/send_email.lua to see what's going on (with freeswitch.consoleLog("debug", "[voicemail] SQL " ..sql .. "\n"); on line 143), to see that template_language won't be read:

2019-11-25 13:31:35.968377 [DEBUG] switch_cpp.cpp:1443 [voicemail] 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' AND template_enabled = 'true' ORDER BY domain_uuid DESC [/CODE]​

As a workaround, we put our language direcly in the code, line 126:

sql = sql .. "AND template_language = 'de-de' ";​

This will not stand a system update, but let's hope that @markjcrane fixes it in the meantime...
 
  • Like
Reactions: jimmygee2003

bbrendon

New Member
Oct 17, 2017
10
1
3
46
I think I fixed this by deleting all the email templates and then doing an upgrade app defaults. I wasn't able to delete some of the templates from the gui. I had to go into the database and do it in there.
 
  • Like
Reactions: markjcrane
Status
Not open for further replies.