MODULE SMPPDEF IDENT "SMPPDEF-1-X"; /*++ /* Facility: /* SMPP (Short Message Peer to Peer)/ESME (External Short Message Entities) Service /* /* Abstract: /* An interface module defined SMPP entities was based on SMPP specification V3.4 /* /* Author: /* Ruslan R. Laishev /* /* Creation Date: 16-APR-2002 /* /* Modification History: /* /* 11-JUN-2003 RRL Added Destination Address types definition /* 6-OCT-2003 RRL Changed SMSLEN from 128 to 160 /* 7-OCT-2011 RRL Correct the 'tlv' structure. /* /*-- CONSTANT VERSION EQUALS %X34 PREFIX SMPP$; CONSTANT SMSLEN EQUALS 128 PREFIX SMPP$; /* /**++ /** /** SMPP Protocol Data Unit (PDU) /** /**-- /* AGGREGATE smpp_pdu STRUCTURE PREFIX smpp_pdu$; length LONGWORD UNSIGNED; /* The command_length field defines the total /* octet length of the SMPP PDU packet /* including the length field. id UNION; /* The command_id field identifies the particular /* SMPP PDU, e.g., submit_sm, query_sm, etc. cmd STRUCTURE; cmd BITFIELD LENGTH 31 MASK; dir BITFIELD LENGTH 1 MASK; END cmd; cmd LONGWORD UNSIGNED; END id; status LONGWORD UNSIGNED; /* The command_status field indicates the /* success or failure of an SMPP request. /* It is relevant only in the SMPP response PDU /* and it must contain a NULL value in an SMPP /* request PDU. seq LONGWORD UNSIGNED; /* This field contains a sequence number which /* allows SMPP requests and responses to be /* associated for correlation purposes. The use of /* sequence numbers for message correlation /* allows SMPP PDUs to be exchanged /* asynchronously. body BYTE UNSIGNED DIMENSION 1; END smpp_pdu; /* /**++ /** /** SMPP, All optional parameters have the following general TLV (Tag, Length, Value) format. /** /**-- /* AGGREGATE tlv STRUCTURE PREFIX tlv$ TAG ""; tag WORD UNSIGNED; /* The Tag field is used to /* uniquely identify the particular /* optional parameter in question. /* The optional parameter Tag field is /* always 2 octets in length.A tag ID len WORD UNSIGNED; /* The Length field indicates the length of /* the Value field in octets. /* Note that this length does not include the /* length of the Tag and Length fields. /* The optional parameter Length field is /* always 2 octets in length. val UNION; /* The Value field contains the actual data /* for the optional parameter in question. val BYTE UNSIGNED; val WORD UNSIGNED; val LONGWORD UNSIGNED; val CHARACTER DIMENSION 1; END val; END tlv; /* /**++ /** /** SMPP Command set /** /**-- /* CONSTANT GENERIC_NACK EQUALS %X80000000 PREFIX SMPP_CMD$; CONSTANT BIND_RECEIVER EQUALS %X00000001 PREFIX SMPP_CMD$; CONSTANT BIND_RECEIVER_RESP EQUALS %X80000001 PREFIX SMPP_CMD$; CONSTANT BIND_TRANSMITTER EQUALS %X00000002 PREFIX SMPP_CMD$; CONSTANT BIND_TRANSMITTER_RESP EQUALS %X80000002 PREFIX SMPP_CMD$; CONSTANT QUERY_SM EQUALS %X00000003 PREFIX SMPP_CMD$; CONSTANT QUERY_SM_RESP EQUALS %X80000003 PREFIX SMPP_CMD$; CONSTANT SUBMIT_SM EQUALS %X00000004 PREFIX SMPP_CMD$; CONSTANT SUBMIT_SM_RESP EQUALS %X80000004 PREFIX SMPP_CMD$; CONSTANT DELIVER_SM EQUALS %X00000005 PREFIX SMPP_CMD$; CONSTANT DELIVER_SM_RESP EQUALS %X80000005 PREFIX SMPP_CMD$; CONSTANT UNBIND EQUALS %X00000006 PREFIX SMPP_CMD$; CONSTANT UNBIND_RESP EQUALS %X80000006 PREFIX SMPP_CMD$; CONSTANT REPLACE_SM EQUALS %X00000007 PREFIX SMPP_CMD$; CONSTANT REPLACE_SM_RESP EQUALS %X80000007 PREFIX SMPP_CMD$; CONSTANT CANCEL_SM EQUALS %X00000008 PREFIX SMPP_CMD$; CONSTANT CANCEL_SM_RESP EQUALS %X80000008 PREFIX SMPP_CMD$; CONSTANT BIND_TRANSCEIVER EQUALS %X00000009 PREFIX SMPP_CMD$; CONSTANT BIND_TRANSCEIVER_RESP EQUALS %X80000009 PREFIX SMPP_CMD$; CONSTANT OUTBIND EQUALS %X0000000B PREFIX SMPP_CMD$; CONSTANT ENQUIRE_LINK EQUALS %X00000015 PREFIX SMPP_CMD$; CONSTANT ENQUIRE_LINK_RESP EQUALS %X80000015 PREFIX SMPP_CMD$; CONSTANT SUBMIT_MULTI EQUALS %X00000021 PREFIX SMPP_CMD$; CONSTANT SUBMIT_MULTI_RESP EQUALS %X80000021 PREFIX SMPP_CMD$; CONSTANT ALERT_NOTIFICATION EQUALS %X00000102 PREFIX SMPP_CMD$; CONSTANT DATA_SM EQUALS %X00000103 PREFIX SMPP_CMD$; CONSTANT DATA_SM_RESP EQUALS %X80000103 PREFIX SMPP_CMD$; /* /**++ /** /** SMPP Command status set /** /**-- /* CONSTANT ESME_ROK EQUALS %x00000000 PREFIX SMPP_STS$; /* No Error CONSTANT ESME_RINVMSGLEN EQUALS %x00000001 PREFIX SMPP_STS$; /* Message Length is invalid CONSTANT ESME_RINVCMDLEN EQUALS %x00000002 PREFIX SMPP_STS$; /* Command Length is invalid CONSTANT ESME_RINVCMDID EQUALS %x00000003 PREFIX SMPP_STS$; /* Invalid Command ID CONSTANT ESME_RINVBNDSTS EQUALS %x00000004 PREFIX SMPP_STS$; /* Incorrect BIND Status for given command CONSTANT ESME_RALYBND EQUALS %x00000005 PREFIX SMPP_STS$; /* ESME Already in Bound State CONSTANT ESME_RINVPRTFLG EQUALS %x00000006 PREFIX SMPP_STS$; /* Invalid Priority Flag CONSTANT ESME_RINVREGDLVFLG EQUALS %x00000007 PREFIX SMPP_STS$; /* Invalid Registered Delivery Flag CONSTANT ESME_RSYSERR EQUALS %x00000008 PREFIX SMPP_STS$; /* System Error CONSTANT ESME_RINVSRCADR EQUALS %x0000000A PREFIX SMPP_STS$; /* Invalid Source Address CONSTANT ESME_RINVDSTADR EQUALS %x0000000B PREFIX SMPP_STS$; /* Invalid Dest Addr CONSTANT ESME_RINVMSGID EQUALS %x0000000C PREFIX SMPP_STS$; /* Message ID is invalid CONSTANT ESME_RBINDFAIL EQUALS %x0000000D PREFIX SMPP_STS$; /* Bind Failed CONSTANT ESME_RINVPASWD EQUALS %x0000000E PREFIX SMPP_STS$; /* Invalid Password CONSTANT ESME_RINVSYSID EQUALS %x0000000F PREFIX SMPP_STS$; /* Invalid System ID CONSTANT ESME_RCANCELFAIL EQUALS %x00000011 PREFIX SMPP_STS$; /* Cancel SM Failed CONSTANT ESME_RREPLACEFAIL EQUALS %x00000013 PREFIX SMPP_STS$; /* Replace SM Failed CONSTANT ESME_RMSGQFUL EQUALS %x00000014 PREFIX SMPP_STS$; /* Message Queue Full CONSTANT ESME_RINVSERTYP EQUALS %x00000015 PREFIX SMPP_STS$; /* Invalid Service Type CONSTANT ESME_RINVNUMDESTS EQUALS %x00000033 PREFIX SMPP_STS$; /* Invalid number of destinations CONSTANT ESME_RINVDLNAME EQUALS %x00000034 PREFIX SMPP_STS$; /* Invalid Distribution List name CONSTANT ESME_RINVDESTFLAG EQUALS %x00000040 PREFIX SMPP_STS$; /* Destination flag is invalid (submit_multi) CONSTANT ESME_RINVSUBREP EQUALS %x00000042 PREFIX SMPP_STS$; /* Invalid ubmit with replacerequest (i.e. submit_sm with replace_if_present_flag set) CONSTANT ESME_RINVESMCLASS EQUALS %x00000043 PREFIX SMPP_STS$; /* Invalid esm_class field data CONSTANT ESME_RCNTSUBDL EQUALS %x00000044 PREFIX SMPP_STS$; /* Cannot Submit to Distribution List CONSTANT ESME_RSUBMITFAIL EQUALS %x00000045 PREFIX SMPP_STS$; /* submit_sm or submit_multi failed CONSTANT ESME_RINVSRCTON EQUALS %x00000048 PREFIX SMPP_STS$; /* Invalid Source address TON CONSTANT ESME_RINVSRCNPI EQUALS %x00000049 PREFIX SMPP_STS$; /* Invalid Source address NPI CONSTANT ESME_RINVDSTTON EQUALS %x00000050 PREFIX SMPP_STS$; /* Invalid Destination address TON CONSTANT ESME_RINVDSTNPI EQUALS %x00000051 PREFIX SMPP_STS$; /* Invalid Destination address NPI CONSTANT ESME_RINVSYSTYP EQUALS %x00000053 PREFIX SMPP_STS$; /* Invalid system_type field CONSTANT ESME_RINVREPFLAG EQUALS %x00000054 PREFIX SMPP_STS$; /* Invalid replace_if_present flag CONSTANT ESME_RINVNUMMSGS EQUALS %x00000055 PREFIX SMPP_STS$; /* Invalid number of messages CONSTANT ESME_RTHROTTLED EQUALS %x00000058 PREFIX SMPP_STS$; /* Throttling error (ESME has exceeded allowed message limits) CONSTANT ESME_RINVSCHED EQUALS %x00000061 PREFIX SMPP_STS$; /* Invalid Scheduled Delivery Time CONSTANT ESME_RINVEXPIRY EQUALS %x00000062 PREFIX SMPP_STS$; /* Invalid message validity period (Expiry time) CONSTANT ESME_RINVDFTMSGID EQUALS %x00000063 PREFIX SMPP_STS$; /* Predefined Message Invalid or Not Found CONSTANT ESME_RX_T_APPN EQUALS %x00000064 PREFIX SMPP_STS$; /* ESME Receiver Temporary App Error Code CONSTANT ESME_RX_P_APPN EQUALS %x00000065 PREFIX SMPP_STS$; /* ESME Receiver Permanent App Error Code CONSTANT ESME_RX_R_APPN EQUALS %x00000066 PREFIX SMPP_STS$; /* ESME Receiver Reject Message Error Code CONSTANT ESME_RQUERYFAIL EQUALS %x00000067 PREFIX SMPP_STS$; /* query_sm request failed CONSTANT ESME_RINVOPTPARSTREAM EQUALS %x000000C0 PREFIX SMPP_STS$; /* Error in the optional part of the PDU Body. CONSTANT ESME_ROPTPARNOTALLWD EQUALS %x000000C1 PREFIX SMPP_STS$; /* Optional Parameter not allowed CONSTANT ESME_RINVPARLEN EQUALS %x000000C2 PREFIX SMPP_STS$; /* Invalid Parameter Length. CONSTANT ESME_RMISSINGOPTPARAM EQUALS %x000000C3 PREFIX SMPP_STS$; /* Expected Optional Parameter missing CONSTANT ESME_RINVOPTPARAMVAL EQUALS %x000000C4 PREFIX SMPP_STS$; /* Invalid Optional Parameter Value CONSTANT ESME_RDELIVERYFAILURE EQUALS %x000000FE PREFIX SMPP_STS$; /* Delivery Failure (used for data_sm_resp) CONSTANT ESME_RUNKNOWNERR EQUALS %x000000FF PREFIX SMPP_STS$; /* Unknown Error /* /**++ /** /** Type of Number (TON,addr_ton, source_addr_ton, dest_addr_ton, esme_addr_ton) /** /**-- /* CONSTANT ( UNKNW, /* Unknown INTL, /* International NTL, /* National NET, /* Network Specific SUBNUM, /* Subscriber Number ALPHANUM, /* Alphanumeric ABRVD /* Abbreviated ) EQUALS 0 INCREMENT 1 PREFIX SMPP_TON$; /* /**++ /** /** Numeric Plan Indicator (NPI,addr_npi, source_addr_npi, dest_addr_npi, esme_addr_npi) /** /**-- /* CONSTANT ( UNKNW, /* Unknown ISDN, /* ISDN (E163/E164) DATA, /* Data (X.121) TELEX, /* Telex (F.69) LANMOB, /* Land Mobile (E.212) NTL, /* National PVT, /* Private ERMES, /* ERMES INET, /* Internet (IP) WAP /* WAP Client Id (to be defined by WAP Forum) ) EQUALS 0 INCREMENT 1 PREFIX SMPP_NPI$; /* /**++ /** /** ESM Classes /** /**-- /* AGGREGATE esm_class UNION PREFIX esm_class$; attr BYTE UNSIGNED; attr STRUCTURE; mm BITFIELD LENGTH 2 MASK; mt BITFIELD LENGTH 4 MASK; gsm BITFIELD LENGTH 2 MASK; END attr; END esm_class; /* /* The esm_class parameter is encoded as follows in the submit_sm, submit_multi and data_sm /* (ESME -> SMSC) PDUs: /* CONSTANT ( /* Messaging Mode (bits 1-0) DEFAULT, /* Default SMSC Mode (e.g. Store and Forward) DGRAM, /* Datagram mode FWD, /* Forward (i.e. Transaction) mode STFWD, /* Store and Forward mode ) EQUALS 0 INCREMENT 1 PREFIX esm_class$ TAG MM; /* Message Type (bits 5-2) CONSTANT DEFAULT EQUALS %B0000 PREFIX esm_class$ TAG MT; /* Default message Type (i.e. normal message) CONSTANT DACK EQUALS %B0010 PREFIX esm_class$ TAG MT; /* Short Message contains ESME Delivery Acknowledgement CONSTANT MACK EQUALS %B0100 PREFIX esm_class$ TAG MT; /* Short Message contains ESME Manual/User Acknowledgement CONSTANT ( /* GSM Network Specific Features (bits 7-6) DEFAULT, /* No specific features selected UDHI, /* UDHI Indicator (only relevant for MT short messages) RP, /* Set Reply Path (only relevant for GSM network) UDHIRP, /* Set UDHI and Reply Path (only relevant for GSM network) ) EQUALS 0 INCREMENT 1 PREFIX esm_class$ TAG GSM; /* /* The esm_class parameter is encoded as follows in a deliver_sm and data_sm (SMSC -> ESME) /* PDUs: /* CONSTANT ( /* Message Type (bits 5-2) DEFAULT, /* Default message Type (i.e. normal message) DRCPT, /* Short Message contains SMSC Delivery Receipt SMEDACK, /* Short Message contains SME Delivery Acknowledgement , /* x x 0 0 1 1 x x reserved SMEMACK, /* Short Message contains SME Manual/User Acknowledgment , /* x x 0 1 0 1 x x reserved CABRT, /* Short Message contains Conversation Abort (Korean CDMA) , /* x x 0 1 1 1 x x reserved IDN /* Short Message contains Intermediate Delivery Notification ) EQUALS 0 INCREMENT 1 PREFIX esm_class$ TAG MT; CONSTANT ( /* GSM Network Specific Features (bits 7-6) DEFAULT, /* No specific features selected UDHISET, /* UDHI Indicator set RPSET, /* Reply Path UDHIRPSET, /* UDHI and Reply Path ) EQUALS 0 INCREMENT 1 PREFIX esm_class$ TAG GSM; /* /**++ /** /** Registered Delivery /** /**-- /* AGGREGATE reg_dlv UNION PREFIX reg_dlv$; par BYTE UNSIGNED; par STRUCTURE; dr BITFIELD LENGTH 2 MASK; ack BITFIELD LENGTH 2 MASK; in BITFIELD LENGTH 1 MASK; END par; END reg_dlv; CONSTANT ( /* SMSC Delivery Receipt (bits 1 and 0) DEFAULT, /* No specific features selected ANY, /* SMSC Delivery Receipt requested where final delivery /* outcome is delivery success or failure ERR, /* SMSC Delivery Receipt requested where the final /* delivery outcome is delivery failure , /* x x x x x x 1 1 reserved ) EQUALS 0 INCREMENT 1 PREFIX reg_dlv$ TAG DR; CONSTANT ( /* SME originated Acknowledgement (bits 3 and 2) DEFAULT, /* No specific features selected DLV, /* SME Delivery Acknowledgement requested MAN, /* SME Manual/User Acknowledgment requested BOTH, /* Both Delivery and Manual/User Acknowledgment requested ) EQUALS 0 INCREMENT 1 PREFIX reg_dlv$ TAG ACK; CONSTANT ( /* Intermediate Notification (bit 5) DEFAULT, /* No specific features selected IN /* Intermediate notification requested ) EQUALS 0 INCREMENT 1 PREFIX reg_dlv$ TAG IN; /* /**++ /** /** Data Coding /** /**-- /* CONSTANT DEFAULT EQUALS %B0 PREFIX DC$; /* SMSC Default Alphabet CONSTANT IA5 EQUALS %B1 PREFIX DC$; /* IA5 (CCITT T.50)/ASCII (ANSI X3.4) CONSTANT BIN EQUALS %B10 PREFIX DC$; /* Octet unspecified (8-bit binary) CONSTANT LATIN1 EQUALS %B11 PREFIX DC$; /* Latin 1 (ISO-8859-1) CONSTANT BIN2 EQUALS %B100 PREFIX DC$; /* Octet unspecified (8-bit binary) CONSTANT JIS EQUALS %B101 PREFIX DC$; /* JIS (X 0208-1990) CONSTANT ISOCYR EQUALS %B110 PREFIX DC$; /* Cyrllic (ISO-8859-5) CONSTANT HEBREW EQUALS %B111 PREFIX DC$; /* Latin/Hebrew (ISO8859-8) CONSTANT UCS2 EQUALS %B1000 PREFIX DC$; /* UCS2 (ISO/IEC-10646) CONSTANT PICT EQUALS %B1001 PREFIX DC$; /* Pictogram Encoding CONSTANT ISO2022JP EQUALS %B1011 PREFIX DC$; /* ISO-2022-JP (Music Codes) CONSTANT EKANJI EQUALS %B1101 PREFIX DC$; /* Extended Kanji JIS(X 0212-1990) CONSTANT KSC5601 EQUALS %B1110 PREFIX DC$; /* KS C 5601 /* /**++ /** /** Priority Flag /** /**-- /* CONSTANT ( BULK, NORMAL, URGENT, VERY_URGENT ) EQUALS 0 INCREMENT 1 PREFIX PRIO$ TAG ANSI_136; CONSTANT ( NORMAL, INTERACTIVE, URGENT, EMERGENCY ) EQUALS 0 INCREMENT 1 PREFIX PRIO$ TAG IS_95; CONSTANT ( PRIO0, PRIO1, PRIO2, PRIO3 ) EQUALS 0 INCREMENT 1 PREFIX PRIO$ TAG GSM; /* /* Other constans skiped by RRL ... /* /* /**++ /** /** Message States /** /**-- /* CONSTANT ( ENROUTE, /* The message is in enroute state. DELIVERED, /* Message is delivered to destination. EXPIRED, /* Message validity period has expired. DELETED, /* Message has been deleted. UNDELIVERABLE, /* Message is undeliverable. ACCEPTED, /* Message is in accepted state /* (i.e. has been manually read /* on behalf of the subscriber by /* customer service) UNKNOWN, /* Message is in invalid state REJECTED /* Message is in a rejected state ) EQUALS 1 INCREMENT 1 PREFIX MSG_ST$; /* /**++ /** /** SMPP Session Description /** /**-- /* CONSTANT ( CLOSED, /* CLOSED (Unbound and Disconnected) /* An ESME has unbound from the SMSC and has closed the network /* connection. The SMSC may also unbind from the ESME. OPEN, /* OPEN (Connected and Bind Pending) /* An ESME has established a network connection to /* the SMSC but has not yet issued a /* Bind request. BOUND_TX, /* A connected ESME has requested to bind as an ESME /* Transmitter (by issuing a bind_transmitter PDU) /* and has received a response from the SMSC authorising its /* bind request. BOUND_RX, /* A connected ESME has requested to bind as an ESME Receiver /* (by issuing a bind_receiver PDU) and has received a response /* from the SMSC authorising its Bind request. BOUND_TRX /* A connected ESME has requested to bind as an ESME /* Transceiver (by issuing a bind_transceiver PDU) and /* has received a response from the SMSC authorising its /* Bind request. An ESME bound as a Transceiver supports /* the complete set of operations supported by a Transmitter /* ESME and a Receiver ESME. ) EQUALS 0 INCREMENT 2 PREFIX SMPP_SST$; /* /**++ /** /** SMPP/ESME Session context /** /**-- /* CONSTANT MARK EQUALS "SYSM" PREFIX esme_ctx$; AGGREGATE esme_ctx STRUCTURE PREFIX esme_ctx$; mark LONGWORD UNSIGNED; /* A special field used as marke for the context seq LONGWORD UNSIGNED; /* Sequence number used in preparing a PDU state LONGWORD UNSIGNED; /* SMPP Session state, see SMPP_SST$ netchan LONGWORD UNSIGNED; /* A network I/O context/VMS channel number userctx ADDRESS; /* A user defined and maitained context END esme_ctx; /* /**++ /** /** SMPP PDU - Type Definitions /** /**-- /* CONSTANT ( INT, /* An unsigned value with the defined number of octets. /* The octets will always be transmitted MSB first (Big Endian). ASCIZ, /* A series of ASCII characters terminated with the NULL character. DECASCIZ, /* A series of ASCII characters, each character representing a /* decimal digit (0 - 9) and terminated with the NULL character. HEXASCIZ, /* A series of ASCII characters, each character representing a /* hexadecimal digit (0 - F) and terminated with the NULL character. OCTETS /* A series of octets, not necessarily NULL terminated. ) EQUALS 0 INCREMENT 2 PREFIX SMPP_DTYPE$; /* /**++ /** /** A SMPP parameter Tag definitions /** /**-- /* CONSTANT MANDATORY EQUALS %X01400 PREFIX SMPP_PTAG$; CONSTANT ( SID, /* System Id, Identifies the ESME system /* requesting to bind as a transmitter with the SMSC. PWD, /* The password may be used by the SMSC to authenticate the ESME /* requesting to bind. STYPE, /* Identifies the type of ESME system requesting to bind as a transmitter /* with the SMSC. VER, /* Indicates the version of the SMPP protocol supported by the ESME. TON, /* Indicates Type of Number of the ESME address. /* If not known set to NULL. NPI, /* Numbering Plan Indicator for ESME address. /* If not known set to NULL. RANGE, /* The ESME address. /* If not known set to NULL. MSGID, /* This field contains the SMSC /* message ID of the submitted message. It may be used at a /* later stage to query the status of a message, cancel or /* replace the message. SRCTON, /* Type of Number for source address. /* If not known, set to "Unknown" (0x00). SRCNPI, /* Numbering Plan Indicator for ESME address. /* If not known set to NULL. SRC, /* Address of SME which originated this message. DESTTON, /* Type of Number for source address. /* If not known, set to "Unknown" (0x00). DESTNPI, /* Numbering Plan Indicator for ESME address. /* If not known set to NULL. DEST, /* Address of SME which originated this message. ESM_CLASS, /* Indicates Message Mode and Message Type. REG_DLV, /* Indicator for requesting a SMSC delivery receipt or an /* SME acknowledgement DC, /* Indicates the encoding scheme of the payload data FINDATE, /* Date and time when the queried /* message reached a final state. For /* messages which have not yet /* reached a final state this field will /* contain a single NULL octet. MSGSTATE, /* Specifies the status of the queried short message. ERRCODE, /* Where appropriate this holds a /* network error code defining the /* reason for failure of message delivery. SCHEDTM, /* New scheduled delivery time for the short message. /* Set to NULL, if updating of the /* original scheduled delivery time is not desired. PERIOD, /* New expiration time for the short message. Set to NULL, if /* updating of the original expiration time is not required. DEF_MSGID, /* New pre-defined (canned) message identifier. SMSLEN, /* Length of new short message in octets. SMSBODY, /* New short message to replace existing message. REPLIF, /* Flag indicating if submitted message should replace an /* existing message. OPTIONAL, /* It's a just a flag that a command can have optional parameter(s) PROTO, /* Protocol Identifier. Network Specific field. PRIO /* Designates the priority of the message. ) EQUALS %X01400 INCREMENT 1 PREFIX SMPP_PTAG$; /* The recommended use of system_id is to identify the binding entity, e.g., "InternetGW" in the case of an /* Internet Gateway or Voice Mail System. /* The password is used for authentication to secure SMSC access. The ESME may set the password to NULL /* to gain insecure access (if allowed by SMSC administration). /* The system_type (optional) may be used to categorise the system, e.g., "EMAIL", "WWW", etc. CONSTANT DEFAULT EQUALS %B0 PREFIX DC$; /* SMSC Default Alphabet /* /**++ /** /** A SMPP optional parameters Tag definitions /** /**-- /* /* Tag Value Wireless Network Technology CONSTANT DADDR_SU EQUALS %X5 PREFIX SMPP_PTAG$; /* dest_addr_subunit 0x0005 GSM CONSTANT DADDR_NT EQUALS %X6 PREFIX SMPP_PTAG$; /* dest_network_type 0x0006 Generic CONSTANT DEST_BT EQUALS %X7 PREFIX SMPP_PTAG$; /* dest_bearer_type 0x0007 Generic CONSTANT DEST_TID EQUALS %X8 PREFIX SMPP_PTAG$; /* dest_telematics_id 0x0008 GSM CONSTANT SADDR_SU EQUALS %XD PREFIX SMPP_PTAG$; /* source_addr_subunit 0x000D GSM CONSTANT SADDR_NT EQUALS %XE PREFIX SMPP_PTAG$; /* source_network_type 0x000E Generic CONSTANT SRC_BT EQUALS %XF PREFIX SMPP_PTAG$; /* source_bearer_type 0x000F Generic CONSTANT SRC_TID EQUALS %X10 PREFIX SMPP_PTAG$; /* source_telematics_id 0x0010 GSM CONSTANT QOS_TTL EQUALS %X17 PREFIX SMPP_PTAG$; /* qos_time_to_live 0x0017 Generic CONSTANT PAYLD_T EQUALS %X19 PREFIX SMPP_PTAG$; /* payload_type 0x0019 Generic CONSTANT ADDSTS EQUALS %X1D PREFIX SMPP_PTAG$; /* additional_status_info_text 0x001D Generic CONSTANT RMSGID EQUALS %X1E PREFIX SMPP_PTAG$; /* receipted_message_id 0x001E Generic CONSTANT MMSGWFAC EQUALS %X30 PREFIX SMPP_PTAG$; /* ms_msg_wait_facilities 0x0030 GSM CONSTANT PRIVIND EQUALS %X201 PREFIX SMPP_PTAG$; /* privacy_indicator 0x0201 CDMA, TDMA CONSTANT SSUBADDR EQUALS %X202 PREFIX SMPP_PTAG$; /* source_subaddress 0x0202 CDMA, TDMA CONSTANT DSUBADDR EQUALS %X203 PREFIX SMPP_PTAG$; /* dest_subaddress 0x0203 CDMA, TDMA CONSTANT UMSGREF EQUALS %X204 PREFIX SMPP_PTAG$; /* user_message_reference 0x0204 Generic CONSTANT URESPCODE EQUALS %X205 PREFIX SMPP_PTAG$; /* user_response_code 0x0205 CDMA, TDMA CONSTANT SRCPORT EQUALS %X20A PREFIX SMPP_PTAG$; /* source_port 0x020A Generic CONSTANT DESTPORT EQUALS %X20B PREFIX SMPP_PTAG$; /* destination_port 0x020B Generic CONSTANT SARMSGREF EQUALS %X20C PREFIX SMPP_PTAG$; /* sar_msg_ref_num 0x020C Generic CONSTANT LNGIND EQUALS %X20D PREFIX SMPP_PTAG$; /* language_indicator 0x020D CDMA, TDMA CONSTANT SARSEGS EQUALS %X20E PREFIX SMPP_PTAG$; /* sar_total_segments 0x020E Generic CONSTANT SARSEQ EQUALS %X20F PREFIX SMPP_PTAG$; /* sar_segment_seqnum 0x020F Generic CONSTANT SCINTFVER EQUALS %X210 PREFIX SMPP_PTAG$; /* SC_interface_version 0x0210 Generic CONSTANT CBNPIND EQUALS %X302 PREFIX SMPP_PTAG$; /* callback_num_pres_ind 0x0302 TDMA CONSTANT CBATAG EQUALS %X303 PREFIX SMPP_PTAG$; /* callback_num_atag 0x0303 TDMA CONSTANT NUMMSGS EQUALS %X304 PREFIX SMPP_PTAG$; /* number_of_messages 0x0304 CDMA CONSTANT CBNUM EQUALS %X381 PREFIX SMPP_PTAG$; /* callback_num 0x0381 CDMA, TDMA, GSM, iDEN CONSTANT DPFRES EQUALS %X420 PREFIX SMPP_PTAG$; /* dpf_result 0x0420 Generic CONSTANT SETDPF EQUALS %X421 PREFIX SMPP_PTAG$; /* set_dpf 0x0421 Generic CONSTANT MSAVAIL EQUALS %X422 PREFIX SMPP_PTAG$; /* ms_availability_status 0x0422 Generic CONSTANT NETERR EQUALS %X423 PREFIX SMPP_PTAG$; /* network_error_code 0x0423 Generic CONSTANT MSGPAYLD EQUALS %X424 PREFIX SMPP_PTAG$; /* message_payload 0x0424 Generic CONSTANT DELYVRES EQUALS %X425 PREFIX SMPP_PTAG$; /* delivery_failure_reason 0x0425 Generic CONSTANT MOREMSGS EQUALS %X426 PREFIX SMPP_PTAG$; /* more_messages_to_send 0x0426 GSM CONSTANT MSGSTATE EQUALS %X427 PREFIX SMPP_PTAG$; /* message_state 0x0427 Generic CONSTANT USSDSOP EQUALS %X501 PREFIX SMPP_PTAG$; /* ussd_service_op 0x0501 GSM (USSD) CONSTANT DISPTM EQUALS %X1201 PREFIX SMPP_PTAG$; /* display_time 0x1201 CDMA, TDMA CONSTANT SMSSIG EQUALS %X1203 PREFIX SMPP_PTAG$; /* sms_signal 0x1203 TDMA CONSTANT MSVALID EQUALS %X1204 PREFIX SMPP_PTAG$; /* ms_validity 0x1204 CDMA, TDMA CONSTANT ALERT EQUALS %X130C PREFIX SMPP_PTAG$; /* alert_on_message_delivery 0x130C CDMA CONSTANT ITSREPLYT EQUALS %X1380 PREFIX SMPP_PTAG$; /* its_reply_type 0x1380 CDMA CONSTANT ITSSESSINF EQUALS %X1383 PREFIX SMPP_PTAG$; /* its_session_info 0x1383 CDMA /* /**++ /** /** Destination Address types /** /**-- /* CONSTANT SME EQUALS 1 PREFIX SMPP_DA$; /* SME Address CONSTANT DL EQUALS 1 PREFIX SMPP_DA$; /* Distribution List /* /**++ /** /** A SMPP parameter definition structure, it's used internaly by ESME API /** /**-- /* AGGREGATE smpp_par STRUCTURE PREFIX smpp_par$; tag WORD UNSIGNED; /* Parameter tag, see SMPP_PTAG$ type WORD UNSIGNED; /* Parameter type, see SMPP_DTYPE$* constants maxlen WORD UNSIGNED; /* Parameter maximum length defval STRUCTURE PREFIX defval$; val UNION PREFIX defval$; sts ADDRESS (BYTE UNSIGNED);/* Default string value int LONGWORD UNSIGNED; /* Default INT value END val; len WORD UNSIGNED; END defval; END smpp_par; AGGREGATE par STRUCTURE PREFIX par$; tag WORD UNSIGNED; /* Parameter tag, see SMPP_PTAG$ ptr ADDRESS (smpp_par); /* A pointer to parameter descriptor END par; CONSTANT MAXPAR EQUALS 32 PREFIX SMPP_PAR$; AGGREGATE smpp_cmd STRUCTURE PREFIX smpp_cmd$; cmd LONGWORD; /* Command tag, see SMPP_CMD$ /* sst LONGWORD UNSIGNED; /* Required session state, see SMPP_SST$ args par DIMENSION 32; /* A list of mandatory parameters END smpp_cmd; /* /**++ /** /** Core SMPP/ESME routines prototype section /** /**-- /* ENTRY esme_api_init ALIAS ESME_API_INIT PARAMETER ( ADDRESS NAMED ctx OUT, CHARACTER DESCRIPTOR NAMED connsts IN ) RETURNS LONGWORD; ENTRY esme_api_shut ALIAS ESME_API_SHUT PARAMETER ( ADDRESS NAMED ctx IN ) RETURNS LONGWORD; ENTRY esme_api_tx ALIAS ESME_API_TX PARAMETER ( ADDRESS NAMED ctx IN, LONGWORD UNSIGNED VALUE NAMED smpp_cmd IN, ADDRESS NAMED items IN, LONGWORD UNSIGNED VALUE NAMED smpp_seq IN, LONGWORD UNSIGNED VALUE NAMED smpp_sts IN ) RETURNS LONGWORD; ENTRY esme_api_rx ALIAS ESME_API_RX PARAMETER ( ADDRESS NAMED ctx IN, ADDRESS NAMED items IN, LONGWORD UNSIGNED NAMED smpp_resp OUT, LONGWORD UNSIGNED NAMED smpp_sts OUT, CHARACTER DESCRIPTOR NAMED optresp IN, LONGWORD UNSIGNED NAMED optresplen OUT, LONGWORD UNSIGNED NAMED smpp_seq OUT ) RETURNS LONGWORD; ENTRY esme_api_err2cond ALIAS ESME_API_ERR2COND PARAMETER ( LONGWORD UNSIGNED VALUE NAMED esmests IN ) RETURNS LONGWORD; END_MODULE SMPPDEF;