I have the following:
1 load balancer 2 servers running Kannel (smsbox and bearerbox) 2 GPRS modems attached to the Kannel servers (one per server) 1 external SMS provider I can reach using HTTP calls (for backup purposes only since it's slower and more expensive) N applications that want to send SMS messages The design I would want is something like this. >From the point of view of the application: 1. The application wants to send an SMS message, and connects to the load balancer to perform a sendsms call. 2. The load balancer routes the request to an alive Kannel server. 3. The kannel server queues the message, accepting it for delivery. >From the point of view of the kannel server (one option): 1. One of the kannel servers accepts the message for delivery and queues it. 2. The kannel server attempts to send the message via the directly attached SMS modem. 3. If the modem doesn't work, the kannel server attempts to send the message to the OTHER kannel server. a. The other kannel server attempts to send the message via its directly attached modem. b. If the modem doesn't work, the other kannel server attempts to send the message via the external sms provider. c. If the external SMS provider doesn't respond, keep the message queued, retrying all options in order of preference until successful. 4. If the other kannel server doesn't respond, the kannel server attempts to send the message via the external sms provider. 5. If the external SMS provider doesn't respond, keep the message queued, retrying all options in order of preference until successful. Theoretically, it should be possible to do something like this with kannel, but it involves some rather evil configuration, including setting up an SMSC that is basically a HTTP SMSC to call sendsms on the remote kannel server (or even the current kannel server). This would allow me to use multiple virtual smsc's, like this: (Please note, this is a theoretical idea of a configuration and not a working config) group = smsc smsc = at smsc-id = modem allowed-smsc-id = q0;q1;q2;q3 preferred-smsc-id = q0;q1;q2;q3 # ... group = smsc smsc = http smsc-id = external-provider system-type = generic allowed-smsc-id = q1;q3 preferred-smsc-id = q3 # ... group = smsc smsc = http smsc-id = self-q1 system-type = kannel send-url = "http://localhost:13013/cgi-bin/sendsms" smsc-username = "q1" allowed-smsc-id = q0 # ... group = smsc smsc = http smsc-id = other-q2 system-type = kannel send-url = "http://other-kannel-host:13013/cgi-bin/sendsms" smsc-username = "q2" allowed-smsc-id = q1;q3 preferred-smsc-id = q1 # ... group = smsc smsc = http smsc-id = self-q3 system-type = kannel send-url = "http://localhost:13013/cgi-bin/sendsms" smsc-username = "q3" allowed-smsc-id = q2 # ... group = smsbox bearerbox-host = localhost sendsms-port = 13013 # ... group = sendsms-user username = q1 password = secure user-allow-ip = "localhost" forced-smsc = q1 group = sendsms-user username = q2 password = secure user-allow-ip = "other-kannel-host" forced-smsc = q2 group = sendsms-user username = q3 password = secure user-allow-ip = "localhost" forced-smsc = q3 # This sendsms user is used by the applications! group = sendsms-user username = app1 password = secure forced-smsc = q0 The virtual SMSC:s in a different view: q0 modem (preferred) self-q1 q1 other-q2 (preferred) modem (preferred) external-provider q2 modem (preferred) self-q3 q3 modem (preferred) external-provider (preferred) other-q2 Granted, this is an ugly hack abusing the sendsms API to transitions messages through different "states" like some kind of warped state machine. Although I'm pretty sure it would work as designed, I am not at all happy with this config, and I'm hoping there's a better way to do this, but I can't see one. Am I missing something?
