Sourced from: http://gitlab.sangoma.com/projects/CORE/repos/freetdm/browse/public_freeswitch/sangoma-FS-1.2.patch