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.

open outgoing route
Figure 1 - Open outgoing route

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 send 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'.

manipulate 'to' address
Figure 2 - Manipulate 'TO' address

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).

send test message
Figure 3 - Send test message

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.

to address modified
Figure 4 - TO address modified

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.

forwarded to the new phone number
Figure 5 - Forwarded to the new phone number

More information