Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::sip::registrar(3pm) [debian 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)

Check Out this Related Man Page

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

NAME
Net::SIP::ReceiveChain - handle incoming packet by multiple receivers SYNOPSIS
# create proxy which works as a registrar too, but # all register requests should be authorized my $registrar = Net::SIP::Registrar->new... my $auth = Net::SIP::Authorize->new .... my $reg_chain = Net::SIP::ReceiveChain->new( [ $auth,$registrar ], methods => [ 'REGISTER' ], ); my $proxy = Net::SIP::StatelessProxy->new... my $chain = Net::SIP::ReceiveChain->new( [ $registrar,$proxy ] ); DESCRIPTION
This package is used to handle incoming packets by multiple receivers, e.g. make sure that requests for Net::SIP::Registrar will be authorized by Net::SIP::Authorize. Objects in the chain might be Net::SIP::Registrar, Net::SIP::StatelessProxy, Net::SIP::Authorize, Net::SIP::ReceiveChain itself and every other object which handles "receive" like described below. CONSTRUCTOR
new ( OBJECTS, %ARGS ) This creates a new registar object, OBJECTS is a reference to an array of objects implementing the "receive" method. %ARGS can have the following keys: filter A callback which gets called during "receive" with all arguments of the method. If it returns TRUE the packet will be handled by the chain, otherwise not. methods If filter is not given but methods is it will set filter to a callback which accepts only the methods specified in the array reference given to methods. 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. Returns TRUE if the packet was fully handled by one of the objects in the chain, else FALSE: o If a filter was given checks the packet against the filter and returns FALSE if the filter does return FALSE. o Otherwise it will call "receive" on all objects in the chain until one of these returns TRUE. In this case it will return TRUE. o If no object in the chain handled the packet it will return FALSE. perl v5.14.2 2010-02-02 Net::SIP::ReceiveChain(3pm)
Man Page