HTTP SMS API - service provider connection selection
This guide gives information on how you can select an attached GSM Modem or
IP SMS service provider connection when you send a message using the HTTP API.
In most cases you would use the outgoing
routing table to control which connection should be used for an outgoing message. The outgoing
routing table can be configured to make the decision based on sending user
account, message content, sender and recipient phone number. When a message
is being sent, it is matched against the (regular
expression) pattern stored in the outgoing routing table. The pattern
can match the sending user account, message content, sender and recipient phone number. If the pattern
matches the outgoing message, the appropriate rule is applied to decide which
GSM modem or IP SMS connection should be used to send the message.
If you do not want to use static routes defined in the outgoing routing table,
you have to enable the "Allow routing table override." feature
on the "Advanced" tab of the user "Configuration form" (Figure 1).
After this option is enabled you can define the serviceprovider name in the
HTTP request to specify which GSM modem or IP SMS service provider connection
should be used to send the message. (The service provider name is configured in
the configuration form of the GSM Modem or IP SMS Service provider connection.)
To send a message through a specific modem or IP SMS connection you have
to include the "serviceProvider" optional parameter in your request (Figure 2).
Example HTTP request for sending an SMS using GSMModem1: