NetTalk Central

Author Topic: SMPP  (Read 4410 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
SMPP
« on: March 18, 2012, 02:35:21 AM »
I don't really understand the SMPP example.  The way I understand the docs, NetTalk can create the SMPP server and/or client.  Is this correct?

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: SMPP
« Reply #1 on: March 18, 2012, 10:17:48 PM »
Hi Don,

send/receive - (transceiver) <--> message gateway <--> message client (phone)

we're doing the transceiver bit - there's no "client" or "server" as such.

If you want to use SMPP I recommend some reading on Wikipedia, and elsewhere on how it works etc. you'll be interacting with a gateway, so you need to understand the fundamentals a bit.

cheers
Bruce









DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: SMPP
« Reply #2 on: March 19, 2012, 02:28:08 AM »
I was trying to get the example to work.  What goes in the server, port, etc.. fields?

I've tried 127.0.0.1 and various ports.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: SMPP
« Reply #3 on: March 19, 2012, 05:20:06 AM »
it's designed to connect to an SMPP gateway.
So the parameters for the gateway you plan to use goes in those fields.

we haven't coded a gateway itself - so you have to have a genuine gateway to connect to.

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: SMPP
« Reply #4 on: March 20, 2012, 02:40:51 AM »
Got it working.  You reply got me pointed in the right direction.

Thanks!

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: SMPP
« Reply #5 on: March 20, 2012, 06:55:35 AM »
Bruce,

On the same topic: I am trying to test MO replies from a simulation website but I don't get any replies in the sample app - although I can see the code is there for SMPP_DELIVER_SM.

The following is what the service provider told me:

If I look at the login details I see you bound as a Transmitter only.  It can be that you bound as a "transceiver" but did not specify the correct system_type value (Should be $MD to receive MO and DN) 0

The sample app is set up to be a transceiver, so it must be the system_type that is not set. It seems to be blank by default. When I change it to "$MD" the messages still don't come back. Do you have any idea what I should do?

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: SMPP
« Reply #6 on: March 20, 2012, 07:27:53 AM »
I've no idea - I'll have to ask Sean.

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: SMPP
« Reply #7 on: March 21, 2012, 10:13:51 PM »
Some progress, but not there yet. After setting system_type to '$MD' with the following code on the Send button:

ShowLog('Send a test message...')
Smpp.system_type = '$MD'
Smpp.SubmitMessage(messageText, destination, ton, npi)


the service provider sent me this:

looking at your last bind attempt in our logs I can see the system type being set to an empty string which results in masking all events (MO and DN).
12/03/20 16:29:30 INFO  XSession.cpp(639)      Bind request from 'Incasusim' as 'TRANSCEIVER' and system_type ''


Seems like the system_type property results in a blank string when set to $MD. But the MO message never got back to the sample app. Any help available from Sean?

Thys

seancameron

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • CapeSoft Software
Re: SMPP
« Reply #8 on: March 22, 2012, 12:23:56 AM »
You are setting system_type before the message is sent, rather than before binding. The system_type relates to the entire session, from when you Bind to when you Unbind.
Set this property before you do anything else, and before to call to DoBind(), which is what establishes the connection with the server (message center).

Setting Smpp.system_type = '$MD before submitting a message will have no effect, as the system_type applies to the packet sent to bind (establish a connection), which has already been sent at this point. Set this property before calling DoBind() will fix this.

The SMPP protocol defines different types of packets for performing different tasks, and NetTalk contains classes which handle each of these packet types. This means that you receive any packet and NetTalk will determine the type and assign the data to a packet object. Each object knows how to encode itself into packet data and how to decode the packet data and set the properties of the object to the correct values. This is what the example is demonstrating - how to create object to handle the different types of packets and different responses. I actually think that the SMPP classes in NetTalk are a fairly nice demonstration of how Object Orientation can provide a very elegant solution to this sort of architecture.
Sean Cameron
CapeSoft
www.capesoft.com

Work Smarter, Not Harder

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: SMPP
« Reply #9 on: March 22, 2012, 02:03:16 AM »
Thanks Sean. Attached is a screenshot of the parameters used in the app. I still need to get used to the terminology used for SMPP. Please look at the "Number" and "Destination" values. Do they seem to be correct? I understand Number to be the number that the mobile user needs to call and Destination the mobile number that should receive the responses.

Thys

[attachment deleted by admin]

seancameron

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • CapeSoft Software
Re: SMPP
« Reply #10 on: March 22, 2012, 04:55:42 AM »
It's the other way around in this case - "number" in the example refers to your number (the sender) and destination is the number which you are sending to (the receiving number). Technically these are SMPP addresses, but for sending SMS messages they are basically phone numbers. The sending number (*120*465#) doesn't look right to me - this should be the number of the sender.

1. You do need to check that the TON and NPI are correct:

The Type of Number (TON) indicates the scope of the address value, such as whether it is an international number (i.e. including the country code), a "national" or domestic number (i.e. without country code), and other formats such as "local" format (e.g. in the U.S., without an area code).

The NPI indicates the numbering plan used. The numbering plan chosen will aid the routing system in determining the correct network system to direct the message.

These will be provided by your provider.

2. You are using port 2775, which may well not be correct for your provider, try 1775 for a start, and verify it with your provider

3. Trying using the international form of the phone number, so instead of "083.." you would have "2783.." (drop the zero and add the country code for South Africa).

« Last Edit: March 22, 2012, 04:57:44 AM by seancameron »
Sean Cameron
CapeSoft
www.capesoft.com

Work Smarter, Not Harder

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: SMPP
« Reply #11 on: March 22, 2012, 05:16:59 AM »
Sean

This thread is actually against the wrong forum and was opened by Don. I still have questions - should I continue on this thread or open a new one on another forum?

Thys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: SMPP
« Reply #12 on: March 22, 2012, 11:22:57 PM »
either