If no provider configuration is used, both modems will serve the same queue and which one finds a message first, will send it.
Fallback device configuration needs queues and eventhandler script:
Smsd.conf global section:
eventhandler = /usr/local/bin/smsd_eventhandler
[queues]
GSM1 = /var/spool/sms/GSM1
GSM2 = /var/spool/sms/GSM2
[providers]
GSM1 = 0,1,2,3,4,5,6,7,8,9,s
GSM2 = 0
Smsd.conf modem sections:
[GSM1]
queues = GSM1
[GSM2]
queues = GSM2
With this kind of configuration GSM1 is used to send all messages (which are not specifically targeted to GSM2).
When sending fails, eventhandler script is called with "FAILED" as a first argument. Eventhandler code can check if a message was not already tried to send using GSM2, and if it was not, message can be moved back to the spooler with
Queue: GSM2 header.
For example:
#!/bin/bash
if [ "$1" = "FAILED" ]; then
# Check if there was Queue defined:
queue=`formail -zx Queue: < $2`
if [ "x$queue" != "xGSM2" ]; then
# Was not already handled using GSM2.
# Create a new message file:
FILE=`mktemp /tmp/send_XXXXXX`
# Copy a message and insert a Queue: header:
formail -f -I "Queue: GSM2" < $2 > $FILE
# Move message back to the spooler:
FILE2=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
mv $FILE $FILE2
fi
fi
'bash' Syntax Highlight powered by GeSHi Note that smsd itself does not support large sms account. It supports modems with AT command set. I'm not sure about your Multitech device, doest it offer AT command interface for the IP based large account? (I assume that it does not, but have to ask, because this kind of interface would be interesting for many users).