Dear list,<br>I am trying perl esl by this link<br><a href="http://wiki.freeswitch.org/wiki/Perl_ESL">http://wiki.freeswitch.org/wiki/Perl_ESL</a> <br clear="all">my dialplan is <br><extension name="ivrd-example1"><br>
<br><condition field="destination_number" expression="^99$"><br> <action application="log" data="INFO Let's do some ivrd, shall we?"/><br> <action application="set" data="ivr_path=/usr/local/freeswitch/conf/<a href="http://ivr1.pl">ivr1.pl</a>"/><br>
<action application="socket" data="<a href="http://127.0.0.1:9090">127.0.0.1:9090</a> full"/><br> </condition> <br> </extension><br><br>when i call to the freeswitch box it reads the ivr file and hangs up the call and even doesn't print the line "Starting ivrd-hello_world.pl...\n\n" as written in <a href="http://ivr1.pl">ivr1.pl</a><br>
<br>2010-07-19 11:43:35.352121 [INFO] mod_dptools.c:984 Let's do some ivrd, shall we?<br>EXECUTE sofia/external/<a href="mailto:5555@74.55.234.106">5555@74.55.234.106</a> set(ivr_path=/usr/local/freeswitch/scripts/<a href="http://ivr1.pl">ivr1.pl</a>)<br>
2010-07-19 11:43:35.352121 [DEBUG] mod_dptools.c:854 sofia/external/<a href="mailto:5555@74.55.234.106">5555@74.55.234.106</a> SET [ivr_path]=[/usr/local/freeswitch/scripts/<a href="http://ivr1.pl">ivr1.pl</a>]<br>EXECUTE sofia/external/<a href="mailto:5555@74.55.234.106">5555@74.55.234.106</a> socket(<a href="http://127.0.0.1:9090">127.0.0.1:9090</a> full)<br>
2010-07-19 11:43:35.360110 [NOTICE] switch_core_state_machine.c:185 sofia/external/<a href="mailto:5555@74.55.234.106">5555@74.55.234.106</a> has executed the last dialplan instruction, hanging up.<br>2010-07-19 11:43:35.360110 [DEBUG] switch_channel.c:2261 (sofia/external/<a href="mailto:5555@74.55.234.106">5555@74.55.234.106</a>) Callstate Change RINGING -> HANGUP<br>
<br><br>my <a href="http://ivr1.pl">ivr1.pl</a> is <br><br>#!/usr/bin/perl<br>#<br># <a href="http://ivrd-hello_world.pl">ivrd-hello_world.pl</a> <br>#<br># Launched from FreeSWITCH using socket app and ${ivr_path} variable<br>
#<br>use strict;<br>use warnings;<br><br># Use lib is easy, but you can also install your ESL.pm and esl/perl/ESL/* into site_perl<br>use lib '/root/freeswitch/libs/esl/perl'; <br>use ESL::IVR<br> <br>
$| = 1; # Turn off buffering<br>select STDERR; # We'll take this stream, thanks<br>print "Starting ivrd-hello_world.pl...\n\n";<br><br>## Set the root dir for sound files<br>my $sound_root = '/usr/local/freeswitch/sounds/en/us/callie';<br>
<br>## Create the connection object which is basically an IVR<br>my $con = new ESL::IVR; <br><br>## Get this channel's uuid and dialed number<br>my $uuid = $con->{_uuid};<br>my $dest = $con->getVar('destination_number'};<br>
<br>## Answer call, sleep for half second to let media get up and running<br>$con->execute('answer','',$uuid);<br>$con->execute('sleep','500');<br> <br>
## Play a simple greeting <br>$con->playback('/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav'); <br><br>## Tell the call what he/she dialed<br>$con->execute('sleep','500');<br>
$con->execute('say', "en number iterated $dest");<br><br>## Politely disconnect <br>$con->execute('sleep','1000');<br>$con->playback('/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-thank_you.wav');<br>
$con->execute('sleep','500');<br>$con->playback('voicemail/vm-goodbye.wav');<br><br>-- <br><br>Can any one suggest me from where i am going wrong.<br>