class RequestTimeoutEventImpl implements ApplicationListener<RequestTimeoutEvent> {

    @Autowired
    private IDeviceService deviceService;

    @Override
    public void onApplicationEvent(RequestTimeoutEvent event) {<FILL_FUNCTION_BODY>}
}

        ClientTransaction clientTransaction = event.getTimeoutEvent().getClientTransaction();
        if (clientTransaction != null) {
            Request request = clientTransaction.getRequest();
            if (request != null) {
                String host = ((SipURI) request.getRequestURI()).getHost();
                int port = ((SipURI) request.getRequestURI()).getPort();
                Device device = deviceService.getDeviceByHostAndPort(host, port);
                if (device == null) {
                    return;
                }
                deviceService.offline(device.getDeviceId(), "等待消息超时");
            }

        }
    
<no_super_class>