1.
SMPPSession
This is an object that used to communicate with SMPP Server or SMSC
a. connectAndBind (String host, int port, BindParameter bindParam)
host : host SMSC or SMPServer
port : port SMSC or SMPPServer
bindParam : is the bind Parameter
o BindParameter(BindType bindType, String systemId,
String password, String systemType,
TypeOfNumber addrTon, NumberingPlanIndicator addrNpi,
String addressRange)
bindType : tipe of bind
BIND_RX : receive only
BIND_TX : transmit only
BIND_TRX : receive and transmit
systemId : system id yang dipakai sebagai
identitas ketika ESME connect ke SMSC
password : password untuk onnec ke SMSC,
disediakan oleh SMSC Administrator
systemType : system type untuk mengkategorikan
ESME. Parameter ini opsional, ada SMSC yang
tidak membutuhkan detil ini untuk menerima
koneksi dar ESME. Klo gak ada tinggal set null
addrTon : Tipe of Number yang akan digunakan di
parameter alamat SME
(UNKNOWN,INTERNATIONAL,ABBREVIATED,NATIONAL,ALPH
ANUMERIC)
addrNpi : numeric plan indicator yang akan
digunakan sebagai paremeter dialamat SME
addressRange : set alamat SME yang akan dilayani
oeh ESME client
2. submitShortMessage
a. serviceType : indicate SMS application kind
i. CMT – cellular messaging
ii. ““ (NULL) Default
iii. “CMT” Cellular Messaging
iv. “CPT” Cellular Paging
v. “VMN” Voice Mail Notification
vi. “VMA” Voice Mail Alerting
vii. “WAP” Wireless Application Protocol
viii. “USSD” Unstructured Supplementary Services Data
b. esmClass : indicate special message attributes associated with the short message
c.
3. Asa
4. Sasa
submitShortMessage
public String submitShortMessage(String serviceType,
TypeOfNumber sourceAddrTon,
NumberingPlanIndicator sourceAddrNpi,
String sourceAddr,
TypeOfNumber destAddrTon,
NumberingPlanIndicator destAddrNpi,
String destinationAddr,
ESMClass esmClass,
byte protocolId,
byte priorityFlag,
String scheduleDeliveryTime,
String validityPeriod,
RegisteredDelivery registeredDelivery,
byte replaceIfPresentFlag,
DataCoding dataCoding,
byte smDefaultMsgId,
byte[] shortMessage,
OptionalParameter... optionalParameters)
throws PDUException,
ResponseTimeoutException,
InvalidResponseException,
NegativeResponseException,
IOException
Description copied from interface: ClientSession
Submit a short message to specified destination address. This method will blocks until response
received or timeout reached. This method simplify operations of sending SUBMIT_SM command
and receiving the SUBMIT_SM_RESP.
Specified by:
submitShortMessage in interface ClientSession
Parameters:
serviceType - is the service_type.
sourceAddrTon - is the source_addr_ton.
sourceAddrNpi - is the source_addr_npi.
sourceAddr - is the source_addr.
destAddrTon - is the dest_addr_ton.
destAddrNpi - is the dest_addr_npi.
destinationAddr - is the destination_addr.
esmClass - is the esm_class.
protocolId - is the protocol_id.
priorityFlag - is the priority_flag.
scheduleDeliveryTime - is the schedule_delivery_time.
validityPeriod - is the validity_period.
registeredDelivery - is the registered_delivery.
replaceIfPresentFlag - is the replace_if_present_flag.
dataCoding - is the data_coding.
smDefaultMsgId - is the sm_default_msg_id.
shortMessage - is the short_message.
optionalParameters - is the optional parameters.
Returns:
the message_id to identified the submitted short message for later use (delivery receipt,
QUERY_SM, CANCEL_SM, REPLACE_SM).
Throws:
PDUException - if there is invalid PDU parameter found..
ResponseTimeoutException - if timeout has been reach.
InvalidResponseException - if response is invalid.
NegativeResponseException - if negative response received.
IOException - if there is an I/O error found.