Esempio n. 1
0
 def _message_received(self, p):
     """Handler for received message event"""
     dsmr = smpp.make_pdu(
         'deliver_sm_resp')  #, message_id=args['pdu'].sm_default_msg_id)
     dsmr.sequence = p.sequence
     self.send_pdu(dsmr)
     self.message_received_handler(pdu=p)
Esempio n. 2
0
    def unbind(self):
        """Unbind from the SMSC"""

        #smppinst = smpp.get_instance()
        p = smpp.make_pdu('unbind')

        res = self.send_pdu(p)
        return self.read_pdu()
Esempio n. 3
0
    def _bind(self, command_name, **args):
        """Send bind_transmitter command to the SMSC"""

        if command_name in ['bind_receiver', 'bind_transceiver']:
            self.receiver_mode = True

        #smppinst = smpp.get_instance()
        p = smpp.make_pdu(command_name, **(args))
        
        res = self.send_pdu(p)
        return self.read_pdu()
Esempio n. 4
0
    def _bind(self, command_name, **args):
        """Send bind_transmitter command to the SMSC"""

        if command_name in ['bind_receiver', 'bind_transceiver']:
            self.receiver_mode = True

        #smppinst = smpp.get_instance()
        p = smpp.make_pdu(command_name, **(args))

        res = self.send_pdu(p)
        return self.read_pdu()
    def send_message_async(self, **args):
        """Send message
        
        Required Arguments:
            source_addr_ton -- Source address TON
            source_addr -- Source address (string)
            dest_addr_ton -- Destination address TON
            destination_addr -- Destination address (string)
            short_message -- Message text (string)"""

        ssm = smpp.make_pdu('submit_sm', **(args))

        self.send_pdu(ssm)
Esempio n. 6
0
 def _enquire_link_received(self):
     ler = smpp.make_pdu('enquire_link_resp')#, message_id=args['pdu'].sm_default_msg_id)
     self.send_pdu(ler)
     logger.debug("Link Enuiry...")
Esempio n. 7
0
 def _message_received(self, p):
     """Handler for received message event"""
     dsmr = smpp.make_pdu('deliver_sm_resp')#, message_id=args['pdu'].sm_default_msg_id)
     dsmr.sequence = p.sequence
     self.send_pdu(dsmr)
     return self.message_received_handler(pdu=p)