[GH-ISSUE #81] Feature request: Extend tasks to also make voice calls #69

Open
opened 2026-02-28 01:23:02 +03:00 by kerem · 1 comment
Owner

Originally created by @leonardoxc on GitHub (Mar 28, 2013).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/81

It would be interesting to add the ability to initiate voice calls from a json sync url.

voice calls can be sometimes cheaoer than SMS and can be used as reminders to a group of people for example.

proposed json:
{
"payload": {
"task": "send",
"secret": "secret_key",
"messages": [
{
"to": "+000-000-0000",
"message": "the message goes here"
},
{
"to": "+000-000-0000",
"message": "the message goes here"
}
],
"calls": [
{ "to": "+000-000-0000" },
{ "to": "+000-000-0000" }
]
}
}

Originally created by @leonardoxc on GitHub (Mar 28, 2013). Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/81 It would be interesting to add the ability to initiate voice calls from a json sync url. voice calls can be sometimes cheaoer than SMS and can be used as reminders to a group of people for example. proposed json: { "payload": { "task": "send", "secret": "secret_key", "messages": [ { "to": "+000-000-0000", "message": "the message goes here" }, { "to": "+000-000-0000", "message": "the message goes here" } ], "calls": [ { "to": "+000-000-0000" }, { "to": "+000-000-0000" } ] } }
Author
Owner

@leonardoxc commented on GitHub (Mar 28, 2013):

had a quick look at the code:

file:
src/org/addhen/smssync/util/MessageSyncUtil.java

line 272:

                    if ((task.equals("send")) && (secret.equals(urlSecret))) {
                        jsonArray = payloadObject.getJSONArray("messages");

                        for (int index = 0; index < jsonArray.length(); ++index) {
                            jsonObject = jsonArray.getJSONObject(index);

                            processSms.sendSms(jsonObject.getString("to"),
                                    jsonObject.getString("message"));
                        }

                    } else {
                        log(context.getString(R.string.no_task));
                    }

could be

                    if ((task.equals("send")) && (secret.equals(urlSecret))) {
                        jsonArray = payloadObject.getJSONArray("messages");

                        for (int index = 0; index < jsonArray.length(); ++index) {
                            jsonObject = jsonArray.getJSONObject(index);

                            processSms.sendSms(jsonObject.getString("to"),
                                    jsonObject.getString("message"));
                        }

                        jsonArray = payloadObject.getJSONArray("calls");
                        for (int index = 0; index < jsonArray.length(); ++index) {
                            jsonObject = jsonArray.getJSONObject(index);

                            MAKETHECALL(jsonObject.getString("to") );
                        }
                    } else {
                        log(context.getString(R.string.no_task));
                    }

but i have no idea how to write a MAKETHECALL() function

<!-- gh-comment-id:15592042 --> @leonardoxc commented on GitHub (Mar 28, 2013): had a quick look at the code: file: src/org/addhen/smssync/util/MessageSyncUtil.java line 272: ``` if ((task.equals("send")) && (secret.equals(urlSecret))) { jsonArray = payloadObject.getJSONArray("messages"); for (int index = 0; index < jsonArray.length(); ++index) { jsonObject = jsonArray.getJSONObject(index); processSms.sendSms(jsonObject.getString("to"), jsonObject.getString("message")); } } else { log(context.getString(R.string.no_task)); } ``` could be ``` if ((task.equals("send")) && (secret.equals(urlSecret))) { jsonArray = payloadObject.getJSONArray("messages"); for (int index = 0; index < jsonArray.length(); ++index) { jsonObject = jsonArray.getJSONObject(index); processSms.sendSms(jsonObject.getString("to"), jsonObject.getString("message")); } jsonArray = payloadObject.getJSONArray("calls"); for (int index = 0; index < jsonArray.length(); ++index) { jsonObject = jsonArray.getJSONObject(index); MAKETHECALL(jsonObject.getString("to") ); } } else { log(context.getString(R.string.no_task)); } ``` but i have no idea how to write a MAKETHECALL() function
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SMSSync#69
No description provided.