def SMOUplink(self, request: sms_orc8r_pb2.SMOUplinkUnitdata, context): logging.debug( "got an uplink: %s: %s", request.imsi, request.nas_message_container.hex(), ) if not self._is_enabled(): # sleep, and don't poll for messages logging.info( "mme non_eps_service_config is not SMS_ORC8R, ignoring uplink message.", ) return try: self._smsd.ReportDelivery( sms_orc8r_pb2.ReportDeliveryRequest( report=sms_orc8r_pb2.SMOUplinkUnitdata( imsi="IMSI" + request.imsi, nas_message_container=request.nas_message_container, ), ), ) except grpc.RpcError as err: context.set_details('SMS delivery report to smsd failed: %s' % err) context.set_code(grpc.StatusCode.INTERNAL) return
def SMOUplink(self, request: sms_orc8r_pb2.SMOUplinkUnitdata, context): logging.debug("got an uplink: %s: %s", request.imsi, request.nas_message_container.hex()) try: self._smsd.ReportDelivery( sms_orc8r_pb2.ReportDeliveryRequest( report=sms_orc8r_pb2.SMOUplinkUnitdata( imsi=request.imsi, nas_message_container=request.nas_message_container, ), ), ) except grpc.RpcError as err: context.set_details('SMS delivery report to smsd failed: %s', err) context.set_code(grpc.StatusCode.INTERNAL) return