Receive SMS from SMPP over tcpip

Receive SMS from SMPP over tcpip SearchSearch
Author Message
Johnson Chedn
New member
Username: Johnson

Post Number: 1
Registered: 10-2018
Posted on Monday, October 08, 2018 - 10:27 am:   

Hi,
We use SMPP over tcp/ip to configure when SMSC receiver SMS will forward to nowSMS and nowSMS to execute the local command "ReceiveSMSCommand1=* c:\windows\system32\cmd /c dir >c:\list.txt Yes" if work I think in directory will have file list.txt but didn't work. Below is my log.
application/octet-stream
smsgw.INI (0.5 k)
application/octet-stream
SMSDEBUG.LOG (0.6 k)
application/octet-stream
SMPPDEBUG.LOG (4.2 k)


I am not sure the problem is nowSMS no receive SMS or 2 way configuration error. so have checked the c:\program file\nowsms\smsin have SMS in records, but c:\program file\nowsms\SMS IN\ directory didn't have data. in this status the SMS is received correct?
Could you help to define our problem? Thanks
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8282
Registered: 10-2002
Posted on Thursday, October 11, 2018 - 08:43 pm:   

Hi,

I believe you have been in direct contact with one of my colleagues...because he discussed your question with me.

I assume that your 2-way command is a proof of concept test, and that you just want to see if you can create a file as an action in a 2-way command.

I'm not sure that file redirection with > or >> will work. It would work if you created a batch file and executed the batch file.

doit.bat contents:

@echo off
dir > c:\list.txt


2-way command:

c:\windows\system32\cmd.exe /c doit.bat

(Note: .exe extension is required for cmd, and explicit path to doit.bat would be a good idea.)


All that said, I would ask what you are trying to accomplish. My colleague thinks you are trying to write received messages to a text file...in which case, this old example might help: https://support.nowsms.com/discus/messages/1/333.html

-bn
Johnson Chedn
New member
Username: Johnson

Post Number: 2
Registered: 10-2018
Posted on Friday, October 12, 2018 - 04:50 am:   

Thanks for your reply, I will continue the discussion with your colleague.
But I think my problem not about 2-way command because of new version 2-way can send reply SMS sms to A party.
the problem is 2-way process can't be launch.
Johnson Chedn
New member
Username: Johnson

Post Number: 3
Registered: 10-2018
Posted on Friday, October 12, 2018 - 10:17 am:   

your colleague prefer to ask the question in there,
First I update the status If in SMSC use an android modem everything is working fine,2-way process launch HTTP request etc...

But if SMSC uses SMPP over TCP/IP check the attach file structure can't see the data in 2-Way Tab view data function I think that means NowSMS didn't receive a message. How can I trace this log to find out the root cause? Thanks.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8284
Registered: 10-2002
Posted on Friday, October 12, 2018 - 05:26 pm:   

What protocol is used to forward the message from the SMSC to the NowSMS gateway?

I'm guessing SMPP?

Who initiates the SMPP connection?

2-way commands in NowSMS process messages received from an SMSC connection, where NowSMS initiates the SMPP connection. (In SMPP terminology, NowSMS is in the ESME role.)

If the SMSC initiates the SMPP connection, then for this connection, the SMSC assumes the ESME role, and NowSMS is the SMSC. In this scenario, NowSMS views the message as a submission, implying that it should be routed upstream to an SMSC connection.

This is difficult to explain, but the key point is that direction matters.

If a connection is defined on the "SMSC" page, messages from that account will be routed to the 2-way command processor.

If a connection is defined on the "SMS Users" page, messages from that account will be routed outbound to an SMSC connection. (The SMSC connection could be an HTTP template that posts the message to your app...and your app could initiate an HTTP connection to send a resultant message.)

I'm happy to explain more...bt at this point, I'm just guessing about your configuration.

-bn

Bryce Norwood
NowSMS Support
Johnson Chedn
New member
Username: Johnson

Post Number: 4
Registered: 10-2018
Posted on Monday, October 15, 2018 - 07:26 am:   

Hi

We have two scripts need to the configuration.
the first script will be ESME Receiver
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS use 2-Wand call HTTP request.

the second script will be ESME Transceiver
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS use 2-Wand reply a message to MS.

Is different set up in NowSMS for both script?

In SMSC setup a router message for both script.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8285
Registered: 10-2002
Posted on Monday, October 15, 2018 - 07:49 pm:   

Hi,

I am sorry this is so difficult, but what I need to understand is this...

In the scenario that you describe:


quote:

We have two scripts need to the configuration.
the first script will be ESME Receiver
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS use 2-Wand call HTTP request.




In the NowSMS to SMSC connection, what role does NowSMS have, ESME or SMSC?

If NowSMS is ESME (connection defined on "SMSC" page in NowSMS), then messages received will go to 2-way processing.

If NowSMS is SMSC (credentials for other party defined in "SMS Users" page in NowSMS), then messages received will get routed to upstream SMSC.

I asked my colleague to forward the emails that you sent him. This item from your email, helps me understand (I think):



What I see here is that NowSMS is the SMSC. An ESME account named "alex" has submitted a message. NowSMS routes the message to an upstream SMPP connection.

I assume, instead, you wish to process the message with HTTP. This is possible, but not with 2-way commands.

What you must do is this.

Create an HTTP SMSC connection in NowSMS. This is not an actual SMSC connection, but in this scenario, it is an HTTP request to your app.

Here is an example. I gave this example a route name of "From_alex" to help explain that the purpose of this connection is to route messages that are submitted by the "alex" account. To configure this in NowSMS, refer to the "Routing" box ... "Support any outbound message traffic" is NOT checked, and "alex" is in the preferred list. These settings define that this route will be used only for messages submitted by "alex".



In this example, I have defined that these messages will be posted via HTTP to http://192.168.0.67/from=@@Sender@@&to=@@PhoneNumber@@&text=@@Text@@

These @@ variables are similar to the 2-way variables, but different. You can find more info here: https://www.nowsms.com/doc/configuring-smsc-connections/http-smsc

If, as part of your processing, you also want to send an SMS message, your application can post an HTTP request to NowSMS.

-bn

Bryce Norwood
Now SMS/MMS Support
Johnson Chedn
New member
Username: Johnson

Post Number: 5
Registered: 10-2018
Posted on Tuesday, October 16, 2018 - 08:29 am:   

Hi,

Sorry my last description something wrong
We have two scenarios
One is below (I think NowSMS will be ESME use SMPP connect to SMSC and use 2-Way Process request HTTP. So in NowSMS just config SMSC page)
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS use 2-Way call HTTP request.

One is below (How about this just use like scenario 1 and send a reply message in HTTP Process?)
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS send a reply message to sender MS and call HTTP request

If wrong Please correct it
Thanks.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8286
Registered: 10-2002
Posted on Tuesday, October 16, 2018 - 07:45 pm:   


quote:

We have two scenarios
One is below (I think NowSMS will be ESME use SMPP connect to SMSC and use 2-Way Process request HTTP. So in NowSMS just config SMSC page)
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS use 2-Way call HTTP request.




Correct


quote:

One is below (How about this just use like scenario 1 and send a reply message in HTTP Process?)
1. When any MS reply or send to a message to a specific number
2. SMSC forward this specific number message to NowSMS.
3. NowSMS send a reply message to sender MS and call HTTP request




NowSMS will call HTTP request. If you want to reply, your script (receiving HTTP request) must make another HTTP request to NowSMS to tell it to send a message.

-bn

Bryce Norwood
Now SMS/MMS Support
Johnson Chedn
New member
Username: Johnson

Post Number: 6
Registered: 10-2018
Posted on Wednesday, October 17, 2018 - 02:32 am:   

Thanks, we have finished our test.