error sending voicemail to email in version 3.4.1

60 views
Skip to first unread message

Manuel Gálvez

unread,
Feb 16, 2024, 8:41:05 AM2/16/24
to ivozprovider-users
I am testing the new version 3.4.1.

I have a problem with sending voicemail to email. In residential clients it shows an error regarding the language of the device. I have solved it by entering the classic portal, defining the language to the device manually, since it seems that it does not inherit it from the client. In the new portal, the language option and the multi-device option do not appear in the devices tab. This is the message that was shown in the log:

Feb 16 13:45:35 ivoz php.onError[13873]: php.CRITICAL: Uncaught Error: Ivoz\Provider\Infrastructure\Persistence\Doctrine\NotificationTemplateDoctrineRepository::findVoicemailTemplateByCompany(): Argument #2 ($language) must be of type Ivoz\Provider\Domain\Model\Language\LanguageInterface, null given, called in /opt/irontec/ivozprovider/asterisk/agi/src/Voicemail/Sender.php on line 114 {"exception":"[object] (TypeError(code: 0): Ivoz\\Provider\\Infrastructure\\Persistence\\Doctrine\\NotificationTemplateDoctrineRepository::findVoicemailTemplateByCompany(): Argument #2 ($language) must be of type Ivoz\\Provider\\Domain\\Model\\Language\\LanguageInterface, null given, called in /opt/irontec/ivozprovider/asterisk/agi/src/Voicemail/Sender.php on line 114 at /opt/irontec/ivozprovider/library/Ivoz/Provider/Infrastructure/Persistence/Doctrine/NotificationTemplateDoctrineRepository.php:167)"} []
Feb 16 13:45:35 ivoz php.onError[13873]: request.CRITICAL: Uncaught PHP Exception TypeError: "Ivoz\Provider\Infrastructure\Persistence\Doctrine\NotificationTemplateDoctrineRepository::findVoicemailTemplateByCompany(): Argument #2 ($language) must be of type Ivoz\Provider\Domain\Model\Language\LanguageInterface, null given, called in /opt/irontec/ivozprovider/asterisk/agi/src/Voicemail/Sender.php on line 114" at /opt/irontec/ivozprovider/library/Ivoz/Provider/Infrastructure/Persistence/Doctrine/NotificationTemplateDoctrineRepository.php line 167 {"exception":"[object] (TypeError(code: 0): Ivoz\\Provider\\Infrastructure\\Persistence\\Doctrine\\NotificationTemplateDoctrineRepository::findVoicemailTemplateByCompany(): Argument #2 ($language) must be of type Ivoz\\Provider\\Domain\\Model\\Language\\LanguageInterface, null given, called in /opt/irontec/ivozprovider/asterisk/agi/src/Voicemail/Sender.php on line 114 at /opt/irontec/ivozprovider/library/Ivoz/Provider/Infrastructure/Persistence/Doctrine/NotificationTemplateDoctrineRepository.php:167)"} []


Correcting this above, the email is not sent either, now due to an error in the SSL connection with the local mail server. I use exim4, I have tried enabling starttls, but I can't get it to work. This issue occurs on residential devices and pbx devices. Could the use of smarttls be disabled? This is the message it returns.

Feb 16 14:03:11 ivoz php.onError[13935]: app.ERROR: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed [] []

Any suggestions? Thank you

Kaian

unread,
Feb 19, 2024, 3:54:10 AM2/19/24
to ivozprovider-users
Hi Manuel,

> I have solved it by entering the classic portal, defining the language to the device manually, since it seems that it does not inherit it from the client.

Quite strange, according to the code, if no language is configured, the company one will be used.

> In the new portal, the language option and the multi-device option do not appear in the devices tab.

There is a language field in Residential Device edit screen. I guess multi-device means multi-contact, which are also in the below screenshot.
Try clearing your browser cache.


Screenshot_20240219_094604.png


> Could the use of smarttls be disabled

We use symfony/mailer (https://symfony.com/doc/current/mailer.html) for sending emails, and the only setting I'm aware of is configured here (for the mail sent by asterisk).

Best regards

Manuel Gálvez

unread,
Feb 19, 2024, 5:34:19 AM2/19/24
to ivozprovider-users
I have solved the problem with STARTTLS by modifying the file that you have indicated with the following, now it sends correctly.

###> symfony/mailer ###
MAILER_DSN=smtp://jobs.ivozprovider.local:25?verify_peer=0
###< symfony/mailer ###

Best regards

Kaian

unread,
Feb 19, 2024, 6:49:51 AM2/19/24
to ivozprovider-users
Good to know!

Regarding the Residential Device Language issue, I will check again. I've noticed that the function I linked is related to LanguageCode (ES, EN, IT, ...) rather than LanguateId itself.
If I found something I'll open an issue to fix it for the next patch version.

Best regards 

Reply all
Reply to author
Forward
0 new messages