Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::sip::statelessproxy(3pm) [debian man page]

Net::SIP::StatelessProxy(3pm)				User Contributed Perl Documentation			     Net::SIP::StatelessProxy(3pm)

NAME
Net::SIP::StatelessProxy - Simple implementation of a stateless proxy SYNOPSIS
.. DESCRIPTION
This package implements a simple stateless SIP proxy. Basic idea is that the proxy has either a single or two legs and that the packets are exchanged between those legs, e.g. packets incoming on one leg will be forwarded through the other leg. Because this is a stateless proxy no retransmits will be done by the proxy. If the proxy should work as a registrar too it should be put after a Net::SIP::Registrar in a Net::SIP::ReceiveChain. While forwarding the proxy will be insert itself into the packet, e.g. it will add Via and Record-Route header while forwarding requests. Additionally it will rewrite the Contact header while forwarding packets (see below), e.g. if the Contact header points to some client it will rewrite it, so that it points to the proxy and if it already points to the proxy it will rewrite it back so that it again points to the client. CONSTRUCTOR
new ( %ARGS ) Creates a new stateless proxy. With %ARGS the behavior can be influenced: dispatcher The Net::SIP::Dispatcher object managing the proxy. rewrite_contact Callback which is used in rewriting Contact headers. If one puts user@host in it should rewrite it and if one puts something without '@' it should try to rewrite it back (and return () if it cannot rewrite it back). A working default implementation is provided. nathelper Optional Net::SIP::NATHelper::* object. When given it will be used to do NAT, e.g. if the incoming and outgoing legs are different it will rewrite the SDP bodies to use local sockets and the nathelper will transfer the RTP data between the local and the original sockets. force_rewrite Usually the contact header will only be rewritten, if the incoming and outgoing leg are different. With this option one can force the rewrite, even if they are the same. METHODS
receive ( PACKET, LEG, FROM ) PACKET is the incoming packet, LEG is the Net::SIP::Leg where the packet arrived and FROM is the "ip:port" of the sender. Called from the dispatcher on incoming packets. The packet will be rewritten ("Via" and "Record-Route" headers added, Contact modified) and then the packet will be forwarded. For requests it can determine the target of the forwarded packet by looking at the route or if no route it looks at the URI. For responses it looks at the next Via header. do_nat ( PACKET, INCOMING_LEG, OUTGOING_LEG ) This will be called from receive while forwarding data. If nathelper is defined it will be used to rewrite SDP bodies and update nathelpers internal states to forward RTP data. Return values are like forward_outgoing in Net::SIP::Leg, e.g. it will return "[code,text]" on error or "()" on success, where success can be that the packet was rewritten or that there was no need to touch it. UNDOCUMENTED METHODS
idside2hash perl v5.14.2 2010-02-02 Net::SIP::StatelessProxy(3pm)

Check Out this Related Man Page

Net::SIP::Registrar(3pm)				User Contributed Perl Documentation				  Net::SIP::Registrar(3pm)

NAME
Net::SIP::Registrar - Endpoint for registering SIP clients SYNOPSIS
my $reg = Net::SIP::Registrar->new( dispatcher => $dispatcher, min_expires => 10, max_expires => 60, domains => [ 'example.com','example.org' ], ); DESCRIPTION
This package implements a simple SIP registrar. In the current implementation registry information are only kept in memory, e.g. they are not preserved over restarts. The implementation itself does not checking if the UAC is authorized to register the given address. This can be done with using an appropriate Authorize Module inside a ReceiveChain in front of the registrar. CONSTRUCTOR
new ( %ARGS ) This creates a new registar object, %ARGS can have the following keys: dispatcher Net::SIP::Dispatcher object manging the registar. Mandatory. max_expires Maximum expires time accepted. If the client requests a larger expires value it will be capped at max_expires Defaults to 300. min_expires Minimum expires value. If the client requests a smaller value the registrar will return a response of "423 Interval too brief". Defaults to 30. domains or domain Either string or reference to list of strings containing the names of the domains the registrar is responsable for. If not given the registrar accepts everything. METHODS
receive ( PACKET,LEG,FROM ) PACKET is the incoming packet, LEG is the Net::SIP::Leg where the packet arrived and FROM is the "ip:port" of the sender. Responses will be send back to the sender through the same leg. Called from the managing Net::SIP::Dispatcher object if a new packet arrives. Will return "()" and ignore the packet if it's not a REGISTER request or if it is not responsable for the domain given in the "From" heeader of the REGISTER request. If it is responsable for the packet it will create a response and return the code of the response. Responses are either "423 Interval too brief" if the request expires time is too small, or "200 Ok" if the expires time is 0 (e.g. the client should be unregistered) or greater or equal min_expires. In case of a successful response it wil also update the internal registry information. query ( ADDR ) Search for ADDR (which has format "proto:user@domain") in the registry. Returns @List of all sip or sips contacts for ADDR. expire Removes all expired entries from the internal registry. Called whenever the registry information gets updated from sub receive. perl v5.14.2 2010-08-09 Net::SIP::Registrar(3pm)
Man Page