mod_erlang_event doesnt work with >= OTP25
The current version of mod_event_erlang fails to work with erlang OTP25 and above. The distribution protocol changed from version 5 to version 6 . OTP 23 to OTP 24 were the only ones that supported backward versions. As of OTP 25 only version 6 is supported.
Freeswitch builds against OTP25 libraries fine but throws up errors on running any bind or other events as the version has changed.
ei_helpers.c needs to be updated as well as the makefiles to detect the version of OTP version being run if backward compatibility is required.
This is a PSA.
Xadhoom made a fix for mod_kazoo. It's probably not too difficult to adopt the changes made in mod_kazoo into mod_erlang_event. Personally, I prefer mod_kazoo ;)
I'm with @voughtdq there. I got into mod_erlang_event quite deeply while trying to update our app running in production since 2020 with FreeSWITCH 1.10.1 and Erlang 22, and hitting quite a few issues (details in #2808).
Unfortunately, even though mod_kazoo is newer, better thought out (from what I can tell so far), and more performant, but it has even less documentation available than mod_erlang_event (which is quite a feat) and it is not a drop-in replacement for mod_erlang_event.
Hey @toraritte, I posted a gist which might help you figure out how to use mod_kazoo. It is written in Elixir, but if you look at the original mod_kazoo.erl you can get a feel for how to remove the kazoo-specific dependencies.
@macrocreation is this still an issue? I just burned 10 hours here on:
Sending initial call event for 558b8468-1fb6-4893-ab78-abd9b87ab842 2025-07-26 20:43:09.022939 97.30% [ERR] mod_erlang_event.c:1075 listener exit: status=-1, erl_errno=0 errno=0 2025-07-26 20:43:09.022939 97.30% [DEBUG] mod_erlang_event.c:1144 Connection Closed
Running latest OTP
@EP-PCOM (and others encountering this issue):
At the time of writing this (2025/07/26 2148 UTC), mod_erlang_event won't work with OTP versions higher than 22 (roughly). To quote section 1.2 and 1.3 from issue #2808 :
1.2
Potentialroot causeThis
erlang/otpcommit on Apr 27, 2020 fixedei_sendfunction by properly settingerl_errnoto 0 on success instead of ignoring it.
mod_erlang_event.c'slistener_main_looponly checkserl_errnofor the expected "errors" (EAGAINandETIMEDOUT), because none of theeifunctions used in the loop have ever re-set it - until the fix above. Now, when theHEARTBEATevent is sent,erl_erroris re-set to 0 and thewhileloop exits.1.3
PotentialfixChange
while ((status >= 0 || erl_errno == ETIMEDOUT || erl_errno == EAGAIN) && !prefs.done) {to
while ((status >= 0 || erl_errno == ETIMEDOUT || erl_errno == EAGAIN || erl_errno == 0) && !prefs.done) {