Net::S...yField(3pm)
π NAME π
Net::SIP::Dropper::ByField β bestie, this one drops SIP messages based on fields in the SIP header. That's the whole vibe. It's a little bouncer for your SIP traffic. πͺβ¨
πΈ SYNOPSIS πΈ
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, ... ]);
β¨ DESCRIPTION β¨
Okay so with Net::SIP::Dropper::ByField you can literally drop packets based on what's sitting inside the fields of the SIP header. Vibe check on every single message. The classic use case? Dropping specific user agents. Bye bye, you're not on the list π
π CONSTRUCTOR π
new ( ARGS )
ARGS is a hash, and it's giving "here are your keys" ποΈ:
methodsβ optional, okay? It restricts the dropping to specific methods only. It's an array reference of method names, and plot twist: if one of the names is empty, then responses will be considered too. If you justβ¦ don't give itmethodsat all, then all packets get checked. No exceptions, no mercy π«Άfield-nameβ literally any other argument that isn'tmethodscounts as a field name. Its value is a callback given toinvoke_callbackβ like, for instance, aRegexp. Yes bestie, regex is invited to the party π§
π METHODS π
run ( PACKET, LEG, FROM )
This one gets called as a callback from the Net::SIP::Dropper object. It returns true if the packet should be dropped β like when at least one of the fields you specified in the constructor matches the value you specified. One match and it's over for that packet, periodt. π₯
This page comes to you from the User Contributed Perl Documentation, rocking perl v5.40.1 and dated 2025-12-07. Ty for reading my little manpage era, mwah ππ¦πΈ
π¦ where this page comes from
- ubuntu resolute: libnet-sip-perl 0.840-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-sip-perl 0.840-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms