How do I set a hangup hook function in a Perl application called from the dialplan? After looking at freeswitch.pm I tried these: freeswitch::setHangupHook( &on_hangup ); $session->setHangupHook( &on_hangup ); but both failed with errors. Thanks - Nic