smslib/smslib-v3 — pull request #2 by tiagopsantos (2013-10-03 16:01:11+00:00)
Title: Issue 532: 	SMPPGateway - TON & NPI - code bug

https://code.google.com/p/smslib/issues/detail?id=532&sort=-id&colspec=ID%20Type%20Status%20Component%20Milestone%20Priority%20Stars%20Owner%20Summary

Hi there just found a bug in the SMPPGateway - org.smslib.smsserver.gateways

create() and getBindAttributes()

The NPI where using the TON values, causing problems when the number doesnt exists in the NPI values. (EX: TON = 5, causes gateway error)

It's a classic Copy/Paste error.

Fix change in 3 places:

NumberingPlanIndicator numberingPlanIndicator=(npi==null)?NumberingPlanIndicator.UNKNOWN:NumberingPlanIndicator.valueOf(Byte.parseByte(ton));

to:

NumberingPlanIndicator numberingPlanIndicator=(npi==null)?NumberingPlanIndicator.UNKNOWN:NumberingPlanIndicator.valueOf(Byte.parseByte(npi));