mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +00:00
Merge "chan_pjsip: Prevent segfault when running PlayDTMF on hungup channel" into 16
This commit is contained in:
@@ -2267,6 +2267,12 @@ static int chan_pjsip_digit_end(struct ast_channel *ast, char digit, unsigned in
|
|||||||
struct ast_sip_session_media *media;
|
struct ast_sip_session_media *media;
|
||||||
int res = 0;
|
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];
|
media = channel->session->active_media_state->default_session[AST_MEDIA_TYPE_AUDIO];
|
||||||
|
|
||||||
switch (channel->session->dtmf) {
|
switch (channel->session->dtmf) {
|
||||||
|
Reference in New Issue
Block a user