Rechercher une page de manuel
Net::SIP::Redirect.3pm
Langue: en
Version: 2010-02-02 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
NAME
Net::SIP::Redirect - Send redirect to INVITEs based on lookup at a registrarSYNOPSIS
my $reg = Net::SIP::Registrar->new(...); my $redir = Net::SIP::Redirect( dispatcher => $dispatcher, registrar => $reg, );
DESCRIPTION
This package implements a simple redirection of INVITEs using the information provided by a registrar.CONSTRUCTOR
- new ( %ARGS )
- This creates a new redirect object, %ARGS can have the following keys:
-
- dispatcher
- Net::SIP::Dispatcher object manging the registar. Mandatory.
- registrar
- Registrar object. This is an object like a Net::SIP::Registrar, which has a "query(address)" method which returns a list of contacts.
-
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 an INVITE or ACK request.
For INVITEs it will query the registrar and return either "302 Moved Temporarily" with the list of contacts or "404 Not found" if the address is not registered.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre