Net::SIP::Dropper::ByField(3pm) | User Contributed Perl Documentation | Net::SIP::Dropper::ByField(3pm) |
Net::SIP::Dropper::ByField - drops SIP messages based on fields in SIP header
my $drop_by_field = Net::SIP::Dropper::ByField->new( methods => [ 'REGISTER', '...', '' ], 'From' => qr/sip(?:vicious|sscuser)/, 'User-Agent' => qr/^friendly-scanner$/, ); my $dropper = Net::SIP::Dropper->new( cb => $drop_by_field ); my $chain = Net::SIP::ReceiveChain->new([ $dropper, ... ]);
With "Net::SIP::Dropper::ByField" one can drop packets based on the contents of the fields in the SIP header. This can be used to drop specific user agents.
Is array reference of method names, if one of the names is empty also responses will be considered. If not given all packets will be checked.
2023-02-04 | perl v5.36.0 |