diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index c3d4f00590..d199899e9e 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -2747,7 +2747,7 @@ SWITCH_STANDARD_API(uuid_pre_answer_function) if (uuid && (xsession = switch_core_session_locate(uuid))) { switch_channel_t *channel = switch_core_session_get_channel(xsession); switch_channel_pre_answer(channel); - switch_core_session_rwunlock(session); + switch_core_session_rwunlock(xsession); } else { stream->write_function(stream, "-ERROR\n"); } @@ -2763,7 +2763,7 @@ SWITCH_STANDARD_API(uuid_answer_function) if (uuid && (xsession = switch_core_session_locate(uuid))) { switch_channel_t *channel = switch_core_session_get_channel(xsession); switch_channel_answer(channel); - switch_core_session_rwunlock(session); + switch_core_session_rwunlock(xsession); } else { stream->write_function(stream, "-ERROR\n"); }