Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

Net::SIP::NATHelper::Server(3pm)			User Contributed Perl Documentation			  Net::SIP::NATHelper::Server(3pm)

NAME
Net::SIP::NATHelper::Server - server for Net::SIP::NATHelper::Client DESCRIPTION
This module is a wrapper around Net::SIP::NATHelper::Base and will receive it's instructions from Net::SIP::NATHelper::Client using RPC via sockets. CONSTRUCTOR
new ( [ HELPER ], @FDS ) Will create an object which listens on all file descriptors given in FDS for RPC from clients. If HELPER is given and a Net::SIP::NATHelper::Base object or derived it will be used, otherwise the helper will be created. METHODS
do_command ( FD ) Called when FD is available for reading. Calls accept on FD and reads the RPC packet from the resulting file descriptor, executes it and returns result back. Currently implemented commands are "allocate","activate" and "close" which will map to the local methods allocate_sockets, activate_session and close_session. One might redefine or add commands by changing "$self->{commands}". The key of this hash reference is the command name and the value is the callback. Unknown commands will be ignored, e.g nothing returned. loop This will loop over all file descriptors it gets from callbacks in Net::SIP::NATHelper::Base and the file descriptors for the RPC sockets. When file descriptors gets available for reading it will execute the callbacks, e.g. forward the RTP data or call do_command. In regular intervals it will call expire from Net::SIP::NATHelper::Base to expire the RTP sockets and sessions. allocate_sockets ( ... ) Calls allocate_sockets of the local Net::SIP::NATHelper::Base object. Takes and returns the same arguments. activate_session ( ... ) Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns 1 if the session was newly activated, -1 if it was activated before and false if activation failed. Updates callbacks into the event loop. close_session ( ... ) Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of closed sessions. Updates callbacks into the event loop. expire ( ... ) Calls expire of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of expired sessions. Updates callbacks into the event loop if necessary. BUGS
The local event loop should be pluggable, so that other implementations could be used. Right now it's a hard coded loop using select. perl v5.14.2 2009-01-23 Net::SIP::NATHelper::Server(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