Do not send SMS (


#1

Greetings to all

There was a problem with the connection SMSSync(

Here’s what I do:

Install the application on the smart smssync.ushahidi.com

Threw on file hosting sms.php, it drove the example code smssync.ushahidi.com/developers

Create the root file text.txt rights 777 (on the test)

Configure the application, the secret key as in Example 123456

Calling the script as follows:

http://my-site.com/sms.php?from={my phone number}&message=test&secret=123456&sent_to={number of the recipient}

In file text.txt sent 3 lines:

From: {my phone number}
Message: test
Sent to: {number of the recipient}

Receive replies:

{"payload": {"success": true, "task": "send", "secret": "123456", "messages": [{"to": "number of the recipient", "message": "Your message has been received "," uuid ":" 1ba368bd-c467-4374-bf28 "}]}} {" payload ": {" success ": true," error ": null}}

And all (

SmsSync all this time gives “Gateway running”
in logs, only the settings that I changed
waiting list is empty
sent no
well and accordingly nothing is not going anywhere

Please help me understand

By the way, when there is an incoming SMS to my phone, they somehow get the status “pending” - what is it?


#2

Check the updated documentation – http://smssync.ushahidi.com/developers/


#3

Please, help

Re-read the documentation many times, do everything as written

When my phone receives a message, it is saved in test.txt


#4

Yes that is expected. What are you trying to achieve?


#5

I need a sms gateway. I want to send messages to their customers about the successful registration. I want my script to send POST the recipient’s number and the message text to file sms.php and he was sending an SMS through my phone.


#6

Likely to be correctly separated form for the test?


#7

I do not quite understand how the script works. (

I get a sms and it is written to the file test.tht - it works!

But how to make the sending of SMS from the site to the number of the recipient with my text?


#8

You have to code the script to do that. The demo script is there to guide you on how to integrate SMSsync with your web service. You might be interested in the send_instant_message function of the demo code.


#9

From send_instant_message i get the answer:


#10

Do you have Get Reply from Server enabled on SMSsync?


#11

its my settings


#12

Im create new file with only send_instant_message func


#13

See the attached image


#14

Thank you, enabled, but nothing has changed (

I need only function send_instant_message - Do not send SMS (

but she did not want to work (


#15

Make sure you have Get Reply from Server enabled. I don’t think it’s enabled. The image I shared with you, I took a wild guess because I can’t read Russian so I could be wrong with the field I asked you to enable.

Once you have it enabled make sure the server returns the sample JSON response

{"
    payload":{
        "success":true,
        "task":"send",
        "secret":"123456",
        "messages":[
        {
            "to":"+79212265506",
            "message":"Your message has been received",
            "uuid":"1ba368bd-c467-4374-bf28"
        }]
    }
}

Alternatively, you can enable Reply Message and use the configured canned response. When you have that enabled, make sure your server returns

{
    "payload":
    {
        "success": true,
        "error": null
    }
}

#16

Hi, I already encountered the same issue. I already enabled Reply From the Server and Enable Message Results API however, instant message was not sent. :frowning:


#17

I already sent a message hehe thanks anyway :slight_smile:


#18

Do you have Get Reply from Server enabled on SMSsync?

http://imgupp.com/img/1442154980.jpg


#20

Hi everyone,

I’m quite new with Ushahidi platform. I want to enable SMSsync. I followed the instruction explained here: http://smssync.ushahidi.com/configure/ but I do not have a setting option on application I installed on phone.

Can anyone help me please? Is there any step by step instruction (explained every single steps) to enable SMSsync?

Thanks in advance,
Bests


#26

sorry to bring this topic up again… i already turn on get reply from server
and try to use
function send_task()
{

{
    $m = "Sample Task Message";
    $f = "+6285741344875";
    $s = "true";
    $reply[0] = [
        "to" => $f,
        "message" => $m,
        "uuid" => "1ba368bd-c467-4374-bf28"
    ];
   
    $response = json_encode(
        ["payload"=>[
            "success"=>$s,
            "task"=>"send",
            "secret" => "123456",
            "messages"=>array_values($reply)]
        ]);
 
}

}

but its not going send any message :frowning: