diff options
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2da9dd7c1..d6f513a64 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8281,6 +8281,8 @@ static int cb_extensionstate(char *context, char* exten, int state, void *data) { struct sip_pvt *p = data; + ast_mutex_lock(&p->lock); + switch(state) { case AST_EXTENSION_DEACTIVATED: /* Retry after a while */ case AST_EXTENSION_REMOVED: /* Extension is gone */ @@ -8301,6 +8303,9 @@ static int cb_extensionstate(char *context, char* exten, int state, void *data) if (option_verbose > 1) ast_verbose(VERBOSE_PREFIX_1 "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username); + + ast_mutex_unlock(&p->lock); + return 0; } |