Jump to content

How to send SMS Messages using the Tropo API


cashoefman

Recommended Posts

  • 7 months later...

Be aware that there are some errors in his instructions. I have made the corrections below and commented on his site. I am using this setup and it works very nicely.

 

In the example PHP script,

-- it should be '+1' instead of "+1"

-- it should be => "SMS" instead of =--> "SMS"

 

When you add the telephone number to the URL, do not include the 1 as it is covered by the '+1' in the script.

 

When setting up the network resource, set the Protocol to HTTPS. The image does show HTTPS, however the text states HTTP.

 

Also, it should be mentioned that this method of sending texts does require the network module for the ISY-99i (which is an extra $49 if you don't already have it installed).

 

Here is an example of the code I'm using.

 

Code:

<?php

 

call('+1'.$number, array( "network" => "SMS"));

 

if ($event == 1)

 

{say ("The ".$size." garage door is now ".$status.".");}

 

else if ($event == 2)

 

{say ("One of the motion sensors has a low battery!");}

 

else if ($event == "3")

 

{say ("placeholder for next alert type");}

?>

 

 

I'm using the $event variable to allow for multiple alert types and still use the same phone number assigned by tropo. If you used different apps for different events, then you will have a different number assigned to each. All of the variables get taken care of in the network resources setup.

 

Hope this helps.

 

~hoopty

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...