Jump to content









Photo

SMS for International phone numbers

SMS Phone number Listeners

  • Please log in to reply
2 replies to this topic

#1 MCMGA_Aquaponics

MCMGA_Aquaponics

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 13 May 2016 - 01:49 PM

All -

 

I am sucessfully sending data to Carriots and have a Listener that responds properly to Context Data,  and sends me an email with the proper alert ... however I can NOT get an SMS message to my cell phone.   I have tried using both the wizard and using my own context data "if" expression.

 

Specifically, do you know how the phone number should look for the SMS to work?  I am using the "00" prefix as well as the "1" prior to my cell phone number.  I do not think my phone service is blocking the number for any reason.

 

Here is the code for two SMS tests I have done.   Could you take a look at the format of the phone numbers, and see if this may be the error.  I have tried spaces and no spaces between the numbers.

 

Listener test #1

 

if expression

 

context.data.S==0

 

then expression

 

import com.carriots.sdk.utils.Sms;

 

def sms = new Sms();

sms.to="00 1 281 435 XXXX";    (last 4 digits removed for posting)

sms.message="Your Carriots Listener has detected a power outage";

 

 

sms.send();

 

 

 

Listener test #2

 

If expression 

 

true

 

then expression

 

import com.carriots.sdk.utils.Sms;

 

def sms = new Sms();

sms.to="001281435XXXX";    (Last 4 digits removed for posting)

sms.message="Your Carriots Listener has received data and sends you a SMS";

 

sms.send();

 

 

Thanks for the help and advice.



#2 jpastor

jpastor

    Development leader

  • Administrators
  • 151 posts

Posted 23 May 2016 - 09:16 AM

Hi.

 

Can you tell us which country you want to send the SMS?

 

 

Best regards!



#3 gster_home

gster_home

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 20 June 2016 - 02:47 PM

Hello! I am from Romania and i face the  same problem. I run the code on terminal and the SDK engine response is: "Message: OK 

Details: 'OK'" but i don't receive any sms. I have to finish one important project but i have no idea how to solve this. Can you give me some advice please. The mobil phone operator is orange. Many Thanks!







Also tagged with one or more of these keywords: SMS, Phone number, Listeners

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users