Forum Discussion
Evelin_195902
Aug 21, 2015Nimbostratus
SIP irule for checking dialed string
Hi guys,
Please help me with creating na irule for checking a dialed string in SIP INVITE request.
I need to drop every call that has !=8 or !=0 symbols in the SIP INVITE. Like this:
sip:3286184@20...
Evelin_195902
Sep 17, 2015Nimbostratus
Thanks Syed, It's a bit more complicated because we may have valid SIP request without any meeting number: like sip: or sip:.
Here is the final version of my irule:
when SIP_REQUEST {
if { [SIP::method] == "INVITE" && [SIP::uri] matches_regex {^.+@.+$} }
{
if { not ([SIP::uri] matches_regex {^(sip:|sips:)[0-9]{7}@}) }
{
log local0. "SIP Drop for [SIP::uri] from [IP::remote_addr] - possible frauder"
drop
}
}
}
I hope this can be useful for other people having similar case.
regards, Evelin
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects