Skip to main content

Mod perl hangup hook

About

Simple perl hangup hook test w/ session data avail in $env obj

Click here to expand Table of Contents

How to

One cannot use $session in a hangup hook, so we need to extract the data from $env

# simple perl hangup hook test             
#
# be sure to have this line in your dp:
# <action application="set" data="session_in_hangup_hook=true"/>
#

our $env; ## Special "event" object containing all the vars...
my $info = $env->serialize();

freeswitch::consoleLog("WARNING","Well, here goes...\n$info\n\n");

1;

more examples to follow. Many thanks to Mercutioviz