1

How can I specify the "Numbering Plan Indicator" when connecting to a SMPP Server with SMSLib (JSMPPGateway).

This is my current JSMPPGateway initialization:

gateway = new JSMPPGateway(systemId, ip, port, new BindAttributes(username, password, "smpp_1", BindType.TRANSCEIVER));

The problem is that I can't connect to the gateway:

IOException: java.io.IOException:
Receive negative bind response: Negative response 0000000f found

My provider (the owner of the SMPP server) is telling me that I'm not using the correct Numbering Plan Indicator. How can I set that parameter?

leppie
  • 115,091
  • 17
  • 196
  • 297
sports
  • 7,851
  • 14
  • 72
  • 129

1 Answers1

1
Set the values of NPI,TON values specified by SMSC in Address params.

Ex:

gateway=new JSMPPGateway(systemId, ip, port, new BindAttributes(username, password, "smpp_1", BindType.TRANSCEIVER,new Address(Address.TypeOfNumber.INTERNATIONAL, Address.NumberingPlanIndicator.NATIONAL)));

GP32
  • 114
  • 1
  • 8
  • where is the quote from? because my JSMPPConstructor wont accept that fourth parameter, neither will BindAttributes – sports Jan 20 '14 at 15:17
  • Thanks!, ended up doing this: gateway.setSourceAddress(new Address(TypeOfNumber.UNKNOWN, NumberingPlanIndicator.ISDN)); – sports Jan 20 '14 at 15:26