Slightly different than the JS counterpart in that it calls back with a uuid rather than a session instance.
Use a nested method in order to have the PySession object in scope.
Hanging call problem
In the FreeSWITCH-1.4.7~64bit, some call case(python script) makes hanging call. But, it's not the matter of call scenario. Some call cases are fired wrong python exception handler. It might be fixed in the newest version of FreeSWITCH, but, it would be helpful for older version users.
In the freeswitch python script, we can set the hangup hook function. But after sets the hook, return or finish the script without destroy() function call, it makes hanging call.
Problem case :
Just finished the script without calling the destroy() function.
Fixed case :
Finished the script with calling the destroy() function.