IO::Skype::ChatManager - Subsystem handling chats, messages and chat memberships


    my $skype = IO::Skype->new( components => [ 'chats' ] );
    my $chats = $skype->chats( );


Subsystem handling chats, messages and chat memberships. This embodies the 'chats'-component of IO::Skype.


  • new( \$skype )

    Constructor used internally. Use IO::Skype-chats( )> to obtain a valid object reference. It is automatically constructed if IO::Skype-new> is not given the 'components' parameter, or explicitly instructed to include the 'chats'-component.

  • getChatByMember( $connect, $peer1, $peer2, ... )
  • sendMessage( \@peers, $msg )
  • sendMessage( $chatid, $msg )



IO::Skype::CallManager - Place and receive calls and manage voice streams


    my $skype = IO::Skype->new( components => [ 'calls' ] );
    my $calls = $skype->calls( );
    $calls->call( 'echo123' );
    $calls->call( '+49123456789' );
    $skype->bindHandler( 'ringing', sub {
      my $id   = shift;
      my $peer = shift;
      $calls->receive( $id ) if ( $status eq 'RINGING' );
    } );



  • call, ( $callid, $property, $value )
  • ringing, ( $callid, $peer )

    Gets emitted upon receiving a call. The two parameters are the id of the respective call, and the Skype name of the caller.

  • hangup, ( $callid )

    Peer has hung up on call $callid.


  • call( $target )

    Place a call to $target, which could be either a Skype contact name from your address book, or a phone number including the country prefix.

  • receive( $callid )

    Receive a call that is ringing or on hold.

  • hangup( $callid )

    Hang up on call $callid. After this method is invoked, the call will be permanently finished. To just pause it, see the next method.

  • hold( $callid )

    Hold the call with id $callid. It can be resumed using receive( $callid ).

  • set_io( $callid, $stream, \@channels )

    Sets the input and output channels for an active call with id $callid. $stream can be either of 'input', 'output', or 'capture_mic'. The first two specify the in/out voice streams of that call, while 'capture_mic' refers to the microphone input of the local computer used for this call. The third parameter is a reference to an array containing the input sources or output destinations. Each element of the array is another array [ $type, $name ] with its first member describing the type of channel and the second one names the specific channel. Valid values for the channel type are:

    • soundcard - IO through the soundcard as usual

      Only 'default' is supported ($name may be omitted).

    • file - a file in the local filesystem

      The second argument is the filename to write the voice stream to or to read it from. Note that filenames are best specified in an absolute way because relative filenames are understood with respect to the Skype binary, which may cause confusion.

    • port - a TCP port on localhost

      $name is the TCP port number where Skype will expect a server listening for connections.


        set_io( $callid, 'output', [ [ 'soundcard', 'default' ], [ 'file', '/tmp/skype_output.wav' ] ] );
        set_io( $callid, 'output', [ [ 'port', 5432 ] ] );
        set_io( $callid, 'input', [ [ 'file', '/tmp/skype_recorded.wav' ] ] );
        set_io( $callid, 'capture_mic', [ [ 'file', '/tmp/skype_mic.wav' ] ] );

    WAV files are mono (1 channel), 16 bit @ 16kHz in little-endian.

  • get_io( $callid, $stream, $channel )

    As a counterpart to set_io, get_io is used to request information about where the streams are directed at the moment. $channel is either of 'soundcard', 'port', or 'file', and the return value will be the list of channels of that respective type.

  • list_io( $callid, $stream )

    A more concise method for getting all channels used at the moment. It returns a list just like \@channels passed to set_io.




    my $skype = IO::Skype->new( components => [ 'sms' ] );
    my $sms   = $skype->sms( );