static void refer_received(Sal *sal, SalOp *op, const char *referto){ LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal); LinphoneCall *call=(LinphoneCall*)sal_op_get_user_pointer(op); if (call){ if (call->refer_to!=NULL){ ms_free(call->refer_to); } call->refer_to=ms_strdup(referto); call->refer_pending=TRUE; linphone_call_set_state(call,LinphoneCallRefered,"Refered"); if (lc->vtable.display_status){ char *msg=ms_strdup_printf(_("We are transferred to %s"),referto); lc->vtable.display_status(lc,msg); ms_free(msg); } if (call->state!=LinphoneCallPaused){ ms_message("Automatically pausing current call to accept transfer."); linphone_core_pause_call(lc,call); } linphone_core_start_refered_call(lc,call); sal_call_accept_refer(op); }else if (lc->vtable.refer_received){ lc->vtable.refer_received(lc,referto); sal_call_accept_refer(op); } }
void linphone_gtk_hold_clicked(GtkButton *button){ int active=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"active")); LinphoneCall *call=linphone_gtk_get_currently_displayed_call (); if(!active) { linphone_core_pause_call(linphone_gtk_get_core(),call); } else { linphone_core_resume_call(linphone_gtk_get_core(),call); } }
static void send_dtmfs_sequence_call_state_changed() { send_dtmf_base(FALSE,TRUE,'\0',NULL); /*very long DTMF(around 4 sec to be sent)*/ linphone_call_send_dtmfs(marie_call, "123456789123456789"); /*just after, change call state, and expect DTMF to be canceled*/ linphone_core_pause_call(marie_call->core,marie_call); CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallPausing,1)); CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallPaused,1)); /*wait a few time to ensure that no DTMF are received*/ wait_for_until(marie->lc, pauline->lc, NULL, 0, 1000); CU_ASSERT_PTR_NULL(pauline->stat.dtmf_list_received); send_dtmf_cleanup(); }