This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sdk:tcp2sms [2015/07/03 08:55] fachet |
sdk:tcp2sms [2015/07/03 09:00] fachet |
||
---|---|---|---|
Line 2: | Line 2: | ||
/* DESC: This script send a SMS received by a TCP message "<number>:<text>" | /* DESC: This script send a SMS received by a TCP message "<number>:<text>" | ||
* Don't forget to configure and enable the SMS service first | * Don't forget to configure and enable the SMS service first | ||
+ | * The number format is international e.g. +4912345678 | ||
* Copyright (C) 2012 NetModule AG, Switzerland | * Copyright (C) 2012 NetModule AG, Switzerland | ||
*/ | */ | ||
Line 18: | Line 19: | ||
if (p = strchr(m, ":")) | if (p = strchr(m, ":")) | ||
if (nb_sms_send(left(m, p), right(m, strlen(m) - p - 1))) | if (nb_sms_send(left(m, p), right(m, strlen(m) - p - 1))) | ||
- | send(s, "Spooled\n"); | + | send(c, "Spooled\n"); |
else | else | ||
- | send(s, "Error\n"); | + | send(c, "Error\n"); |
} | } | ||
} | } | ||
</code> | </code> |