Net::SIP::Registrar(3pm) | User Contributed Perl Documentation | Net::SIP::Registrar(3pm) |
Net::SIP::Registrar - Endpoint for registering SIP clients
my $reg = Net::SIP::Registrar->new( dispatcher => $dispatcher, min_expires => 10, max_expires => 60, domains => [ 'example.com','example.org' ], );
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.
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 will also update the internal registry information.
2023-02-04 | perl v5.36.0 |