How to modify the SMS recipient phone using regular expressions
In the Ozeki SMS Gateway you can change the recipient phone number in the sms routing table. You are able to modify the rule by open it from the SMS Gateway Management console Outgoing section as the Figure 1 shows.
In order to manipulate the recipient phone number, open the actual routing rule's Modify tab and in it select the "Replace the 'TO' address" section. Here You can define an exact phone number where the messages will be sent or you are able to add a regular expression as you can see in the Figure 2. With this regexp if a phone number start with '06' it will replace to '+36'.
To test the phone number manipulation from the admin user, send a test message to a phone number what is start with 06 (Figure 3).
After the message is sent you will see in the admin user's sent folder the TO address will be changed to a phone number what starts with +36 as the Figure 4 shows.
You will also see in the service provider's Forwarded folder that the message is sent to the new phone number as you can see in the Figure 5.
More information
- How to change the SMS recipient phone number
- How to change the SMS Sender ID
- How to forward an SMS to multiple recipients
- How to swap the SMS sender and recipient
- How to change the SMS text
- How to append text to the end of the SMS
- How to encrypt SMS messages
- How to manipulate the recipient address using regexp
- How to change the SMS text with C#