Dmitry Verenitsin c25af8dd81 [mod_erlang_event] Fix correctness, OTP compatibility, and memory issues
Changes:
- Snapshot `erl_errno` after `ei_xreceive_msg_tmo()` — outbound `ei_*` calls in the same loop iteration clobber the thread-local errno before the listener checks it, causing wrong exit decisions and misleading logs.
- Fix `switch_size_t ` cast of `int` in `ei_link`* — `(switch_size_t *)&index` reads/writes 8 bytes through a 4-byte `int` on LP64. Use a real `switch_size_t` local.
- Dispatch `ERL_NEWER_REFERENCE_EXT` — newer OTP encodes refs with this tag; spawn replies from modern nodes were silently dropped to the default branch.
- Handle `ERL_EXIT2` — processes killed via `erlang:exit/2` arrive with this tag, not `ERL_EXIT`. Without it, sessions stayed attached to dead Erlang pids.
- Modernize `-spec` syntax in `freeswitch.erl` — old `-spec(F/N :: (...))` form was removed in OTP 21+; module no longer compiled.
- Fix multiple memory issues:
  - `ei_hash_ref()`: replace unbounded `sprintf` with `snprintf` + shared `EI_HASH_REF_LEN`.
  - `handle_msg_sendevent` / `handle_msg_sendmsg`: free the heap `value` on `ei_decode_string` failure; remove dead `if (!fail)` branches.
  - `listener_main_loop`: free `buf`/`rbuf` on the two `handle_msg` early-exit paths.
  - `erlang_sendmsg_function` app: move `ei_x_new_with_version` past arg validation and add `ei_x_free` at the end.
2026-05-26 00:12:08 +03:00
2026-05-08 02:26:52 +03:00
2015-05-28 12:47:19 -05:00
2026-05-07 20:18:11 +03:00
2015-12-15 17:02:49 +00:00
2014-12-26 17:22:20 +00:00
2025-07-22 20:07:15 +03:00
2014-08-01 14:47:38 -05:00
2026-05-07 20:18:11 +03:00
2013-04-04 20:52:47 -05:00
2025-07-31 19:38:54 +03:00
2023-02-17 15:24:03 -05:00
2013-12-23 22:43:06 +05:00

FreeSWITCH

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device. Combined with our hosted cloud platform, SignalWire, FreeSWITCH can interconnect with the outside world and scale to any size.

Visit https://signalwire.com or https://github.com/signalwire for more info.

Getting Started

FreeSWITCH is available on Github in source code format. You can checkout the development branch and build for many popular platforms including Linux, Windows, MacOSX and BSD. There is an issue tracker and pull request system available as part of the repo online.

See https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/ for more detailed instructions.

Additional Help

If you need assistance or have an interest in using a commercially supported build, you can contact coreteam@freeswitch.com to learn about professional services to support your project.

Voice-over-IP services - SIP / SMS - App Integrations

SignalWire is the primary sponsor of the FreeSWITCH project and was founded by the original developers of FreeSWITCH. SignalWire provides scalable services to enhance and scale your project such as SMS, SIP, Serverless Application hosting as well as programmable telecom. mod_signalwire which is distributed in this code base allows you to instantly pair with SignalWire and extend your FreeSWITCH.

Documentation

The main index for documentation is available at:

Release notes:

Install from packages

Step by step tutorials to install FreeSWITCH from packages:

Build from source

Example Dockerfiles to build FreeSWITCH and dependencies from source:

Step by step tutorials to build FreeSWITCH with provided dependency packages:

How to build Debian packages

Downloads

Contributions

GitHub pull requests are the recommended way to contribute to the FreeSWITCH source code:

Community

Slack is our chat system where the developers, the FreeSWITCH team, and the most active users are present. This is the place to get answers faster and chat with other users in real time. All you need to do is enter your email and verify it on the Slack signup page and you are ready to join in the discussion!

Slack Community:

Mailing list (ARCHIVED):

Thank you for using FreeSWITCH!

S
Description
FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
Readme Multiple Licenses 219 MiB
Languages
C 64.6%
C++ 21.1%
JavaScript 4.8%
Assembly 2%
Makefile 1.1%
Other 5.6%