keywords: ip pbx voip gateway gsm gateway

×

Notice

The forum is in read only mode.
× Questions about G400/G410 Cards.

Group SMS

12 years 4 months ago #7643 by poolbulk
How to send a single SMS to a group of people. Pls give some source code or hint.

Thanks
12 years 4 months ago #7644 by Joe.Yung
Hello Poolbulk,

Normally, you should create some tables to be readed by your script(shell or other programming languages). Placing your reserved cell phone numbers to the tables and saving the SMS contents to a specific file.

Continuely send the same SMS to the cell number list until all of them are successfully sent.

For example:

/content ;using for saving SMS contents
/table ;using for listing reserved cell numbers

#!/bin/sh
context=`cat /context`

cat /table |
while read row;do
asterisk -rx "gsm send sms 1 $row \"$context\""
echo "gsm send sms 1 $row \"$context\""
done


Of course, you have to optimize your script like some different condictions for different contents of the SMS.

In theory, it is able to simultaneously send 1000 sms(es)for each time.

12 years 4 months ago #7645 by poolbulk
very helpful, thanks
12 years 4 months ago #7646 by poolbulk
This is working with single line text messages.

But when I want to sent a multi-line text msg with special characters then it fails.

Some hint please?
12 years 4 months ago #7647 by Joe.Yung
Yes, this is only a simple sample.As I said before, I think you should increase some conditions to restrict the special characters by regular expression.

Becasue we dont know what kinds of messages you would send. Thus, you have better create your own script in terms of your particular requirements.

12 years 4 months ago #7648 by poolbulk
This is not working with even single line messages containing spaces. it only sends the first word of messages and ignores anything after the first space character.

Pls guide.
Time to create page: 0.039 seconds
Powered by Kunena Forum