Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    POE::Filter::FSSocket 0.07

    Download button

    No screenshots available
    Downloads: 361  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Paul Tinsley | More programs
    Perl Artistic License / FREE
    April 18th, 2007, 21:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    POE::Filter::FSSocket description

    POE::Filter::FSSocket is a POE filter that parses FreeSWITCH events into hashes.

    POE::Filter::FSSocket is a POE filter that parses FreeSWITCH events into hashes.

    SYNOPSIS

    #!/usr/bin/perl

    use warnings;
    use strict;

    use POE qw(Component::Client::TCP Filter::FSSocket);
    use Data::Dumper;

    POE::Component::Client::TCP->new(
    'RemoteAddress' => '127.0.0.1',
    'RemotePort' => '8021',
    'ServerInput' => &handle_server_input,
    'Filter' => 'POE::Filter::FSSocket',
    );

    POE::Kernel->run();
    exit;

    my $auth_sent = 0;
    my $password = "ClueCon";

    sub handle_server_input {
    my ($heap,$input) = @_[HEAP,ARG0];

    print Dumper $input;


    if($input->{'Content-Type'} eq "auth/request") {
    $auth_sent = 1;
    $heap->{'server'}->put("auth $password");
    } elsif ($input->{'Content-Type'} eq "command/reply") {
    if($auth_sent == 1) {
    $auth_sent = -1;

    #do post auth stuff
    $heap->{'server'}->put("events plain all");
    }
    }
    }

    POE::Filter::FSSocket parses output from FreeSWITCH into hashes. FreeSWITCH events have a very wide range of keys, the only consistant one being Content-Type. The keys are dependant on the type of events. You must use the plain event type as that is what the filter knows how to parse. You can ask for as many event types as you like or all for everything. You specify a list of event types by putting spaces between them ex: "events plain api log talk"
    Currently known event types (Event-Name):

    CUSTOM
    CHANNEL_CREATE
    CHANNEL_DESTROY
    CHANNEL_STATE
    CHANNEL_ANSWER
    CHANNEL_HANGUP
    CHANNEL_EXECUTE
    CHANNEL_BRIDGE
    CHANNEL_UNBRIDGE
    CHANNEL_PROGRESS
    CHANNEL_OUTGOING
    CHANNEL_PARK
    CHANNEL_UNPARK
    API
    LOG
    INBOUND_CHAN
    OUTBOUND_CHAN
    STARTUP
    SHUTDOWN
    PUBLISH
    UNPUBLISH
    TALK
    NOTALK
    SESSION_CRASH
    MODULE_LOAD
    DTMF
    MESSAGE
    CODEC
    BACKGROUND_JOB
    ALL

    Currently handled FreeSWITCH messages (Content-Type):

    auth/request
    command/response
    text/event-plain
    api/response (data in __DATA__ variable)
    log/data (data in __DATA__ variable)POE::Filter::FSSocket is a POE filter that parses FreeSWITCH events into hashes.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    POE filter | parse FreeSWITCH events | Perl module | POE::Filter::FSSocke | POE | filter

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM