On Tue, Jun 10, 2008 at 10:04 AM, Madan KN <[EMAIL PROTECTED]> wrote: > Hi, > Can anyone tell me how to add alternative SMPP SMSC Host. My Operator is > providing me with 2 hostname. > 1. Primary.tar > 2. Failover.
Interesting one ;) There is no way to do this automatically by Kannel. In order to do this you'll have to change the configuration and restart the bearerbox and smsbox (if you use Kannel as smsgw). You should monitor the bearerbox state, if it fails to connect to the primary node, change the smsc configuration and restart the bearerbox and smsbox. When you loose the connection with the SMSC in the bearerbox.log you'll get something like: 2006-08-23 14:39:16 [32448] [40] ERROR: SMPP[SMSC_ID]: I/O error or other error. Re-connecting. 2006-08-23 14:39:16 [32448] [40] ERROR: SMPP[SMSC_ID]: Couldn't connect to SMS center (retrying in 10 seconds). Maybe by monitoring the log file for this messages, especially the second one, counting the number of apereances and calling a shell script would do the trick. I was using this[1] php script to monitor log files. It's easy configurable, you set the log file, string (log line) and it can send e-mail and call shell script. In the shell script you should change the smsc settings from primary to failover and restart the bearerbox and smsbox. The script runs as daemon and you can set the time interval on which it checks the logs. [1]http://www.moongate.ro/products/PHPLog/ HTH, Jovan
