diff --git a/src/include/switch_caller.h b/src/include/switch_caller.h index d35fa99a5e..8b146ba616 100644 --- a/src/include/switch_caller.h +++ b/src/include/switch_caller.h @@ -112,6 +112,7 @@ struct switch_caller_extension { switch_caller_application_t *last_application; /*! Pointer to the entire stack of applications for this extension */ switch_caller_application_t *applications; + struct switch_caller_extension *next; }; /*! diff --git a/src/switch_channel.c b/src/switch_channel.c index c0c4207d30..937ca3e61c 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -757,7 +757,11 @@ SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *chann switch_caller_extension_t *caller_extension) { assert(channel != NULL); + + switch_mutex_lock(channel->profile_mutex); + caller_extension->next = channel->caller_extension; channel->caller_extension = caller_extension; + switch_mutex_unlock(channel->profile_mutex); }