Skip to content
Snippets Groups Projects
Commit 9e895351 authored by Friendly Automation's avatar Friendly Automation Committed by Gerrit Code Review
Browse files

Merge "chan_pjsip: Prevent segfault when running PlayDTMF on hungup channel"

parents 84d3434a c03f50c1
No related branches found
No related tags found
No related merge requests found
......@@ -2261,6 +2261,12 @@ static int chan_pjsip_digit_end(struct ast_channel *ast, char digit, unsigned in
struct ast_sip_session_media *media;
int res = 0;
if (!channel || !channel->session) {
/* This happens when the channel is hungup while a DTMF digit is playing. See ASTERISK-28086 */
ast_debug(3, "Channel %s disappeared while calling digit_end\n", ast_channel_name(ast));
return -1;
}
media = channel->session->active_media_state->default_session[AST_MEDIA_TYPE_AUDIO];
switch (channel->session->dtmf) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment