* Merge commit from fork * [core] Fix XML escape encoder overrun and unsigned-char UTF-8 gate `switch_xml_ampencode()` had two independent defects in its UTF-8 numeric-escape path. Buffer overrun: the encoder grows its destination once per source byte, but the realloc margin reserved only the 10 data characters of the widest escape `"&#x%X;"` (a 21-bit code point rendered as 6 hex digits), not the terminating NUL that `sprintf` also writes. At the margin boundary that NUL landed one byte past the allocation. Reserve 11 bytes in the guard (10 data chars plus the NUL) and emit the escape with `snprintf` bounded to the remaining space, so the write stays in bounds even if the margin is ever miscounted. The other escape sinks are all within the widened margin and are unchanged. Char signedness: the lead-byte test `(*s >> 8) & 0x01` reads bit 8 of a plain `char`, which exists only after sign extension. Where `char` is signed the high bit sign-extends and the test passes; where `char` is unsigned it is always zero, so the numeric-escape path never ran and multi-byte UTF-8 was emitted raw, making serialized XML differ by architecture. Test bit 7 directly with `(*s & 0x80)`, correct regardless of `char` signedness. This also makes the overrun fix effective on unsigned-`char` builds, where the escape path now runs. Add unit test `test_utf_8_wide_codepoint`, which serializes U+10FFFF and long runs of it across buffer reallocations, sweeping an ASCII prefix so an escape is emitted at the minimum-headroom offset, and asserts the full serialized length.
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:
- Using FSGET [Recommended]
- Debian
- Raspberry Pi
- CentOS 7
Build from source
Example Dockerfiles to build FreeSWITCH and dependencies from source:
Step by step tutorials to build FreeSWITCH with provided dependency packages:
- Debian [Recommended]
- Raspberry Pi
- CentOS 7
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!