GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::SIP::SIMPLE::RTP (3)

.ds Aq ’

NAME

Net::SIP::Simple::RTP - simple RTP handling for Net::SIP::Simple

CONTENTS

SYNOPSIS



  my $echo_10 = Net::SIP::Simple->rtp( media_recv_echo, output.pcmu-8000, 10 );
  my $announce = Net::SIP::Simple->rtp( media_send_recv, announce.pcmu-8000, 2 );



DESCRIPTION

This package handles simple RTP stuff for testing and small applications. It provides methods for receiving PCUM/8000 data and for echoing them back or for sending and receiving PCMU/8000 data.

It’s used from method <B>rtpB> in Net::SIP::Simple.

SUBROUTINES

media_recv_echo ( [ OUTPUT, DELAY ] ) Receives RTP data and echos them back to the sender. If OUTPUT is given it will be used as the file for saving the received data without the RTP header.

OUTPUT might also be a callback which gets the payload as argument.

If DELAY is >0 the data will not be echoed back immediatly but with an delay of DELAY packets (e.g. with DELAY 10 it will send back the first packet after it received the 10th packet). If DELAY is <0 the data will not be echoed back. If DELAY is not given or equal 0 the data will be echoed back immediatly.

If no traffic comes in for more then 10 seconds it will hang up the call because of inactivity.

media_send_recv ( INPUT, [ REPEAT, OUTPUT ] ) Will read data from file INPUT and send them as RTP to peer. It will assume that each data block in INPUT consists of 160 bytes, which is right for PCMU/8000 without RTP header. The RTP header will be added to the data.

If it reaches the end of the file it will stop unless REPEAT is given in which case it will repeat the sending REPEAT times (if REPEAT is less 0 it will repeat forever e.g. until the other party hangs up). On stopping it will invoke the callback <B>cb_rtp_doneB> from the connection params for the Net::SIP::Simple::Call or if this is not given it will close the call by issuing a BYE.

INPUT might also be a callback usable by <B>invoke_callbackB> in Net::SIP::Util which returns the data to send. In this case REPEAT is not used.

Incoming data will be written to the optional OUTPUT file like in <B>media_recv_echoB>. The content from OUTPUT has the same format as INPUT or OUTPUT from <B>media_recv_echoB>.

OUTPUT might also be a callback which gets the payload as argument.

If no traffic comes in for more then 10 seconds it will hang up the call because of inactivity.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::SIP::SIMPLE::RTP (3) 2009-01-23

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.