SMS intercept deny list
OEMs can specify one or more filters in order to intercept incoming SMS messages intended for mobile operator partner applications that are not installed on the device.
Applications from mobile operator partners can receive notifications from incoming SMS messages. Specifically, the Windows 10 Mobile SMS intercept feature takes string filters declared by the partner application in its manifest and matches these with the opening text in the SMS messages. If there is a string match, the message is delivered to the corresponding application instead of the Microsoft messaging application.
As part of the SMS intercept feature, OEMs can specify one or more filters in a deny list to be matched against incoming SMS messages intended for mobile operator partner applications that are not installed on the device. If an SMS message matches a filter on the deny list, the message is dropped and never delivered to the messaging application or shown to the user. If filters are not specified as part of the deny list and the mobile operator application is not installed on the device, the SMS message is delivered to the Microsoft messaging application and displayed to the user.
The SMS intercept deny list follows the following filter and string matching rules:
Each filter can only be matched to one application ID. If multiple applications listed the same filter, the first application is used. This is not deterministic across boots.
The longest filter strings are matched to ensure that exact matches are made before partial matches.
A filter must be at least 3 characters long. If the filter is less than 3 characters long it will be ignored and omitted from the filter match list.
A filter can be up to 74 characters long.
A filter can only contain valid Unicode characters.
Byte by byte comparison is used without consideration for culture.
Comparisons are not case sensitive.
The string must start as the leading character of the message.
The filter string is considered a match if it is an exact match or it is a partial match where the entire filter is contained in the first segment of the body of the message.
The SMS intercept deny list runs after the partner application string matching has been done.
The following examples show the results for the string match based on the preceding rules:
|Filter string||Body of the SMS message||String match result|
Yes – exact match
Yes – exact match
//MOMessagingClient12345 You can sign on!
Yes – partial match
You can sign on now! //MOMessagingClient
No – wrong location
No – no wildcards in the filter string
No – filter string must be at least 3 characters
//MOMessageClient You can sign on!
No – not an exact match
No – not a leading string
No – leading whitespace or tab
Exact match (on //MOMessagingClient) over partial (//MO)
Create a customization answer file using the contents shown in the following code sample.
<?xml version="1.0" encoding="utf-8" ?> <ImageCustomizations xmlns="http://schemas.microsoft.com/embedded/2004/10/ImageUpdate" Name="SMSInterceptDenyList" Description="Use to specify one or more filters in a deny list to be matched against incoming SMS messages intended for mobile operator partner applications that are not installed on the device." Owner="" OwnerType="OEM"> <!-- Define the Targets --> <Targets> <Target Id=""> <TargetState> <Condition Name="" Value="" /> <Condition Name="" Value="" /> </TargetState> </Target> </Targets> <Static> <Settings Path="Multivariant"> <Setting Name="Enable" Value="1" /> </Settings> <Settings Path="AutoDataConfig"> <Setting Name="Enable" Value="0" /> </Settings> </Static> <!-- Specify the Variant --> <Variant Name=""> <TargetRefs> <TargetRef Id="" /> </TargetRefs> <Settings Path="Messaging/PerSimSettings/$(__ICCID)"> <!-- Set the value for the ports where the device will accept cellular broadcast messages. The value must be in REG_MULTI_SZ format, such as "Prefix1;Prefix2;Prefix3" and so on --> <Setting Name="SmsInterceptPrefixes" Value="" /> </Settings> </Variant> </ImageCustomizations>
Define Targets or conditions for when a variant can be applied, such as keying off a SIM's MCC, MNC, and SPN.
Define settings for a Variant, which are applied if the associated target's conditions are met.
SmsInterceptPrefixesvalue to one or more filters in a deny list. For example, Prefix1;Prefix2;Prefix3 and so on.
The following notes apply for this customization:
SMS messages that start with the filters (designated by the placeholders Prefix1,Prefix2, and so on) are dropped and never delivered. Filters are provided by the mobile operators.
The number of filters that OEMs can add in the deny list is not limited.
The system does not back up the set of settings and values for this feature.
The system only reads the deny list at boot time. If setting values are updated at a later time, the device must be restarted for the updated list to take effect.
Flash the build containing this customization to a device.
Send several SMS messages to the device (some that match the filters and others that do not).
Based on the filters that you added, verify if the messages that match the filters were correctly dropped and verify that those that don’t match any filters show up in the messaging app.