It is fairly simple. It is as simple as b number table. In the tariff structure (for SMS), we define the codes.
For ex: If we got to allow SMS to STC – Saudi, we will define 96650, 96655 in the structure.
Now, if you want to block SMS to 966554 level alone, in the tariff structure define it like
Hope you got the point.