
=head1 NAME

Net::SIP - Framework SIP (Voice Over IP, RFC3261)

=head1 SYNOPSIS

...

=head1 DESCRIPTION

Net::SIP consists of packages for handling the SIP packets,
for transport of the packets, for processing the packets
and on top of all that a simplified layer for common tasks.

Addionally L<Net::SIP::Util> provides utility functions 
and L<Net::SIP::Debug> provides a debugging layer used 
by all these packets. Especially it provides the function
B<invoke_callback> which is used for all callback unless
otherwise in the documentation specified. This function
supports a variety of different callback styles.

For first and simple applications you best start with L<Net::SIP::Simple>.
If this is no longer enough you might look at the details of 
L<Net::SIP::Dispatcher>, L<Net::SIP::Endpoint>, 
L<Net::SIP::Register> and L<Net::SIP::StatelessProxy>.
Although these packages are in itself well documented the functionality
and the design is best understandable if you look how it gets used
in tghe source of L<Net::SIP::Simple>.

=head2 SIP packet handling

=over 4

=item L<SIP::Net::Packet> 

Is the base class for handling SIP packets and provides ways to
parse, construct and manipulate SIP packets.

=item L<SIP::Net::Request>

Is derived from L<SIP::Net::Packet> and handles the request packets.
Provides ways to create special requests like ACK or CANCEL based
on previous requests and responses, for creating responses based
on requests, for authorization of requests.

=item L<SIP::Net::Response> 

Is derived from L<SIP::Net::Packet> and handles the response packets.

=item L<SIP::Net::SDP>

Handles SDP bodies from SIP packets. Provides ways to parse, construct
these bodies, to get media information from them and to manipulate the
SDP data for NAT etc.

=back

=head2 Transport of SIP packets

=over 4

=item L<Net::SIP::Leg>

Encapsulates socket for transport of packet. Provides way to find out,
if target is reachable through this socket. Prepares incoming, outgoing
and forwarding packets by removing or adding header like B<Via>,
B<Record-Route>.

=item L<Net::SIP::Dispatcher>

Handles new packets coming in through a L<Net::SIP::Leg>.
Delivers outgoing packets through the appropriate L<Net::SIP::Leg>. 
Handles timeouts and retransmission of outgoing packets, lookup
of the appropriate leg through DNS etc.

=item L<Net::SIP::Dispatcher::Eventloop>

Simple implementation of an event loop for handling socket events
and timers.
Can be replaced to integrate into other event loops, like L<Tk>,
L<Lib::Event> or L<POE>. 

=back

=head2 Processing of SIP packets, application layer

=over 4

=item L<Net::SIP::Endpoint>

Implements a SIP endpoint (UAC,UAS). Provides ways to INVITE or BYE
calls or to handle incoming calls. Calls itself will be handled by
L<Net::SIP::Endpoint::Context>.

=item L<Net::SIP::Registrar>

Simple implementation of a registrar.

=item L<Net::SIP::StatelessProxy>

Simple implementation of a stateless proxy. Stateful proxies should
probably be implemented by putting multiple L<Net::SIP::Endpoint>s 
together.

=back

=head2 Simplified Layer for common tasks

=over 4

=item Net::SIP::Simple

Provides simple layer for common tasks and tests, like sending
a voice message to somebody, receiving a message or even implementing
an answer machine. Together with L<Net::SIP::Simple::RTP> it
is possible to handle simple RTP data (PCMU/8000).

=back

=head1 EXAMPLES

..


