Authentication & 2-way Command

Authentication & 2-way Command SearchSearch
Author Message
Rhea
New member
Username: Rhea

Post Number: 17
Registered: 08-2006
Posted on Monday, October 23, 2006 - 02:11 pm:   

I have two 2-way SMS services running each with the same SMSC IP but different connect ports. Now each service has a different 2-way command which works fine as long as i do not enable web authentication.
I want to enable web authentication and be able to assign each 2-way command to a specific username/password. When i enable authentication the services do not work, i can send from the web interface according to each user account, but if i send an SMS from my mobile to one of the services, i do not get any response, the problem i think is that i need to be able to pass the username and password parameters to or in my 2-way command.

How do i solve this ?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6717
Registered: 10-2002
Posted on Monday, October 23, 2006 - 04:54 pm:   

Hi Rhea,

Are your 2-way commands building redirect URLs that send a command back to NowSMS? It sounds like this is the case ... but I just want to make sure.

The easiest way to resolve this is to include "&user=username&password=password" parameters in the URL. You can use these parameters instead of using the "Authorization:" header.

-bn
Rhea
New member
Username: Rhea

Post Number: 18
Registered: 08-2006
Posted on Monday, October 23, 2006 - 07:38 pm:   

Dear Bryce,

I think i did not explain myself properly. My question is, How do i pass the username and password of an account defined in the NowSMS SMS Users Dialog Box through an HTTP sms submit url?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6734
Registered: 10-2002
Posted on Tuesday, October 24, 2006 - 12:25 pm:   

Hi Rhea,

That is what I thought you were asking. You pass this information in the URL like I described above.

-bn
Rhea
New member
Username: Rhea

Post Number: 21
Registered: 08-2006
Posted on Tuesday, October 24, 2006 - 01:21 pm:   

Hi Bryce,

Sorry to be a nag. Is that the same "&user=username&password=password" that is placed in the 2-way SMS Command? I mean if i add a user account through the SMS Users Dialog then i should put it also in the 2-way Command?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6743
Registered: 10-2002
Posted on Wednesday, October 25, 2006 - 05:58 pm:   

Hi Rhea,

It gets added to whatever the url is that is being submitted to NowSMS. (The URL that actually triggers the message sending.)

You might have such a URL configured as a 2-way command directly ... or you might be returning a redirect response from your script that generates this URL.

-bn
dwi widayana
New member
Username: Dwi

Post Number: 3
Registered: 09-2006
Posted on Wednesday, November 01, 2006 - 02:21 am:   

we are making an applications program that can processing SMS msgs and returning an MMS response based upon the content of received SMS msgs.

in the 2-way config dialog, should we check both process received SMS & MMS msgs?

the scripting language that we use is PHP to automatically reply the SMS. As we know the content of MMS is more complex (we'd like to send text & picture), we have to make the header, SMIL file, etc. we wonder how to make our program works

are we need internet connection?

we've seen in other SMS gateway (but not a MMS one), we can setup incoming & outgoing logging. there're some fileds that we can log to such as phone number, msg text, timestamp, transport (for both incoming & out logging) and msg id & status (for out logging). and both can log to text file (CSV) or database.
it also provide storage location for queued msg. it can stored in memory or databse (we'll prefer database).
so when our program make a connection to the gateway, actually it connect to databases in microsoft access.
we wonder how NowSMS can do such a thing?
does NowSMS also provide storage location for queued msg (in a database)?

thanx a lot for d answers
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6765
Registered: 10-2002
Posted on Wednesday, November 01, 2006 - 04:57 pm:   

Hi,


quote:

we are making an applications program that can processing SMS msgs and returning an MMS response based upon the content of received SMS msgs.

in the 2-way config dialog, should we check both process received SMS & MMS msgs?




If you aren't going to be receiving MMS messages (only sending them), then it is not necessary to enable the processing of received MMS messages. (But if you do receive any MMS messages, there will be stray binary SMS messages in your SMS-IN directory ... but that is not a big deal if you are not interested in them.)


quote:

the scripting language that we use is PHP to automatically reply the SMS. As we know the content of MMS is more complex (we'd like to send text & picture), we have to make the header, SMIL file, etc. we wonder how to make our program works




There's an example PHP script for sending an MMS message in the following thread:

http://support.nowsms.com/discus/messages/1/1113.html

And some 2-way PHP message processing examples here:

http://support.nowsms.com/discus/messages/1/4520.html


quote:

are we need internet connection?




If the SMS messages are going to be received over a GSM modem, and the MMS messages sent out over a GSM/GPRS modem ... then no.

Please refer to http://www.nowsms.com/howmmsworks.htm for a good explanation of how MMS works, which might help your understanding.


quote:

we wonder how NowSMS can do such a thing?




Log files are CSV only ... no database option.

The message queues are file/directory based ... no database option. We prefer that you use HTTP and/or SMPP for interfacing with NowSMS to send or receive messages.

-bn
dwi widayana
New member
Username: Dwi

Post Number: 4
Registered: 09-2006
Posted on Thursday, November 02, 2006 - 02:28 am:   

hi bryce,

i'm sorry that i've to ask bout this.....
but could you tell me how to use HTTP for interfacing with NowSMS to send & receive msgs?

actually i know little bout this

really appreciate for your answer
thanx

de
dwi widayana
New member
Username: Dwi

Post Number: 5
Registered: 09-2006
Posted on Friday, November 03, 2006 - 01:32 am:   

hi bryc,
me again

i read some in NowSMS discussion board, hope i'm not misunderstanding, that NowSMS generated/created header for evry MMS msg that will send automatically.
means i dun have to make file *.hdr evrytime i want to send MMS right?
i just have to prepare the text and pic that i want to send.
& the MMSCOMP will change it to binary format for me (dun have to change it by myself)?

sorry i've to ask bout it over & over, just trying to get myself more inderstand
i have PHP script to send SMS (not using NowSMS gateway)
it take phone number and text msg from the gateway and then check it what kind info that it ask.
if it ask info bout the their bill, the program will connect to a table in d databse that have d info according their account number.
so the SMS response will be like this:
case"PLN"
$result="mysql_query("SELECT $bill FROM pln WHERE Account='$account'",$con);
while($row=mysql+fetch_array($result))
{
$mydata=$row[$bill];
}
if($result)
$msg="ur bill for this month is","","$mydata";
else
$msg="Access Denied";
break:

so the replied will like: ur bill for this month is 200

the PHP script that u've shown me, i didn't see if it's connect to any databse.
actually i understand just a few rows there
(well u could say i a beginner in PHP)
for info i'm using PHP script for mysql