I'm going to set up any open-source XMPP server such as ejabberd or prosody to use it within a small group of people like a working chat with no federation. XMPP client monocles claims it supports voicemails. At the same time I've found no solution for transferring files like images or voice messages in XMPP. Is there such a solution? Or should I move to another technology like matrix? The only condition is peer-to-peer encrypted messaging with an ability to transfer images/voice messages. Voice calls are not necessary.
no solution for transferring files like images or voice messages in XMPP
Really? Gajim's chat window has an clip button to send and random local file (text, image, whatever). Obviously many other XMPP clients have file transfer support.
The only condition is peer-to-peer encrypted messaging
As seen in https://gajim.org/
End-to-End Encryption Chat securely using OMEMO, PGP, or OpenPGP.
If Gajim has it, then other clients do it too
I propose you: