logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Net::SIP::Blocker - blocks SIP requests based on method name

Constructor

       new ( BLOCK,DISPATCHER )
           Returns a new blocking object to be used in the chain.

           BLOCK  is  a  hash  reference  where  the keys are the methods to be blocked and their values are the
           reason why the method was blocked. The reason is the three digit code, optionally followed by a text.

           DISPATCHER is a Net::SIP::Dispatcher object.

Description

       Blocks incoming requests by method name and sends back custom error message.

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.

perl v5.40.0                                       2024-09-08                             Net::SIP::Blocker(3pm)

Name

       Net::SIP::Blocker - blocks SIP requests based on method name

Synopsis

         my $block = Net::SIP::Blocker->new(
                 block => { 'SUBSCRIBE' => 405, '...' => ... },
                 dispatcher => $disp,
         );

         my $chain = Net::SIP::ReceiveChain->new(
                 [ $block, ... ]
         );

See Also