1 --- a/src/mod/languages/mod_python/freeswitch_python.cpp
2 +++ b/src/mod/languages/mod_python/freeswitch_python.cpp
3 @@ -319,7 +319,12 @@ switch_status_t Session::run_dtmf_callba
6 if ((pyresult = PyEval_CallObject(cb_function, arglist))) {
7 +#if PY_MAJOR_VERSION < 3
8 str = (char *) PyString_AsString(pyresult);
10 + //str = (char *) pyresult->encode('UTF-8');
11 + str = (char *) PyUnicode_AsUnicode(pyresult);