Separate modems

Separate modems SearchSearch
Author Message
Leandro Alves
New member
Username: Leandrocalves

Post Number: 5
Registered: 01-2012
Posted on Friday, February 03, 2012 - 06:28 pm:   

Good afternoon everyone,
I wonder how can I configure a modem only to send sms from a particular user and others send other modems?

For example, if I had 3 modems and a modem was the only User leandro and the other two modems you were all other User, how?

Thank you.
Leandro Alves
New member
Username: Leandrocalves

Post Number: 6
Registered: 01-2012
Posted on Sunday, February 05, 2012 - 08:32 pm:   

Can anyone help?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3757
Registered: 08-2008
Posted on Monday, February 06, 2012 - 09:46 pm:   

Hi Leandro,

The easiest way to do this is to make sure to configure a phone number for each modem in NowSMS. This is done by going to the "SMSC" page, selecting a modem, and pressing the "Properties" button.

For the modem that will only be used by a specific user, also UNcheck the setting that says "Support any outbound message traffic". (This means that the modem will only accept traffic that is explicitly routed to it.)

Next, go to the "SMS Users" page, and there is a "Forced Sender Address" property for the user that should be set to match the "Phone Number" of the modem through which this users messages should be routed.

There is some more information here: http://www.nowsms.com/routing-sms-messages-to-a-specifc-smsc-route

But hopefully I've explained it more clearly in this post.

--
Des
NowSMS Support
Leandro Alves
New member
Username: Leandrocalves

Post Number: 7
Registered: 01-2012
Posted on Tuesday, February 07, 2012 - 01:51 pm:   

He sure is working right.
Another question, what is the command to get the user logged in? when you send the message, the file has SubmitOK.HTM the variable @@SubmitInfo@@ right, what is the variable for it to get the user logged in?

thank you
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3763
Registered: 08-2008
Posted on Tuesday, February 07, 2012 - 11:39 pm:   

There is no variable to retrieve the logged in user.

What do you want to do with that value?

--
Des
NowSMS Support
Leandro Alves
New member
Username: Leandrocalves

Post Number: 8
Registered: 01-2012
Posted on Wednesday, February 08, 2012 - 01:13 pm:   

I need to get the variable user page submitok logged in to post this variable.
Ex: writedb.php?user=userlogged&result=@@SubmitInfo@@
Would have any idea how this variable can take the user who is logged into the system? I use that parameter to "Require authentication for web interface" so that users loggin on the page.

Thank you.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3771
Registered: 08-2008
Posted on Friday, February 10, 2012 - 04:04 pm:   

I wish there were some more replacement parameters, but there are not.

I do, however, have a suggestion.

Instead of trying to put that logic into the web page, use the NowSMS accounting callback. The advantage of the accounting callback is that it gets recorded even if the web page is bypassed.

The following link describes the SMS accounting callbacks:

http://www.nowsms.com/dynamic-sms-message-routing-with-http-callbacks

The basic idea is that there is one callback before NowSMS accepts the message from the user (ask for permission), then another callback when the message is accepted by NowSMS. That second callback will provide you with similar (but more complete) information as you would get from the @@SubmitInfo@@ variable.

--
Des
NowSMS Support
Leandro Alves
New member
Username: Leandrocalves

Post Number: 9
Registered: 01-2012
Posted on Friday, February 24, 2012 - 04:00 pm:   

Thanks for the reply!
I would like to know how to run html and php in the same directory (NowSMS / html) in order to run php scripts in HTML pages, eg:

<HTML>
<HEAD><TITLE>Message Submitted</TITLE>
</HEAD>
<BODY>
<p>
<font face="tahoma" size="2"><b>Message Submitted!</b></font>
<p>
<a href="#">Continue</a>
<p>
<pre><small>
@@SubmitInfo@@
<?php
echo "My php script";
?>

</small></pre>
<p>
</BODY>
</HTML>

I already have php installed and working, but it runs on http://localhost:8800/php/ and I would like http://localhost:8800/ that swirled in the same html scripts.

Thank you.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3813
Registered: 08-2008
Posted on Friday, February 24, 2012 - 07:21 pm:   

Hi Leandro,

NowSMS is not a general purpose web server.

The reason there is some limited PHP support is to make it easier to develop 2-way commands.

You cannot insert PHP commands into other HTTP templates or responses.

If you need more control, you can run your own pages and scripts on a separate web server. Your PHP scripts running on that other web server can easily submit SMS messages without end users ever seeing the NowSMS web interface. (PHP example to submit an SMS found here: http://www.nowsms.com/doc/submitting-mms-messages/send-mms-message-with-php)

--
Des
NowSMS Support