Perl

From FreeSWITCH Wiki
Jump to: navigation, search

In FreeSWITCH, there are many ways to use Perl, not all of which require the mod_perl module or the CPAN Perl modules. You can use Perl in the following ways with FreeSWITCH:

  • Executing Perl scripts via curl etc to return XML configuration (only requires the curl module)
  • Sockets control / event socket interaction (send and receive events, execute commands, and IVR over socket interaction) through Perl ESL (does not require mod_perl only the Perl ESL module).
  • Application action / Standard execution to carry out a dialplan (requires mod_perl)
  • Native XML generation (requires mod_perl)

If you want/need the advanced control that mod_perl provides please see the mod_perl page for the full documentation on it.

Contents

Build/Install

There is no one way to install Perl support, as outlined above you can use Perl many different ways each having different requirements. See the mod_perl page for building mod_perl.

Execution of a script

You can run scripts directly from the console with:

perlrun /path/to/your/script.pl

If you want to just run a perl script(or any normal application) from a dialplan by:

<action application="system" data="/path/to/app.pl"/>

Example Scripts

See Also