Call Us Today! 877.742.2583




Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reworded the section about the boolean type errors

About

This module allow allows one to write FreeSWITCH application applications using Python (https://www.python.org/)


Expand
titleClick here to expand Table of Contents
Panel
borderColorlightgray
bgColor#f7f7f7
borderWidth1
borderStyledotted

Table of Contents
maxLevel3
indent1em
stylenone
excludeAbout
printablefalse
 

...

Build error: Python.h: No such file or directory

If you see this:

 freeswitch_python.h:5:20: error: Python.h: No such file or directory

You need to install the python-dev package. You should also double-check the src/mod/languages/mod_python/Makefile to make sure it's using the version of python you are expecting. If not, you can edit the Makefile manually.

...

mod_python error: mod_python.c:293 Error calling python script

If you see this:

 [ERR] mod_python.c:293 Error calling python script
Message: expected string or Unicode object, NoneType found
or
Message: expected string or Unicode object, bool found

Check your dtmf_process function. If you used "session.setInputCallback()" function, then see the function what you registered as a callback. The registered callback function into "session.setInputCallback()" should be return string type. Not a None or bool type.
The return value is should be one of these. check your callback function. It should return one of these strings: "true", "false" , or "pause". Forgetting to return, or using return True or return False (as a boolean) will cause the error above.

See https://jira.freeswitch.org/browse/FS-1414

...