Net::S...Blocker(3pm)

πŸ’– Net::SIP::Blocker β€” the manual page, but make it cute

okay bestie so this is Net::SIP::Blocker, a Perl module from the user-contributed Perl documentation, section 3pm. it lives in the SIP-adjacent corner of CPAN and its whole personality is: blocking SIP requests by method name. that's it. that's the girl. πŸŽ€


🌸 NAME 🌸

Net::SIP::Blocker β€” blocks SIP requests based on method name</p>. she's a bouncer. she's the velvet rope. she does not let just anything through. πŸ’…


✨ SYNOPSIS ✨

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

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: this thing blocks incoming requests by method name and then sends back a custom error message of your choosing. iconic behaviour honestly. incoming request hits the blocker, blocker goes "not today", request gets the error, everyone moves on. 🌈


πŸ‘‘ CONSTRUCTOR πŸ‘‘

new ( BLOCK,DISPATCHER )

returns a shiny new blocking object that you then drop into the chain. main character energy, fr fr. 🫢

  • BLOCK is a hash reference where the keys are the methods you want to block and the values are the reason why that method got blocked. and that reason? it's the three digit code, optionally followed by a text. so like, a status code and then maybe some words if you're feeling chatty. πŸ’…
  • DISPATCHER is a Net::SIP::Dispatcher object. yes bestie, it needs one. no you can't skip it. πŸ™ˆ

πŸ’œ METHODS πŸ’œ

receive ( PACKET,LEG,FROM )

okay so this is the method that actually catches the request:

  • PACKET is the incoming packet. the actual thing arriving. πŸ“¦
  • LEG is the Net::SIP::Leg where that packet arrived. i.e. which leg she came in on. 🦡✨
  • FROM is the "ip:port" of whoever sent it. so you know exactly who's knocking. πŸ‘€

lowkey the whole vibe here is: method name in, error message out, no notes. periodt. πŸ’–

cute little sign-off: this page was generated from perl v5.40.1 on 2025-12-07, and it's part of the User Contributed Perl Documentation for Net::S...Blocker(3pm). mwah. πŸ’…πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from