diff options
Diffstat (limited to 'channels/pjsip')
-rw-r--r-- | channels/pjsip/dialplan_functions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/pjsip/dialplan_functions.c b/channels/pjsip/dialplan_functions.c index c89d9ca26..93875b35c 100644 --- a/channels/pjsip/dialplan_functions.c +++ b/channels/pjsip/dialplan_functions.c @@ -1241,10 +1241,13 @@ static int dtmf_mode_refresh_cb(void *obj) struct refresh_data *data = obj; if (data->session->inv_session->state == PJSIP_INV_STATE_CONFIRMED) { - ast_debug(3, "Changing DTMF mode on channel %s after OFFER/ANSER completion. Sending session refresh\n", ast_channel_name(data->session->channel)); + ast_debug(3, "Changing DTMF mode on channel %s after OFFER/ANSWER completion. Sending session refresh\n", ast_channel_name(data->session->channel)); ast_sip_session_refresh(data->session, NULL, NULL, sip_session_response_cb, data->method, 1, NULL); + } else if (data->session->inv_session->state == PJSIP_INV_STATE_INCOMING) { + ast_debug(3, "Changing DTMF mode on channel %s during OFFER/ANSWER exchange. Updating SDP answer\n", ast_channel_name(data->session->channel)); + ast_sip_session_regenerate_answer(data->session, NULL); } return 0; |