VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
thangappan143 at gmail... Guest
|
Posted: Mon Jul 27, 2009 12:23 am Post subject: [Freeswitch-users] Which method Can I use in IVR |
|
|
Dear all,
I am learning how to implement a IVR in Freeswitch.In our organization we are using Perl scripting language for doing this.So In freeswitch also I need to use Perl.
So far I heard two methods for executing IVR.
One is in dial plan using perl application.( In perl I create IVR menu and play the voice files)
Another one is using event socket.In dial plan I specified socket application and write a Perl script which is listening that particular port and get the session Id.
Have I understood correctly?.If it is correct means tell which method can I use?. Other make me understand well.
I have seen downloaded perl IVR menu from freeswitch site.In that they called some internal functions like playandGetDigits,StreamFile,ready ...etc.
These functions is been called by using $session variable.Where these functions are defined.?
--
Regards,
Thangappan.M |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Jul 27, 2009 12:09 pm Post subject: [Freeswitch-users] Which method Can I use in IVR |
|
|
See comments inline...
On Sun, Jul 26, 2009 at 10:07 PM, Thangappan.M <thangappan143@gmail.com (thangappan143@gmail.com)> wrote:
Quote: | Dear all,
I am learning how to implement a IVR in Freeswitch.In our organization we are using Perl scripting language for doing this.So In freeswitch also I need to use Perl. |
Tony, Brian, and I all like Perl.
Quote: |
So far I heard two methods for executing IVR.
One is in dial plan using perl application.( In perl I create IVR menu and play the voice files)
Another one is using event socket.In dial plan I specified socket application and write a Perl script which is listening that particular port and get the session Id.
|
Yes, you can call a script from the dialplan using syntax like this:
<action application="perl" data="/path/to/myivr.pl"/>
OR
You can call an outbound socket connection like this:
<action application="socket" data="127.0.0.1:8084 async full"/>
Quote: |
Have I understood correctly?.If it is correct means tell which method can I use?. Other make me understand well. |
You're on the right track. As to which method to use, that depends on your circumstances. How much does it need to scale? Do you want the IVR "brain" to reside physically on a different server than the FS server? Think about those things.
Quote: |
I have seen downloaded perl IVR menu from freeswitch site.In that they called some internal functions like playandGetDigits,StreamFile,ready ...etc.
These functions is been called by using $session variable.Where these functions are defined.?
|
When you call a Perl script from the dialplan the script automatically has access to a variable called $session. Check this for more information:
http://wiki.freeswitch.org/wiki/Mod_perl#Programming_with_mod_perl
Of course, when using the outbound event socket you will not have this magic $session variable. Your best bet to learn more about the socket interface is to look at the sample scripts in src/libs/esl/perl/. (server.pl, server2.pl, and server3.pl) If you are building an IVR with Perl and the event socket be sure to check out src/libs/esl/perl/ESL/IVR.pm which is a small Perl module with some simple abstractions to make IVR programming a bit more convenient.
I recommend that you try and create a simple IVR using each method and get a feel for how each one works.
-MC |
|
Back to top |
|
|
miles.chet at gmail.com Guest
|
Posted: Mon Jul 27, 2009 12:45 pm Post subject: [Freeswitch-users] Which method Can I use in IVR |
|
|
Michael,
For scale reasons is the best choice event socket?
thanks,
On Mon, Jul 27, 2009 at 2:00 PM, Michael Collins<msc@freeswitch.org> wrote:
Quote: | See comments inline...
On Sun, Jul 26, 2009 at 10:07 PM, Thangappan.M <thangappan143@gmail.com>
wrote:
Quote: |
Dear all,
I am learning how to implement a IVR in Freeswitch.In our organization we
are using Perl scripting language for doing this.So In freeswitch also I
need to use Perl.
|
Tony, Brian, and I all like Perl.
Quote: |
So far I heard two methods for executing IVR.
One is in dial plan using perl application.( In perl I create IVR
menu and play the voice files)
Another one is using event socket.In dial plan I specified socket
application and write a Perl script which is listening that particular port
and get the session Id.
|
Yes, you can call a script from the dialplan using syntax like this:
<action application="perl" data="/path/to/myivr.pl"/>
OR
You can call an outbound socket connection like this:
<action application="socket" data="127.0.0.1:8084 async full"/>
Quote: |
Have I understood correctly?.If it is correct means tell which method can
I use?. Other make me understand well.
|
You're on the right track. As to which method to use, that depends on your
circumstances. How much does it need to scale? Do you want the IVR "brain"
to reside physically on a different server than the FS server? Think about
those things.
Quote: |
I have seen downloaded perl IVR menu from freeswitch site.In that they
called some internal functions like playandGetDigits,StreamFile,ready
...etc.
These functions is been called by using $session variable.Where these
functions are defined.?
|
When you call a Perl script from the dialplan the script automatically has
access to a variable called $session. Check this for more information:
http://wiki.freeswitch.org/wiki/Mod_perl#Programming_with_mod_perl
Of course, when using the outbound event socket you will not have this magic
$session variable. Your best bet to learn more about the socket interface is
to look at the sample scripts in src/libs/esl/perl/. (server.pl, server2.pl,
and server3.pl) If you are building an IVR with Perl and the event socket be
sure to check out src/libs/esl/perl/ESL/IVR.pm which is a small Perl module
with some simple abstractions to make IVR programming a bit more convenient.
I recommend that you try and create a simple IVR using each method and get a
feel for how each one works.
-MC
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Mon Jul 27, 2009 2:04 pm Post subject: [Freeswitch-users] Which method Can I use in IVR |
|
|
On Mon, Jul 27, 2009 at 10:35 AM, roberto <miles.chet@gmail.com (miles.chet@gmail.com)> wrote:
Quote: | Michael,
For scale reasons is the best choice event socket?
|
Yes. You can have the IVR stuff running on a separate server altogether. It also gives you great flexibility in designing a setup where you can have a db backend and/or a backup IVR server. The socket method requires a little more effort up front but it pays off in power and flexibility.
-MC |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|