[Spce-user] Drop Null User Agents
Alex Lutay
alutay at sipwise.com
Thu Sep 9 03:03:49 EDT 2021
Hi Luis,
As I can see from the code, 'null' will not work, as the "item" is
quoted in code (processed as string).
> kamailio/proxy/kamailio.cfg
> 760: ... FOREACH item IN kamailio.proxy.block_useragents.ua_patterns %]$x_hdr(User-Agent) =~ "[% item %]" ...
It could be a valid point to improve NGCP User Agent Filtering feature
(a documentation link for the history):
> https://www.sipwise.com/doc/mr9.5.1/spce/ce/mr9.5.1/advancedconfiguration/advancedconfiguration.html#_user_agent_filtering
Reported internally as TT#140550, will be improved one day, no ETA.
PRO/Carrier versions has a feature Header Manipulations
> https://www.sipwise.com/doc/mr9.5.1/sppro/pro/mr9.5.1/advancedconfiguration/advancedconfiguration.html#header-manipulations
To add missing User Agent with some label to block it further.
Also it can fill empty field, etc.
The current workaround for you a simple patchtt for kamailio to handle
missing/empty User Agent field in a code I mentioned above.
Thank you for improving NGCP!
On 9/8/21 9:19 PM, [ EXT ] Luis Calderón wrote:
> Hi experts,
>
> I would like to know it there's a way to drop incomming Register and
> Invite messages without User agent header.
>
> O drop user agents like "friendly-scanner" or "sipvivious" in config.yml
> file. I've tried to add "null" but proxy drops all REGISTER or INIVTE
> messages.
--
Alex Lutay
More information about the Spce-user
mailing list