Pass PDU string via https

Pass PDU string via https SearchSearch
Author Message
Anthony Dyson
New member
Username: Dysona

Post Number: 1
Registered: 08-2010
Posted on Thursday, August 12, 2010 - 03:23 pm:   

To process incoming SMS messages, an application service provider is asking us to pass the entire PDU string via https GET.

We are using NowSMS 5.51.

Two questions:

Is the PDU string what I get when I use the placeholder @@BINARY@@?

Can I send an https request, or does the gateway only support http?

Anthony Dyson
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2413
Registered: 08-2008
Posted on Thursday, August 12, 2010 - 04:56 pm:   

Hi Anthony,

I don't know if NowSMS 5.51 supports HTTPS. That release is 5 to 6 years old, and I did not work extensively with that version.

I know that NowSMS has supported SSL/TLS for quite some time, but that release is before my time here. If there is an SSL/TLS page in the configuration, then it should be possible. By default, NowSMS can initiate an outbound HTTPS connection with no configuration. Accepting inbound HTTPS connections requires some configuration. And it should be noted that if you need a signed SSL certificate, you may require an updated version of NowSMS as many certificate providers will no longer sign older certificate formats.

All this said, I don't really understand your question.

PDU formats differ based upon the protocol being used. PDU simply stands for protocol data unit, and it essentially means a raw data packet that is specific to whatever protocol is being used. So an SMS PDU for a modem is different from an SMS PDU for SMPP.

In either case, NowSMS will not forward a modem PDU or an SMPP PDU to an HTTP or HTTPS interface.

If you want to pass received binary messages to an HTTPS application, that is no problem. The HTTPS application will receive the complete binary data of the message.

The @@BINARY@@ placeholder indicates that the application can accept binary messages. There's a recent example in the following thread: http://support.nowsms.com/discus/messages/1/60022.html

Note, however, that the @@FULLSMS@@ placeholder will not include user data header, if present. If @@BINARY@@ is 0, then @@FULLSMS@@ is a text string. If @@BINARY@@ is 1, then @@FULLSMS@@ is a string of hex characters representing the binary content of the message. Note that the @@FULLSMS@@ placeholder does not include user data header ... the @@UDH@@ placeholder is required to pass UDH.

--
Des
NowSMS Support
Anthony Dyson
New member
Username: Dysona

Post Number: 2
Registered: 08-2010
Posted on Thursday, August 12, 2010 - 08:00 pm:   

I want to pass received binary messages one-to-one to an HTTPS application, exactly.

The application is expecting a HTTP GET in this strange format:
https://appserver/handler/NUMBER/PAYLOAD

where NUMBER is the originating number of the SMS and PAYLOAD is the "PDU string", which is most probably the string of hex characters representing the binary content of the message. (which I thought I would get using @@BINARY@@, but by the sound of it I need @@FULLSMS@@)

But is this going to work?
https://appserver/handler/@@SENDER@@/@@FULLSMS@@

You said if @@BINARY@@ is 1 then @@FULLSMS@@ is a string of hex characters, otherwise it's a text string. But @@BINARY@@ is a NowSMS placeholder, and I can't include it in my URL without breaking the format. Do I really have to reference that placeholder in my handler call in order to get the hex string, or did you just mean that if the incoming SMS is binary, then @@BINARY@@ will equal 1 and @@FULLSMS@@ will contain the hex string?

Anthony
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2420
Registered: 08-2008
Posted on Thursday, August 12, 2010 - 08:19 pm:   

Hi Anthony,

Yes, unfortunately referencing @@BINARY@@ in the URL string is the only way to enable received binary messages to be routed to a 2-way command.

I wish there was an additional INI parameter that could be used, but there is not. (We could add one in an update, but that won't help with such an old version.)

The only idea that I have for hiding the "1" that results from the "@@BINARY@@" reference would be to use the following URL format:

https://:@@BINARY@@@appserver/handler/@@SENDER@@/@@FULLSMS@@

e.g.,

https://:1@appserver/handler/@@SENDER@@/@@FULLSMS@@

This is a syntax that we use for embedding a username/password "Authorization:" request in the URL.

This example would cause an "Authorization:" header to be sent along with the request with a blank username, and a password of "1".

As long as the target web server ignores the "Authorization:" header, this would work.

Another idea would be adding it to the end of the URL like this:


https://appserver/handler/@@SENDER@@/@@FULLSMS@@?extra=@@BINARY@@

"?" is a parameter delimiter, and perhaps the application will ignore parameters that are appended to the request.

--
Des
NowSMS Support