Perl event socket client
From FreeSWITCH Wiki
Contents |
IMPORTANT
This is old stuff! We keep it for posterity's sake. You are better off using ESL FreeSWITCH::Client is broken.
Different types of Clients
There are at least two libraries, POE and Anthm's FreeSWITCH::Client. POE instructions are at the bottom of this page, a FreeSWITCH::Client example is also available.
Dependencies
Install via CPAN
perl -MCPAN -e'install POE' perl -MCPAN -e'install POE::Filter::FSSocket' perl -MCPAN -e'install Term::Visual'
Running Script
perl fsconsole.pl
At this point you will see a curses-based application ready for inputting commands.
Listening for events
At the console type any of the following examples
event plain ALL event plain CUSTOM conference::maintenance event plain CHANNEL_CREATE CHANNEL_DESTROY CUSTOM conference::maintenance event plain CUSTOM sofia::register sofia::expire
And then switch to event window by giving command w event, and you will begin to see events as they happen (you may need to make them happen). But even with nothing happening the system emits scheduler heartbeat events.
Executing API commands
Listing channels
show channels

