I am very excited to use envayasms gateway

1,315 views
Skip to first unread message

Pawan Joshi

unread,
Dec 28, 2011, 3:49:13 PM12/28/11
to envayasms
I have my own web site running on apache web server, android phone
2.2. Installed the envayasms on the phone.

I have downloaded the files from github.

Now I do not have a clue to proceed further.

for example I want to send sms from my website through android by
submitting a form to http post.

Now for example in the server field what should I fill. The name of my
website. The phone is becoming the gateway, so the form should be
submitted to phone's URL, but from where the phone will get the URL.

what I should do with the files I have downloaded. Do I need to upload
to my web server. why the same is need. If phone is becoming the sms
gateway.

Thanks.

Jesse Young

unread,
Dec 28, 2011, 4:48:18 PM12/28/11
to enva...@googlegroups.com
Hi Pawan,

The phone always acts as a HTTP client even when sending outgoing SMS
messages, so the Android phone doesn't have a URL.

The Server URL setting in EnvayaSMS is a URL to a script on your
Apache web server that implements the API described here:
http://sms.envaya.org/serverapi/

If you are using PHP on your Apache server, you can use the PHP
library and example code from
https://github.com/youngj/EnvayaSMS/tree/master/server/php , and then
change the code as necessary for your application. In that case, the
Server URL in EnvayaSMS would be the URL for a PHP script similar to
php/example/www/index.php.

-Jesse

Message has been deleted

MY WEB SOLUTIONS

unread,
Dec 28, 2011, 5:51:31 PM12/28/11
to enva...@googlegroups.com
Thanks a lot for such a quick response.

I have uploaded the folder to my web-site(ethny.in) running php and apache.(the example folder)

In the phone setting I have given the server name as ethny.in/example/www/index.php.

I am getting 200 respone ok from the phone as well as test html.

Now Please assist me little further in putting this to use.That is how can send sms by submitting to this url.

Option 1: creating a form and submitting that form via post to this server address that is
ethny.in/example/www/index.php

option 2: which I actually want to implement, that is I am using a fabrik forms plugin(jooma extension) which includes sms gateway file, which I have added suitably. I am attaching that file here for you to have a look and suggest any changes to make it work.

The line in particular:  class Kapow extends JObject{    , whether needs any change in that file I am not sure?

Thanks.

Apache log shows:
[Thu Dec 29 03:39:30 2011] [warn] [client 192.168.0.1] mod_fcgid: stderr: PHP Fatal error:  require_once(): Failed opening required '/var/www/clients/client44/web72/web/EnvayaSMS.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client44/web72/web/example/www/index.php on line 4
android.php

MY WEB SOLUTIONS

unread,
Dec 30, 2011, 12:31:37 PM12/30/11
to enva...@googlegroups.com
Hi,
I installed the envayasms gateway on my website, I am able to connect from to this server.

Now what is next step for sending sms to a mobile number from my website.
without your assistance I am held up.

Thnaks.
Pawan Joshi


On Thu, Dec 29, 2011 at 3:41 AM, Jesse Young <adu...@gmail.com> wrote:
Hi Pawan,
The phone always acts as a HTTP client even when sending outgoing
SMSmessages, so the Android phone doesn't have a URL.

The Server URL setting in EnvayaSMS is a URL to a script on yourApache
web server that implements the API described here:http://
sms.envaya.org/serverapi/
If you are using PHP on your Apache server, you can use the PHPlibrary
and example code fromhttps://github.com/youngj/EnvayaSMS/tree/master/server/php
, and thenchange the code as necessary for your application. In that
case, theServer URL in EnvayaSMS would be the URL for a PHP script
similar tophp/example/www/index.php.
-Jesse
On Dec 28, 12:49 pm, Pawan Joshi <mywebsolutions.co...@gmail.com>

Jesse Young

unread,
Dec 31, 2011, 12:04:10 AM12/31/11
to envayasms
To send outgoing SMS from your website, you would first need to set
the Poll Interval setting in the EnvayaSMS app. For example, if you
set the Poll Interval to 1 minute, the phone will make a request to
the Server URL every 1 minute with the POST parameter
action=outgoing . Your website should return an XML response with the
SMS messages to send, as specified in the "HTTP Response Format"
section of the http://sms.envaya.org/serverapi/ page.

If you are using PHP, you can use the EnvayaSMS PHP library to
generate the XML response, as shown in
https://github.com/youngj/EnvayaSMS/blob/master/server/php/example/www/index.php
under "case EnvayaSMS::ACTION_OUTGOING:". In that example, the
outgoing SMS messages are queued using regular files, but you could
also use any database or queue system to store outgoing messages on
your server before they are sent.

On Dec 30, 9:31 am, MY WEB SOLUTIONS <i...@mywebsolutions.co.in>
wrote:

Pawan Joshi

unread,
Dec 31, 2011, 5:01:48 AM12/31/11
to envayasms
I understand that to send outgoing SMS I first need need to set Poll
Interval.
Poll Interval needs to be set in the Phone right? I have already set a
poll interval on the phone.
EnvayaSMS PHP library generates XML response automatically if it finds
the valid SMS in the queue. Right.
for that I do not need do anything.

Your response is quite encouraging and I am sure with little more
guidance, I will be able to do it.

Now the part which I cannot make out is how I queue the SMS either
using regular files or database, which envaya SMS can use.
I have uploaded the PHP directory as it is, so the path becomes
http://mysite/php/example/www

Assuming that I created a form on my website with this fields;
1.To Phone Number:
2.SMS message:

Send button:
with hidden fields as
sender phone numer
password.

1.Now which url this form needs to be submitted to enable the SMS to
be queued for envaya SMS?
2.where the form should be submitted as form action "post" or anything
else?

Thanks & Regards.
Pawan Joshi

Jesse Young

unread,
Dec 31, 2011, 2:38:27 PM12/31/11
to envayasms
It's up to you how to process the form on your website. You can do it
any way you like using any URL. From the perspective of EnvayaSMS, it
doesn't make a difference.

On Dec 31, 2:01 am, Pawan Joshi <mywebsolutions.co...@gmail.com>
wrote:
> I understand that to send outgoing SMS I first need need to set Poll
> Interval.
> Poll Interval needs to be set in the Phone right? I have already set a
> poll interval on the phone.
> EnvayaSMS PHP library generates XML response automatically if it finds
> the valid SMS in the queue. Right.
> for that I do not need do anything.
>
> Your response is quite encouraging and I am sure with little more
> guidance, I will be able to do it.
>
> Now the part which I cannot make out is how I queue the SMS either
> using regular files or database, which envaya SMS can use.
> I have uploaded the PHP directory as it is, so the path becomeshttp://mysite/php/example/www

MY WEB SOLUTIONS

unread,
Dec 31, 2011, 2:54:30 PM12/31/11
to enva...@googlegroups.com
Thank you so much.
I think I am getting there, but still have some problem.
I have created a HTML form on my website
 
<form  method="post" action="php/example/send_sms.php">
with the below three fields

from
to
& message
and submit.

I have also included the phone number & password in the config.php,

But on reading of the send_sms.php, when submitting the form I should get a message like:
Message $id added to outgoing queue

But on submission I am not getting any message.

So this is where I am stuck at the moment.
Am I right in submitting the form to send_sms.php? or do I need to do something else.

Thanks once again & wish you a "Very Very Happy New Year"

Pawan Joshi

Jesse Young

unread,
Dec 31, 2011, 2:59:45 PM12/31/11
to envayasms
send_sms.php in the example code is intended to run on the command
line ('php send_sms.php [<from>] <to> "<message>"'), not as a web
form. To process your HTML form, you will need to create your own
script using PHP or another language.

On Dec 31, 11:54 am, MY WEB SOLUTIONS <i...@mywebsolutions.co.in>
wrote:

MY WEB SOLUTIONS

unread,
Dec 31, 2011, 3:10:02 PM12/31/11
to enva...@googlegroups.com
Thanks. I can create my own php file to process the HTML form, but then where that PHP file needs to be submitted to which URL?
or as you said earlier create a queue.

I can create a php file to process the html form, which can be forwarded as email or store in a database, but creating a Queue I do not have idea.

A little more assistance can enable me to achieve & understand this.

Thanks.
Regards
Pawan Joshi

Jesse Young

unread,
Dec 31, 2011, 3:42:11 PM12/31/11
to enva...@googlegroups.com
For general programming questions like this that are not actually
related to EnvayaSMS, it would be better to look at tutorials on the
web, or ask on a general question and answer site like StackOverflow.

MY WEB SOLUTIONS

unread,
Dec 31, 2011, 3:46:20 PM12/31/11
to enva...@googlegroups.com
Thanks.
But than it appears like the application is not intended for end users.

Again BTW is there any example script or php file which can process the html form for your application, which I can adept to my situation.

Thanks a lot though for sparing so much of time.

Thanks & Regards
Pawan Joshi.

Jesse Young

unread,
Dec 31, 2011, 3:49:02 PM12/31/11
to enva...@googlegroups.com
That's right, EnvayaSMS is intended for software developers, not end users.

On Sat, Dec 31, 2011 at 12:46 PM, MY WEB SOLUTIONS

贝亮田

unread,
Oct 15, 2013, 12:44:01 AM10/15/13
to enva...@googlegroups.com, in...@mywebsolutions.co.in
We have just make a public beta released on EnvayaSMS compatible server service - so that you don't have to deal with all the server stuffs.

Head to http://www.mobove.com/ to find out more.

Thank you.
Reply all
Reply to author
Forward
0 new messages