Hi,
When I send an sms with digisms, then I would also like to read feedback, ie did it timeout, or was sent OK or sent fail.
How can I do that?
Hi,
When I send an sms with digisms, then I would also like to read feedback, ie did it timeout, or was sent OK or sent fail.
How can I do that?
I can’t say I have used digisms to send SMS. I did not think it even works.
I use the CLI and the response will tell you if it is a timeout, failure or success.
import sarcli
from time import sleep
def writeCli(str):
# just write a raw string to the CLI
try:
cli = sarcli.open()
cli.write(str)
res = cli.read()
cli.close()
return(res)
except:
print “CLI ERROR****”
print “* Going to sleep for 15 seconds "
print "CLI ERROR***”
sleep(15) # Wait 15 seconds for a CLI to become free and try again
cli = sarcli.open()
cli.write(str)
res = cli.read()
cli.close()
return(res)
writeCli(‘sendsms 1234567890 “This is the SMS message”’)