From ec822e5c4e3dc8b7680b090d09eb7afdf74f8343 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 16 Oct 2013 16:46:16 +0200 Subject: [PATCH] dahdi devstate cachbility workaround Never cache devstate on DAHDI. https://issues.asterisk.org/jira/browse/ASTERISK-22720 --- main/devicestate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/devicestate.c b/main/devicestate.c index 651a4b1..f47707a 100644 --- a/main/devicestate.c +++ b/main/devicestate.c @@ -488,6 +488,12 @@ int ast_devstate_changed_literal(enum ast_device_state state, enum ast_devstate_ * see if we can determine a state based on active calls. * - Once a state has been determined, a device state event is generated. */ + if (strstr(device, "DAHDI") != NULL) { + ast_log(LOG_NOTICE, "Disabling cachability on DAHDI. device='%s', cachable=%d.\n", + device, cachable); + cachable = AST_DEVSTATE_NOT_CACHABLE; + } + if (state != AST_DEVICE_UNKNOWN) { devstate_event(device, state, cachable); -- 1.7.10.4