diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 95bc62106..cb5397d78 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1078,8 +1078,7 @@ void linphone_call_init_media_streams(LinphoneCall *call){ static int dtmf_tab[16]={'0','1','2','3','4','5','6','7','8','9','*','#','A','B','C','D'}; -static void linphone_core_dtmf_received(RtpSession* s, int dtmf, void* user_data){ - LinphoneCore* lc = (LinphoneCore*)user_data; +static void linphone_core_dtmf_received(LinphoneCore *lc, int dtmf){ if (dtmf<0 || dtmf>15){ ms_warning("Bad dtmf value %i",dtmf); return; @@ -1169,7 +1168,7 @@ static void post_configure_audio_streams(LinphoneCall*call){ if (lc->vtable.dtmf_received!=NULL){ /* replace by our default action*/ audio_stream_play_received_dtmfs(call->audiostream,FALSE); - rtp_session_signal_connect(call->audiostream->session,"telephone-event",(RtpCallback)linphone_core_dtmf_received,(unsigned long)lc); + /*rtp_session_signal_connect(call->audiostream->session,"telephone-event",(RtpCallback)linphone_core_dtmf_received,(unsigned long)lc);*/ } } @@ -1955,6 +1954,8 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse } else if ((evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) || (evt == ORTP_EVENT_ICE_GATHERING_FINISHED) || (evt == ORTP_EVENT_ICE_LOSING_PAIRS_COMPLETED) || (evt == ORTP_EVENT_ICE_RESTART_NEEDED)) { handle_ice_events(call, ev); + } else if (evt==ORTP_EVENT_TELEPHONE_EVENT){ + linphone_core_dtmf_received(lc,evd->info.telephone_event); } ortp_event_destroy(ev); }