we are going to examine is destroy and removed during
linphone_core_start_invite() */
calls=calls->next;
+ linphone_call_background_tasks(call,one_second_elapsed);
if (call->state==LinphoneCallOutgoingInit && (curtime-call->start_time>=2)){
/*start the call even if the OPTIONS reply did not arrive*/
linphone_core_start_invite(lc,call,NULL);
}
}
}
- call = linphone_core_get_current_call(lc);
- if(call)
- linphone_call_background_tasks(call,one_second_elapsed);
+
if (linphone_core_video_preview_enabled(lc)){
if (lc->previewstream==NULL && lc->calls==NULL)
toggle_video_preview(lc,TRUE);
if (linphone_core_in_call(lc)){
if (lc->vtable.display_warning)
- lc->vtable.display_warning(lc,_("Sorry, you have to pause or stop the current call first !"));
+ lc->vtable.display_warning(lc,_("Sorry, you have to pause or stop the current call or conference first !"));
return NULL;
}
if(!linphone_core_can_we_add_call(lc)){
int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
int err=0;
if (params!=NULL){
+ const char *subject;
call->params=*params;
update_local_media_description(lc,call,&call->localdesc);
call->camera_active=params->has_video;
+
+ if (params->in_conference){
+ subject="Conference";
+ }else{
+ subject="Media change";
+ }
if (lc->vtable.display_status)
lc->vtable.display_status(lc,_("Modifying call parameters..."));
sal_call_set_local_media_description (call->op,call->localdesc);
- err=sal_call_update(call->op,"Media parameters update");
+ err=sal_call_update(call->op,subject);
}else{
#ifdef VIDEO_ENABLED
if (call->videostream!=NULL){
ring_stop(lc->ringstream);
lc->ringstream=NULL;
}
+
+ /*stop any dtmf tone still playing */
+ ms_message("test");
+ linphone_core_stop_dtmf(lc);
+
linphone_call_stop_media_streams(call);
if (lc->vtable.display_status!=NULL)
lc->vtable.display_status(lc,_("Call ended") );
* @ingroup call_control
**/
bool_t linphone_core_in_call(const LinphoneCore *lc){
- return linphone_core_get_current_call((LinphoneCore *)lc)!=NULL;
+ return linphone_core_get_current_call((LinphoneCore *)lc)!=NULL || linphone_core_is_in_conference(lc);
}
/**
ms_error("No reason to pause this call, it is already paused or inactive.");
return -1;
}
- if (sal_call_update(call->op,subject) != 0)
- {
+ if (sal_call_update(call->op,subject) != 0){
if (lc->vtable.display_warning)
lc->vtable.display_warning(lc,_("Could not pause the call"));
}
{
char temp[255]={0};
LinphoneCall *call = the_call;
-
+ const char *subject="Call resuming";
+
if(call->state!=LinphoneCallPaused ){
ms_warning("we cannot resume a call that has not been established and paused before");
return -1;
}
- if(linphone_core_get_current_call(lc) != NULL){
- ms_warning("There is already a call in process, pause or stop it first.");
- if (lc->vtable.display_warning)
- lc->vtable.display_warning(lc,_("There is already a call in process, pause or stop it first."));
- return -1;
+ if (call->params.in_conference==FALSE){
+ if(linphone_core_get_current_call(lc) != NULL){
+ ms_warning("There is already a call in process, pause or stop it first.");
+ if (lc->vtable.display_warning)
+ lc->vtable.display_warning(lc,_("There is already a call in process, pause or stop it first."));
+ return -1;
+ }
+ ms_message("Resuming call %p",call);
}
- ms_message("Resuming call %p",call);
sal_media_description_set_dir(call->localdesc,SalStreamSendRecv);
- if(sal_call_update(call->op,"Call resuming") != 0){
+ if (call->params.in_conference) subject="Resuming conference";
+ if(sal_call_update(call->op,subject) != 0){
return -1;
}
linphone_call_set_state (call,LinphoneCallResuming,"Resuming");
else ms_filter_call_method(f, MS_DTMF_GEN_START, &dtmf);
}
+/**
+ * @ingroup media_parameters
+ * Plays a repeated tone to the local user until next further call to #linphone_core_stop_dtmf()
+ * @param lc #LinphoneCore
+**/
+void linphone_core_play_tone(LinphoneCore *lc){
+ MSFilter *f=get_dtmf_gen(lc);
+ MSDtmfGenCustomTone def;
+ if (f==NULL){
+ ms_error("No dtmf generator at this time !");
+ return;
+ }
+ def.duration=300;
+ def.frequency=500;
+ def.amplitude=1;
+ def.interval=800;
+ ms_filter_call_method(f, MS_DTMF_GEN_PLAY_CUSTOM,&def);
+}
+
/**
* @ingroup media_parameters
*