Commit 5f348a03 authored by Simon Morlat's avatar Simon Morlat
Browse files

dtmf should be notified from main thread

parent 8bec813e
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment