In order to route MT messages through a specific channel, the following steps are required. Suppose we want all MT messages from ESME internal-esme, which is connected to opensmppbox, to be sent to smsc-id external-smsc in bearerbox.
- To do this, create the smsc-route group in /etc/kannel/opensmppbox.conf:
group = smsc-route
smsbox-id = internal-esme
smsc-id = external-smsc
- Now you need to add an allowing rule to smsc-id external-smsc, which will mean: messages that are defined with the smsc_id parameter and which match the specified ones are allowed to be sent. Example in /etc/kannel/kannel.conf:
group = smsc
smsc-id = external-smsc
smsc = smpp
...
allowed-smsc-id="external-smsc"
- Now it is necessary to deny in the remaining channels smsc_id external-smsc, so add to each remaining channel:
group = smsc
smsc-id = provider1
smsc = smpp
...
denied-smsc-id="external-smsc"
group = smsc
smsc-id = provider2
smsc = smpp
...
denied-smsc-id="external-smsc"
The allowed-smsc-id and denied-smsc-id parameters allow names to be enumerated with ;. Thus, we created rules with explicit routing through a specific smsc-id external-smsc for ESME internal-esme. Do not forget, to determinate MT routing, Kannel selects the appropriate channel for sending (see gw/smscconn.c, smscconn_usable function).