<div dir="ltr">I found this (<a href="https://wiki.freeswitch.org/wiki/Examples_directory_py">https://wiki.freeswitch.org/wiki/Examples_directory_py</a>) example code for using mod_python to be quite poor. Some credit goes to the fact it&#39;s from 2008.<div><div>
</div></div><div><br></div><div>I decided to take this code update it, improve it, and learn how FreeSWITCH works in the process. Here&#39;s the code that&#39;s simplified, improved, and meets PEP8.</div><div><br></div><div><br></div><div>The only &quot;feature&quot; that was not ported over was the `checkforgreeting` function. Implementing a DB connection should be easy enough, though.</div></div>