Perl event socket client
From FreeSWITCH Wiki
Contents |
[edit]
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.
[edit]
Dependencies
Install via CPAN
perl -MCPAN -e'install POE' perl -MCPAN -e'install POE::Filter::FSSocket' perl -MCPAN -e'install Term::Visual'
[edit]
Running Script
perl fsconsole.pl
At this point you will see a curses-based application ready for inputting commands.
[edit]
Listening for events
At the console type any of the following examples
event plain ALL event plain CUSTOM conference::maintenence event plain CHANNEL_CREATE CHANNEL_DESTROY CUSTOM conference::maintenence 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.
[edit]
Executing API commands
Listing channels
show channels
