mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
Merge branch 'master' into dev_vcard
Conflicts: coreapi/Makefile.am coreapi/conference.h
This commit is contained in:
commit
4583352bad
32 changed files with 533 additions and 154 deletions
|
|
@ -44,7 +44,8 @@ linphone_include_HEADERS=\
|
|||
xml2lpc.h \
|
||||
xmlrpc.h \
|
||||
vcard.h \
|
||||
carddav.h
|
||||
carddav.h \
|
||||
conference.h
|
||||
|
||||
lib_LTLIBRARIES=liblinphone.la
|
||||
|
||||
|
|
@ -58,7 +59,7 @@ liblinphone_la_SOURCES=\
|
|||
call_params.c \
|
||||
chat.c \
|
||||
chat_file_transfer.c \
|
||||
conference.cc conference.h \
|
||||
conference.cc conference.h conference_private.h \
|
||||
contactprovider.c contactprovider.h contact_providers_priv.h \
|
||||
content.c \
|
||||
dict.c \
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ RtpTransport *TunnelManager::createRtpTransport(int port){
|
|||
t->t_close=sCloseRtpTransport;
|
||||
t->t_destroy=sDestroyRtpTransport;
|
||||
t->data=socket;
|
||||
ms_message("Creating tunnel RTP transport for local virtual port %i", port);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -701,7 +701,6 @@ void sal_op_assign_recv_headers(SalOp *op, belle_sip_message_t *incoming){
|
|||
const char *sal_op_get_remote_contact(const SalOp *op){
|
||||
/*
|
||||
* remote contact is filled in process_response
|
||||
* return sal_custom_header_find(op->base.recv_custom_headers,"Contact");
|
||||
*/
|
||||
return op->base.remote_contact;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ static void stream_description_to_sdp ( belle_sdp_session_description_t *session
|
|||
belle_sdp_media_description_add_attribute(media_desc,belle_sdp_attribute_create ("rtcp",buffer));
|
||||
}
|
||||
}
|
||||
if (stream->ice_completed == TRUE) {
|
||||
if (stream->set_nortpproxy == TRUE) {
|
||||
belle_sdp_media_description_add_attribute(media_desc,belle_sdp_attribute_create ("nortpproxy","yes"));
|
||||
}
|
||||
if (stream->ice_mismatch == TRUE) {
|
||||
|
|
@ -423,7 +423,7 @@ belle_sdp_session_description_t * media_description_to_sdp ( const SalMediaDescr
|
|||
belle_sdp_session_description_set_bandwidth ( session_desc,"AS",desc->bandwidth );
|
||||
}
|
||||
|
||||
if (desc->ice_completed == TRUE) belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("nortpproxy","yes"));
|
||||
if (desc->set_nortpproxy == TRUE) belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("nortpproxy","yes"));
|
||||
if (desc->ice_pwd[0] != '\0') belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("ice-pwd",desc->ice_pwd));
|
||||
if (desc->ice_ufrag[0] != '\0') belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("ice-ufrag",desc->ice_ufrag));
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@ bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl) {
|
|||
return cl->video_enabled;
|
||||
}
|
||||
|
||||
bool_t linphone_call_log_was_conference(LinphoneCallLog *cl) {
|
||||
return cl->was_conference;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Reference and user data handling functions *
|
||||
|
|
|
|||
|
|
@ -179,6 +179,13 @@ LINPHONE_PUBLIC bool_t linphone_call_log_video_enabled(LinphoneCallLog *cl);
|
|||
**/
|
||||
LINPHONE_PUBLIC char * linphone_call_log_to_str(LinphoneCallLog *cl);
|
||||
|
||||
/**
|
||||
* Tells whether that call was a call to a conference server
|
||||
* @param[in] cl #LinphoneCallLog object
|
||||
* @return TRUE if the call was a call to a conference server
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_call_log_was_conference(LinphoneCallLog *cl);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Reference and user data handling functions *
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "conference.h"
|
||||
#include "conference_private.h"
|
||||
#include <mediastreamer2/msvolume.h>
|
||||
#include <typeinfo>
|
||||
#include <list>
|
||||
|
|
@ -49,9 +49,21 @@ private:
|
|||
|
||||
class Conference {
|
||||
public:
|
||||
Conference(LinphoneCore *core);
|
||||
class Params {
|
||||
public:
|
||||
Params(const LinphoneCore *core = NULL);
|
||||
void enableVideo(bool enable) {m_enableVideo = enable;}
|
||||
bool videoRequested() const {return m_enableVideo;}
|
||||
|
||||
private:
|
||||
bool m_enableVideo;
|
||||
};
|
||||
|
||||
Conference(LinphoneCore *core, const Params *params = NULL);
|
||||
virtual ~Conference() {};
|
||||
|
||||
const Params &getCurrentParams() const {return m_currentParams;}
|
||||
|
||||
virtual int addParticipant(LinphoneCall *call) = 0;
|
||||
virtual int removeParticipant(LinphoneCall *call) = 0;
|
||||
virtual int removeParticipant(const LinphoneAddress *uri) = 0;
|
||||
|
|
@ -83,11 +95,12 @@ protected:
|
|||
AudioStream *m_localParticipantStream;
|
||||
bool m_isMuted;
|
||||
std::list<Participant> m_participants;
|
||||
Params m_currentParams;
|
||||
};
|
||||
|
||||
class LocalConference: public Conference {
|
||||
public:
|
||||
LocalConference(LinphoneCore *core);
|
||||
LocalConference(LinphoneCore *core, const Params *params = NULL);
|
||||
virtual ~LocalConference();
|
||||
|
||||
virtual int addParticipant(LinphoneCall *call);
|
||||
|
|
@ -103,9 +116,9 @@ public:
|
|||
virtual int startRecording(const char *path);
|
||||
virtual int stopRecording();
|
||||
|
||||
void onCallStreamStarting(LinphoneCall *call, bool isPausedByRemote);
|
||||
void onCallStreamStopping(LinphoneCall *call);
|
||||
void onCallTerminating(LinphoneCall *call);
|
||||
virtual void onCallStreamStarting(LinphoneCall *call, bool isPausedByRemote);
|
||||
virtual void onCallStreamStopping(LinphoneCall *call);
|
||||
virtual void onCallTerminating(LinphoneCall *call);
|
||||
|
||||
private:
|
||||
void addLocalEndpoint();
|
||||
|
|
@ -124,7 +137,7 @@ private:
|
|||
|
||||
class RemoteConference: public Conference {
|
||||
public:
|
||||
RemoteConference(LinphoneCore *core);
|
||||
RemoteConference(LinphoneCore *core, const Params *params = NULL);
|
||||
virtual ~RemoteConference();
|
||||
|
||||
virtual int addParticipant(LinphoneCall *call);
|
||||
|
|
@ -190,10 +203,20 @@ bool Participant::operator==(const Participant &src) const {
|
|||
|
||||
|
||||
|
||||
Conference::Conference(LinphoneCore *core) :
|
||||
Conference::Params::Params(const LinphoneCore *core): m_enableVideo(false) {
|
||||
if(core) {
|
||||
const LinphoneVideoPolicy *policy = linphone_core_get_video_policy(core);
|
||||
if(policy->automatically_initiate) m_enableVideo = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Conference::Conference(LinphoneCore *core, const Conference::Params *params):
|
||||
m_core(core),
|
||||
m_localParticipantStream(NULL),
|
||||
m_isMuted(false) {
|
||||
if(params) m_currentParams = *params;
|
||||
}
|
||||
|
||||
int Conference::addParticipant(LinphoneCall *call) {
|
||||
|
|
@ -255,15 +278,16 @@ Participant *Conference::find_participant(const LinphoneAddress *uri) {
|
|||
|
||||
|
||||
|
||||
LocalConference::LocalConference(LinphoneCore *core): Conference(core),
|
||||
LocalConference::LocalConference(LinphoneCore *core, const Conference::Params *params):
|
||||
Conference(core, params),
|
||||
m_conf(NULL),
|
||||
m_localEndpoint(NULL),
|
||||
m_recordEndpoint(NULL),
|
||||
m_localDummyProfile(NULL),
|
||||
m_terminated(FALSE) {
|
||||
MSAudioConferenceParams params;
|
||||
params.samplerate = lp_config_get_int(m_core->config, "sound","conference_rate",16000);
|
||||
m_conf=ms_audio_conference_new(¶ms);
|
||||
MSAudioConferenceParams ms_conf_params;
|
||||
ms_conf_params.samplerate = lp_config_get_int(m_core->config, "sound","conference_rate",16000);
|
||||
m_conf=ms_audio_conference_new(&ms_conf_params);
|
||||
}
|
||||
|
||||
LocalConference::~LocalConference() {
|
||||
|
|
@ -548,8 +572,8 @@ void LocalConference::onCallTerminating(LinphoneCall *call) {
|
|||
|
||||
|
||||
|
||||
RemoteConference::RemoteConference(LinphoneCore *core):
|
||||
Conference(core),
|
||||
RemoteConference::RemoteConference(LinphoneCore *core, const Conference::Params *params):
|
||||
Conference(core, params),
|
||||
m_focusAddr(NULL),
|
||||
m_focusContact(NULL),
|
||||
m_focusCall(NULL),
|
||||
|
|
@ -573,6 +597,7 @@ RemoteConference::~RemoteConference() {
|
|||
|
||||
int RemoteConference::addParticipant(LinphoneCall *call) {
|
||||
LinphoneAddress *addr;
|
||||
LinphoneCallParams *params;
|
||||
|
||||
switch(m_state) {
|
||||
case NotConnectedToFocus:
|
||||
|
|
@ -580,12 +605,17 @@ int RemoteConference::addParticipant(LinphoneCall *call) {
|
|||
ms_message("Calling the conference focus (%s)", m_focusAddr);
|
||||
addr = linphone_address_new(m_focusAddr);
|
||||
if(addr) {
|
||||
m_focusCall = linphone_call_ref(linphone_core_invite_address(m_core, addr));
|
||||
params = linphone_core_create_call_params(m_core, NULL);
|
||||
linphone_call_params_enable_video(params, m_currentParams.videoRequested());
|
||||
m_focusCall = linphone_call_ref(linphone_core_invite_address_with_params(m_core, addr, params));
|
||||
m_localParticipantStream = m_focusCall->audiostream;
|
||||
m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call));
|
||||
m_state = ConnectingToFocus;
|
||||
linphone_address_unref(addr);
|
||||
call->conf_ref = (LinphoneConference *)this;
|
||||
LinphoneCallLog *callLog = linphone_call_get_call_log(m_focusCall);
|
||||
callLog->was_conference = TRUE;
|
||||
linphone_address_unref(addr);
|
||||
linphone_call_params_unref(params);
|
||||
return 0;
|
||||
} else return -1;
|
||||
|
||||
|
|
@ -784,14 +814,44 @@ void RemoteConference::transferStateChanged(LinphoneCore *lc, LinphoneCall *tran
|
|||
|
||||
|
||||
|
||||
LinphoneConferenceParams *linphone_conference_params_new(const LinphoneCore *core) {
|
||||
return (LinphoneConferenceParams *)new Conference::Params(core);
|
||||
}
|
||||
|
||||
void linphone_conference_params_free(LinphoneConferenceParams *params) {
|
||||
delete (Conference::Params *)params;
|
||||
}
|
||||
|
||||
LinphoneConferenceParams *linphone_conference_params_clone(const LinphoneConferenceParams *params) {
|
||||
return (LinphoneConferenceParams *)new Conference::Params(*(Conference::Params *)params);
|
||||
}
|
||||
|
||||
void linphone_conference_params_enable_video(LinphoneConferenceParams *params, bool_t enable) {
|
||||
((Conference::Params *)params)->enableVideo(enable);
|
||||
}
|
||||
|
||||
bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params) {
|
||||
return ((Conference::Params *)params)->videoRequested();
|
||||
}
|
||||
|
||||
|
||||
|
||||
LinphoneConference *linphone_local_conference_new(LinphoneCore *core) {
|
||||
return (LinphoneConference *) new LocalConference(core);
|
||||
}
|
||||
|
||||
LinphoneConference *linphone_local_conference_new_with_params(LinphoneCore *core, const LinphoneConferenceParams *params) {
|
||||
return (LinphoneConference *) new LocalConference(core, (Conference::Params *)params);
|
||||
}
|
||||
|
||||
LinphoneConference *linphone_remote_conference_new(LinphoneCore *core) {
|
||||
return (LinphoneConference *) new RemoteConference(core);
|
||||
}
|
||||
|
||||
LinphoneConference *linphone_remote_conference_new_with_params(LinphoneCore *core, const LinphoneConferenceParams *params) {
|
||||
return (LinphoneConference *) new RemoteConference(core, (Conference::Params *)params);
|
||||
}
|
||||
|
||||
void linphone_conference_free(LinphoneConference *obj) {
|
||||
delete (Conference *)obj;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* conference.cc
|
||||
* conference.h
|
||||
*
|
||||
* Thu Nov 26, 2015
|
||||
* Copyright 2015 Belledonne Communications
|
||||
|
|
@ -25,50 +25,67 @@
|
|||
|
||||
#ifndef CONFERENCE_H
|
||||
#define CONFERENCE_H
|
||||
|
||||
|
||||
#include "linphonecore.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//typedef struct _LinphoneConference LinphoneConference;
|
||||
/**
|
||||
* @addtogroup call_control
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
LinphoneConferenceClassLocal,
|
||||
LinphoneConferenceClassRemote
|
||||
} LinphoneConferenceClass;
|
||||
/**
|
||||
* Create a #LinphoneConferenceParams with default parameters set.
|
||||
* @param core #LinphoneCore to use to find out the default parameters. Can be NULL.
|
||||
* @return A freshly allocated #LinphoneConferenceParams
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneConferenceParams *linphone_conference_params_new(const LinphoneCore *core);
|
||||
/**
|
||||
* Free a #LinphoneConferenceParams
|
||||
* @param params #LinphoneConferenceParams to free
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_conference_params_free(LinphoneConferenceParams *params);
|
||||
/**
|
||||
* Clone a #LinphoneConferenceParams
|
||||
* @param params The #LinphoneConfrenceParams to clone
|
||||
* @return An allocated #LinphoneConferenceParams with the same parameters than params
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneConferenceParams *linphone_conference_params_clone(const LinphoneConferenceParams *params);
|
||||
/**
|
||||
* Enable video when starting a conference
|
||||
* @param params A #LinphoneConnferenceParams
|
||||
* @param enable If true, video will be enabled during conference
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_conference_params_enable_video(LinphoneConferenceParams *params, bool_t enable);
|
||||
/**
|
||||
* Check whether video will be enable at conference starting
|
||||
* @return if true, the video will be enable at conference starting
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params);
|
||||
|
||||
LinphoneConference *linphone_local_conference_new(LinphoneCore *core);
|
||||
LinphoneConference *linphone_remote_conference_new(LinphoneCore *core);
|
||||
void linphone_conference_free(LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *call);
|
||||
int linphone_conference_remove_participant_with_call(LinphoneConference *obj, LinphoneCall *call);
|
||||
/**
|
||||
* Remove a participant from a conference
|
||||
* @param obj A #LinphoneConference
|
||||
* @param uri SIP URI of the participant to remove
|
||||
* @return 0 if succeeded, -1 if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri);
|
||||
int linphone_conference_terminate(LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_enter(LinphoneConference *obj);
|
||||
int linphone_conference_leave(LinphoneConference *obj);
|
||||
LINPHONE_PUBLIC bool_t linphone_conference_is_in(const LinphoneConference *obj);
|
||||
AudioStream *linphone_conference_get_audio_stream(const LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_mute_microphone(LinphoneConference *obj, bool_t val);
|
||||
bool_t linphone_conference_microphone_is_muted(const LinphoneConference *obj);
|
||||
float linphone_conference_get_input_volume(const LinphoneConference *obj);
|
||||
|
||||
LINPHONE_PUBLIC int linphone_conference_get_size(const LinphoneConference *obj);
|
||||
/**
|
||||
* Get URIs of all participants of one conference
|
||||
* The returned MSList contains URIs of all participant. That list must be
|
||||
* freed after use and each URI must be unref with linphone_address_unref()
|
||||
* @param obj A #LinphoneConference
|
||||
* @return \mslist{LinphoneAddress}
|
||||
*/
|
||||
LINPHONE_PUBLIC MSList *linphone_conference_get_participants(const LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_start_recording(LinphoneConference *obj, const char *path);
|
||||
int linphone_conference_stop_recording(LinphoneConference *obj);
|
||||
|
||||
void linphone_conference_on_call_stream_starting(LinphoneConference *obj, LinphoneCall *call, bool_t is_paused_by_remote);
|
||||
void linphone_conference_on_call_stream_stopping(LinphoneConference *obj, LinphoneCall *call);
|
||||
void linphone_conference_on_call_terminating(LinphoneConference *obj, LinphoneCall *call);
|
||||
|
||||
bool_t linphone_conference_check_class(LinphoneConference *obj, LinphoneConferenceClass _class);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
74
coreapi/conference_private.h
Normal file
74
coreapi/conference_private.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*******************************************************************************
|
||||
* conference_private.h
|
||||
*
|
||||
* Tue Jan 12, 2015
|
||||
* Copyright 2015 Belledonne Communications
|
||||
* Author: Linphone's team
|
||||
* Email info@belledonne-communications.com
|
||||
******************************************************************************/
|
||||
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef CONFERENCE_PRIVATE_H
|
||||
#define CONFERENCE_PRIVATE_H
|
||||
|
||||
#include "linphonecore.h"
|
||||
#include "conference.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
LinphoneConferenceClassLocal,
|
||||
LinphoneConferenceClassRemote
|
||||
} LinphoneConferenceClass;
|
||||
|
||||
LinphoneConference *linphone_local_conference_new(LinphoneCore *core);
|
||||
LinphoneConference *linphone_local_conference_new_with_params(LinphoneCore *core, const LinphoneConferenceParams *params);
|
||||
LinphoneConference *linphone_remote_conference_new(LinphoneCore *core);
|
||||
LinphoneConference *linphone_remote_conference_new_with_params(LinphoneCore *core, const LinphoneConferenceParams *params);
|
||||
void linphone_conference_free(LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_add_participant(LinphoneConference *obj, LinphoneCall *call);
|
||||
int linphone_conference_remove_participant_with_call(LinphoneConference *obj, LinphoneCall *call);
|
||||
int linphone_conference_terminate(LinphoneConference *obj);
|
||||
int linphone_conference_get_size(const LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_enter(LinphoneConference *obj);
|
||||
int linphone_conference_leave(LinphoneConference *obj);
|
||||
bool_t linphone_conference_is_in(const LinphoneConference *obj);
|
||||
|
||||
AudioStream *linphone_conference_get_audio_stream(const LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_mute_microphone(LinphoneConference *obj, bool_t val);
|
||||
bool_t linphone_conference_microphone_is_muted(const LinphoneConference *obj);
|
||||
float linphone_conference_get_input_volume(const LinphoneConference *obj);
|
||||
|
||||
int linphone_conference_start_recording(LinphoneConference *obj, const char *path);
|
||||
int linphone_conference_stop_recording(LinphoneConference *obj);
|
||||
|
||||
void linphone_conference_on_call_stream_starting(LinphoneConference *obj, LinphoneCall *call, bool_t is_paused_by_remote);
|
||||
void linphone_conference_on_call_stream_stopping(LinphoneConference *obj, LinphoneCall *call);
|
||||
void linphone_conference_on_call_terminating(LinphoneConference *obj, LinphoneCall *call);
|
||||
|
||||
LINPHONE_PUBLIC bool_t linphone_conference_check_class(LinphoneConference *obj, LinphoneConferenceClass _class);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //CONFERENCE_PRIVATE_H
|
||||
|
|
@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "sipsetup.h"
|
||||
#include "lpconfig.h"
|
||||
#include "private.h"
|
||||
#include "conference_private.h"
|
||||
#include <ortp/event.h>
|
||||
#include <ortp/b64.h>
|
||||
#include <math.h>
|
||||
|
|
@ -578,8 +579,11 @@ void linphone_call_increment_local_media_description(LinphoneCall *call){
|
|||
}
|
||||
|
||||
void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call){
|
||||
LinphoneCore *lc = call->core;
|
||||
if (call->ice_session != NULL) {
|
||||
_update_local_media_description_from_ice(call->localdesc, call->ice_session);
|
||||
/*set this to FALSE once flexisip are updated*/
|
||||
bool_t use_nortpproxy = lp_config_get_int(lc->config, "sip", "ice_uses_nortpproxy", TRUE);
|
||||
_update_local_media_description_from_ice(call->localdesc, call->ice_session, use_nortpproxy);
|
||||
linphone_core_update_ice_state_in_call_stats(call);
|
||||
}
|
||||
#ifdef BUILD_UPNP
|
||||
|
|
@ -1091,7 +1095,9 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr
|
|||
linphone_call_get_local_ip(call, to);
|
||||
call->params = linphone_call_params_copy(params);
|
||||
linphone_call_init_common(call, from, to);
|
||||
|
||||
|
||||
call->current_params->update_call_when_ice_completed = call->params->update_call_when_ice_completed; /*copy param*/
|
||||
|
||||
linphone_call_fill_media_multicast_addr(call);
|
||||
|
||||
if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseIce) {
|
||||
|
|
@ -1299,6 +1305,9 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
|
|||
*/
|
||||
/*set privacy*/
|
||||
call->current_params->privacy=(LinphonePrivacyMask)sal_op_get_privacy(call->op);
|
||||
/*config params*/
|
||||
call->current_params->update_call_when_ice_completed = call->params->update_call_when_ice_completed; /*copy config params*/
|
||||
|
||||
/*set video support */
|
||||
call->params->has_video = linphone_core_video_enabled(lc) && lc->video_policy.automatically_accept;
|
||||
if (md) {
|
||||
|
|
@ -1753,7 +1762,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
|||
if ((all_streams_encrypted = linphone_call_all_streams_encrypted(call)) && linphone_call_get_authentication_token(call)) {
|
||||
call->current_params->media_encryption=LinphoneMediaEncryptionZRTP;
|
||||
} else {
|
||||
ms_message("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i, auth_token=%s)",
|
||||
/*to avoid to many traces*/
|
||||
ms_debug("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i, auth_token=%s)",
|
||||
linphone_media_encryption_to_string(call->params->media_encryption), all_streams_encrypted, call->auth_token == NULL ? "" : call->auth_token);
|
||||
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
|
||||
}
|
||||
|
|
@ -1765,7 +1775,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
|||
if (linphone_call_get_n_active_streams(call)==0 || (all_streams_encrypted = linphone_call_all_streams_encrypted(call))) {
|
||||
call->current_params->media_encryption = call->params->media_encryption;
|
||||
} else {
|
||||
ms_message("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i)",
|
||||
/*to avoid to many traces*/
|
||||
ms_debug("Encryption was requested to be %s, but isn't effective (all_streams_encrypted=%i)",
|
||||
linphone_media_encryption_to_string(call->params->media_encryption), all_streams_encrypted);
|
||||
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
|
||||
}
|
||||
|
|
@ -1981,12 +1992,9 @@ const char *linphone_call_get_remote_user_agent(LinphoneCall *call){
|
|||
* Returns the far end's sip contact as a string, if available.
|
||||
**/
|
||||
const char *linphone_call_get_remote_contact(LinphoneCall *call){
|
||||
const LinphoneCallParams* lcp = linphone_call_get_remote_params(call);
|
||||
if( lcp ){
|
||||
// we're not using sal_op_get_remote_contact() here because the returned value is stripped from
|
||||
// params that we need, like the instanceid. Getting it from the headers will make sure we
|
||||
// get everything
|
||||
return linphone_call_params_get_custom_header(lcp, "Contact");
|
||||
if( call->op ){
|
||||
/*sal_op_get_remote_contact preserves header params*/
|
||||
return sal_op_get_remote_contact(call->op);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -2397,6 +2405,7 @@ void linphone_call_init_audio_stream(LinphoneCall *call){
|
|||
|
||||
rtp_session_get_transports(audiostream->ms.sessions.rtp_session,&meta_rtp,&meta_rtcp);
|
||||
if (meta_rtp_transport_get_endpoint(meta_rtp) == NULL) {
|
||||
ms_message("LinphoneCall[%p]: using custom audio RTP transport endpoint.", call);
|
||||
meta_rtp_transport_set_endpoint(meta_rtp,lc->rtptf->audio_rtp_func(lc->rtptf->audio_rtp_func_data, call->media_ports[call->main_audio_stream_index].rtp_port));
|
||||
}
|
||||
if (meta_rtp_transport_get_endpoint(meta_rtcp) == NULL) {
|
||||
|
|
@ -2465,6 +2474,7 @@ void linphone_call_init_video_stream(LinphoneCall *call){
|
|||
|
||||
rtp_session_get_transports(call->videostream->ms.sessions.rtp_session,&meta_rtp,&meta_rtcp);
|
||||
if (meta_rtp_transport_get_endpoint(meta_rtp) == NULL) {
|
||||
ms_message("LinphoneCall[%p]: using custom video RTP transport endpoint.", call);
|
||||
meta_rtp_transport_set_endpoint(meta_rtp,lc->rtptf->video_rtp_func(lc->rtptf->video_rtp_func_data, call->media_ports[call->main_video_stream_index].rtp_port));
|
||||
}
|
||||
if (meta_rtp_transport_get_endpoint(meta_rtcp) == NULL) {
|
||||
|
|
@ -3098,7 +3108,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, LinphoneCallSta
|
|||
}
|
||||
}
|
||||
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->audiostream->ms.sessions,linphone_core_is_media_encryption_mandatory(call->core));
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->audiostream->ms.sessions,call->current_params->encryption_mandatory);
|
||||
|
||||
if (next_state == LinphoneCallPaused && captcard == NULL && playfile != NULL){
|
||||
int pause_time=500;
|
||||
|
|
@ -3277,7 +3287,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, LinphoneCallSta
|
|||
used_pt, &io);
|
||||
}
|
||||
}
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->videostream->ms.sessions,linphone_core_is_media_encryption_mandatory(call->core));
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->videostream->ms.sessions,call->current_params->encryption_mandatory);
|
||||
_linphone_call_set_next_video_frame_decoded_trigger(call);
|
||||
}
|
||||
}else ms_warning("No video stream accepted.");
|
||||
|
|
@ -3335,7 +3345,7 @@ static void linphone_call_start_text_stream(LinphoneCall *call) {
|
|||
text_stream_start(call->textstream, call->text_profile, rtp_addr, tstream->rtp_port, rtcp_addr, (linphone_core_rtcp_enabled(lc) && !is_multicast) ? (tstream->rtcp_port ? tstream->rtcp_port : tstream->rtp_port + 1) : 0, used_pt);
|
||||
ms_filter_add_notify_callback(call->textstream->rttsink, real_time_text_character_received, call, FALSE);
|
||||
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->textstream->ms.sessions,linphone_core_is_media_encryption_mandatory(call->core));
|
||||
ms_media_stream_sessions_set_encryption_mandatory(&call->textstream->ms.sessions,call->current_params->encryption_mandatory);
|
||||
} else ms_warning("No text stream accepted.");
|
||||
} else {
|
||||
ms_message("No valid text stream defined.");
|
||||
|
|
@ -3428,6 +3438,10 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
|
|||
ms_fatal("start_media_stream() called without prior init !");
|
||||
return;
|
||||
}
|
||||
if (call->params->media_encryption==LinphoneMediaEncryptionDTLS) {
|
||||
call->current_params->encryption_mandatory = TRUE;
|
||||
ms_message("Forcing encryption mandatory on call [%p]",call);
|
||||
}
|
||||
|
||||
call->nb_media_starts++;
|
||||
#if defined(VIDEO_ENABLED)
|
||||
|
|
@ -3484,6 +3498,10 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
|
|||
set_dtls_fingerprint_on_all_streams(call);
|
||||
|
||||
if ((call->ice_session != NULL) && (ice_session_state(call->ice_session) != IS_Completed)) {
|
||||
if (call->params->media_encryption==LinphoneMediaEncryptionDTLS) {
|
||||
call->current_params->update_call_when_ice_completed = FALSE;
|
||||
ms_message("Disabling update call when ice completed on call [%p]",call);
|
||||
}
|
||||
ice_session_start_connectivity_checks(call->ice_session);
|
||||
} else {
|
||||
/*should not start dtls until ice is completed*/
|
||||
|
|
@ -3910,7 +3928,7 @@ static bool_t ice_in_progress(LinphoneCallStats *stats){
|
|||
|
||||
/**
|
||||
* Indicates whether an operation is in progress at the media side.
|
||||
* It can a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while
|
||||
* It can be a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while
|
||||
* the media is busy in establishing the connection (typically ICE connectivity checks). It can result in failures generating loss of time
|
||||
* in future operations in the call.
|
||||
* Applications are invited to check this function after each call state change to decide whether certain operations are permitted or not.
|
||||
|
|
@ -4263,7 +4281,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
|
|||
case IS_Completed:
|
||||
ice_session_select_candidates(call->ice_session);
|
||||
if (ice_session_role(call->ice_session) == IR_Controlling
|
||||
&& lp_config_get_int(call->core->config, "sip", "update_call_when_ice_completed", TRUE)) {
|
||||
&& params->update_call_when_ice_completed) {
|
||||
params->internal_call_update = TRUE;
|
||||
linphone_core_update_call(call->core, call, params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "private.h"
|
||||
#include "quality_reporting.h"
|
||||
#include "lime.h"
|
||||
#include "conference_private.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
|
|
@ -5394,7 +5395,7 @@ void linphone_core_set_video_policy(LinphoneCore *lc, const LinphoneVideoPolicy
|
|||
* See linphone_core_set_video_policy() for more details.
|
||||
* @ingroup media_parameters
|
||||
**/
|
||||
const LinphoneVideoPolicy *linphone_core_get_video_policy(LinphoneCore *lc){
|
||||
const LinphoneVideoPolicy *linphone_core_get_video_policy(const LinphoneCore *lc){
|
||||
return &lc->video_policy;
|
||||
}
|
||||
|
||||
|
|
@ -7114,6 +7115,8 @@ void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *para
|
|||
params->real_early_media=lp_config_get_int(lc->config,"misc","real_early_media",FALSE);
|
||||
params->audio_multicast_enabled=linphone_core_audio_multicast_enabled(lc);
|
||||
params->video_multicast_enabled=linphone_core_video_multicast_enabled(lc);
|
||||
params->update_call_when_ice_completed = lp_config_get_int(lc->config, "sip", "update_call_when_ice_completed", TRUE);
|
||||
params->encryption_mandatory = linphone_core_is_media_encryption_mandatory(lc);
|
||||
}
|
||||
|
||||
void linphone_core_set_device_identifier(LinphoneCore *lc,const char* device_id) {
|
||||
|
|
@ -7488,20 +7491,30 @@ LinphoneRingtonePlayer *linphone_core_get_ringtoneplayer(LinphoneCore *lc) {
|
|||
return lc->ringtoneplayer;
|
||||
}
|
||||
|
||||
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call) {
|
||||
LinphoneConference *linphone_core_create_conference_with_params(LinphoneCore *lc, const LinphoneConferenceParams *params) {
|
||||
const char *conf_method_name;
|
||||
if(lc->conf_ctx == NULL) {
|
||||
conf_method_name = lp_config_get_string(lc->config, "misc", "conference_type", "local");
|
||||
if(strcasecmp(conf_method_name, "local") == 0) {
|
||||
lc->conf_ctx = linphone_local_conference_new(lc);
|
||||
lc->conf_ctx = linphone_local_conference_new_with_params(lc, params);
|
||||
} else if(strcasecmp(conf_method_name, "remote") == 0) {
|
||||
lc->conf_ctx = linphone_remote_conference_new(lc);
|
||||
lc->conf_ctx = linphone_remote_conference_new_with_params(lc, params);
|
||||
} else {
|
||||
ms_error("'%s' is not a valid conference method", conf_method_name);
|
||||
return -1;
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
ms_error("Could not create a conference: a conference instance already exists");
|
||||
return NULL;
|
||||
}
|
||||
return linphone_conference_add_participant(lc->conf_ctx, call);
|
||||
return lc->conf_ctx;
|
||||
}
|
||||
|
||||
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call) {
|
||||
LinphoneConference *conference = linphone_core_get_conference(lc);
|
||||
if(conference == NULL) conference = linphone_core_create_conference_with_params(lc, NULL);
|
||||
if(conference) return linphone_conference_add_participant(lc->conf_ctx, call);
|
||||
else return -1;
|
||||
}
|
||||
|
||||
int linphone_core_add_all_to_conference(LinphoneCore *lc) {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,18 @@ struct _LinphoneInfoMessage;
|
|||
*/
|
||||
typedef struct _LinphoneCore LinphoneCore;
|
||||
|
||||
/**
|
||||
* Internal object of LinphoneCore representing a conference
|
||||
* @ingroup call_control
|
||||
*/
|
||||
typedef struct _LinphoneConference LinphoneConference;
|
||||
|
||||
/**
|
||||
* Parameters for initialization of conferences
|
||||
* @ingroup call_control
|
||||
*/
|
||||
typedef struct _LinphoneCorferenceParams LinphoneConferenceParams;
|
||||
|
||||
|
||||
/**
|
||||
* Disable a sip transport
|
||||
|
|
@ -140,12 +152,6 @@ enum _LinphoneStreamType {
|
|||
**/
|
||||
typedef enum _LinphoneStreamType LinphoneStreamType;
|
||||
|
||||
/**
|
||||
* Internal object of LinphoneCore representing a conference
|
||||
* @ingroup call_control
|
||||
*/
|
||||
typedef struct _LinphoneConference LinphoneConference;
|
||||
|
||||
/**
|
||||
* Function returning a human readable value for LinphoneStreamType.
|
||||
* @ingroup initializing
|
||||
|
|
@ -3445,7 +3451,7 @@ LINPHONE_PUBLIC bool_t linphone_core_video_capture_enabled(LinphoneCore *lc);
|
|||
LINPHONE_PUBLIC bool_t linphone_core_video_display_enabled(LinphoneCore *lc);
|
||||
|
||||
LINPHONE_PUBLIC void linphone_core_set_video_policy(LinphoneCore *lc, const LinphoneVideoPolicy *policy);
|
||||
LINPHONE_PUBLIC const LinphoneVideoPolicy *linphone_core_get_video_policy(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC const LinphoneVideoPolicy *linphone_core_get_video_policy(const LinphoneCore *lc);
|
||||
|
||||
typedef struct MSVideoSizeDef{
|
||||
MSVideoSize vsize;
|
||||
|
|
@ -3830,6 +3836,14 @@ LINPHONE_PUBLIC LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCor
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a conference
|
||||
* @param lc The #LinphoneCore instance where the conference will be created inside.
|
||||
* @param params Parameters of the conference. See #LinphoneConferenceParms.
|
||||
* @return A pointer on the freshly created conference. That object will be automatically
|
||||
* freed by the core after calling linphone_core_terminate_conference().
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneConference *linphone_core_create_conference_with_params(LinphoneCore *lc, const LinphoneConferenceParams *params);
|
||||
/**
|
||||
* Add a participant to the conference. If no conference is going on
|
||||
* a new internal conference context is created and the participant is
|
||||
|
|
@ -3838,7 +3852,7 @@ LINPHONE_PUBLIC LinphoneCall* linphone_core_find_call_from_uri(const LinphoneCor
|
|||
* @param call The current call with the participant to add
|
||||
* @return 0 if succeeded. Negative number if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
/**
|
||||
* Add all current calls into the conference. If no conference is running
|
||||
* a new internal conference context is created and all current calls
|
||||
|
|
@ -3846,7 +3860,7 @@ LINPHONE_PUBLIC int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCa
|
|||
* @param lc #LinphoneCore
|
||||
* @return 0 if succeeded. Negative number if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc);
|
||||
/**
|
||||
* Remove a call from the conference.
|
||||
* @param lc the linphone core
|
||||
|
|
@ -3862,7 +3876,7 @@ LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc);
|
|||
*
|
||||
* @return 0 if successful, -1 otherwise.
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
|
||||
/**
|
||||
* Indicates whether the local participant is part of a conference.
|
||||
* @warning That function automatically fails in the case of conferences using a
|
||||
|
|
@ -3871,25 +3885,25 @@ LINPHONE_PUBLIC int linphone_core_add_all_to_conference(LinphoneCore *lc);
|
|||
* @param lc the linphone core
|
||||
* @return TRUE if the local participant is in a conference, FALSE otherwise.
|
||||
*/
|
||||
LINPHONE_PUBLIC bool_t linphone_core_is_in_conference(const LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC bool_t linphone_core_is_in_conference(const LinphoneCore *lc);
|
||||
/**
|
||||
* Join the local participant to the running conference
|
||||
* @param lc #LinphoneCore
|
||||
* @return 0 if succeeded. Negative number if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_enter_conference(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_enter_conference(LinphoneCore *lc);
|
||||
/**
|
||||
* Make the local participant leave the running conference
|
||||
* @param lc #LinphoneCore
|
||||
* @return 0 if succeeded. Negative number if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_leave_conference(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_leave_conference(LinphoneCore *lc);
|
||||
/**
|
||||
* Get the set input volume of the local participant
|
||||
* @param lc #LinphoneCore
|
||||
* @return A value inside [0.0 ; 1.0]
|
||||
*/
|
||||
LINPHONE_PUBLIC float linphone_core_get_conference_local_input_volume(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC float linphone_core_get_conference_local_input_volume(LinphoneCore *lc);
|
||||
/**
|
||||
* Terminate the running conference. If it is a local conference, all calls
|
||||
* inside it will become back separate calls and will be put in #LinphoneCallPaused state.
|
||||
|
|
@ -3898,14 +3912,14 @@ LINPHONE_PUBLIC float linphone_core_get_conference_local_input_volume(LinphoneCo
|
|||
* @param lc #LinphoneCore
|
||||
* @return 0 if succeeded. Negative number if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_terminate_conference(LinphoneCore *lc);
|
||||
/**
|
||||
* Get the number of participant in the running conference. The local
|
||||
* participant is included in the count only if it is in the conference.
|
||||
* @param lc #LinphoneCore
|
||||
* @return The number of participant
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc);
|
||||
LINPHONE_PUBLIC int linphone_core_get_conference_size(LinphoneCore *lc);
|
||||
/**
|
||||
* Start recording the running conference
|
||||
* @param lc #LinphoneCore
|
||||
|
|
@ -3925,21 +3939,7 @@ LINPHONE_PUBLIC int linphone_core_stop_conference_recording(LinphoneCore *lc);
|
|||
* @return A pointer on #LinphoneConference or NULL if no conference are going on
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneConference *linphone_core_get_conference(LinphoneCore *lc);
|
||||
/**
|
||||
* Get URIs of all participants of one conference
|
||||
* The returned MSList contains URIs of all participant. That list must be
|
||||
* freed after use and each URI must be unref with linphone_address_unref()
|
||||
* @param obj A #LinphoneConference
|
||||
* @return \mslist{LinphoneAddress}
|
||||
*/
|
||||
LINPHONE_PUBLIC MSList *linphone_conference_get_participants(const LinphoneConference *obj);
|
||||
/**
|
||||
* Remove a participant from a conference
|
||||
* @param obj A #LinphoneConference
|
||||
* @param uri SIP URI of the participant to remove
|
||||
* @return 0 if succeeded, -1 if failed
|
||||
*/
|
||||
LINPHONE_PUBLIC int linphone_conference_remove_participant(LinphoneConference *obj, const LinphoneAddress *uri);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -2808,6 +2808,10 @@ extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEn
|
|||
return (jint)((LinphoneCallLog*)ptr)->duration;
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCallLogImpl_wasConference(JNIEnv *env, jobject thiz, jlong ptr) {
|
||||
return linphone_call_log_was_conference((LinphoneCallLog *)ptr);
|
||||
}
|
||||
|
||||
/* CallStats */
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCallStatsImpl_getMediaType(JNIEnv *env, jobject thiz, jlong stats_ptr) {
|
||||
return (jint)((LinphoneCallStats *)stats_ptr)->type;
|
||||
|
|
@ -4350,6 +4354,21 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv
|
|||
return (jint)linphone_core_get_conference_size((LinphoneCore *) pCore);
|
||||
}
|
||||
|
||||
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_createConference(JNIEnv *env, jobject thiz, jlong corePtr, jobject jparams) {
|
||||
jclass params_class = env->FindClass("org/linphone/core/LinphoneConferenceParamsImpl");
|
||||
jclass conference_class = env->FindClass("org/linphone/core/LinphoneConferenceImpl");
|
||||
jfieldID params_native_ptr_attr = env->GetFieldID(params_class, "nativePtr", "J");
|
||||
jmethodID conference_constructor = env->GetMethodID(conference_class, "<init>", "(J)V");
|
||||
LinphoneConferenceParams *params = NULL;
|
||||
LinphoneConference *conference;
|
||||
jobject jconference;
|
||||
|
||||
if(jparams) params = (LinphoneConferenceParams *)env->GetLongField(params_class, params_native_ptr_attr);
|
||||
conference = linphone_core_create_conference_with_params((LinphoneCore *)corePtr, params);
|
||||
if(conference) return env->NewObject(conference_class, conference_constructor, (jlong)conference);
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_getConference(JNIEnv *env, jobject thiz, jlong pCore) {
|
||||
jclass conference_class = env->FindClass("org/linphone/core/LinphoneConferenceImpl");
|
||||
jmethodID conference_constructor = env->GetMethodID(conference_class, "<init>", "(J)V");
|
||||
|
|
@ -6781,6 +6800,32 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getNortpTimeout(J
|
|||
|
||||
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneConferenceParamsImpl_createInstance(JNIEnv *env, jobject thiz, jobject jcore) {
|
||||
jclass core_class = env->FindClass("org/linphone/core/LinphoneCoreImpl");
|
||||
jfieldID native_ptr_attr = env->GetFieldID(core_class, "nativePtr", "J");
|
||||
LinphoneCore *core = NULL;
|
||||
if(jcore) core = (LinphoneCore *)env->GetLongField(jcore, native_ptr_attr);
|
||||
return (jlong)linphone_conference_params_new(core);
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneConferenceParamsImpl_copyInstance(JNIEnv *env, jobject thiz, jlong paramsPtr) {
|
||||
return (jlong)linphone_conference_params_clone((LinphoneConferenceParams *)paramsPtr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneConferenceParamsImpl_destroyInstance(JNIEnv *env, jobject thiz, jlong paramsPtr) {
|
||||
linphone_conference_params_free((LinphoneConferenceParams *)paramsPtr);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneConferenceParamsImpl_enableVideo(JNIEnv *env, jobject thiz, jlong paramsPtr, jboolean enable) {
|
||||
linphone_conference_params_enable_video((LinphoneConferenceParams *)paramsPtr, enable);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneConferenceParamsImpl_isVideoEnabled(JNIEnv *env, jobject thiz, jlong paramsPtr) {
|
||||
return linphone_conference_params_video_requested((LinphoneConferenceParams *)paramsPtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern "C" jobjectArray Java_org_linphone_core_LinphoneConferenceImpl_getParticipants(JNIEnv *env, jobject thiz, jlong pconference) {
|
||||
MSList *participants, *it;
|
||||
jclass addr_class = env->FindClass("org/linphone/core/LinphoneAddressImpl");
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDes
|
|||
linphone_core_update_ice_state_in_call_stats(call);
|
||||
}
|
||||
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session) {
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session, bool_t use_nortpproxy) {
|
||||
const char *rtp_addr, *rtcp_addr;
|
||||
IceSessionState session_state = ice_session_state(session);
|
||||
int nb_candidates;
|
||||
|
|
@ -814,7 +814,7 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
bool_t result;
|
||||
|
||||
if (session_state == IS_Completed) {
|
||||
desc->ice_completed = TRUE;
|
||||
if (use_nortpproxy) desc->set_nortpproxy = TRUE;
|
||||
result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL);
|
||||
if (result == TRUE) {
|
||||
strncpy(desc->addr, rtp_addr, sizeof(desc->addr));
|
||||
|
|
@ -823,7 +823,7 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
}
|
||||
}
|
||||
else {
|
||||
desc->ice_completed = FALSE;
|
||||
desc->set_nortpproxy = FALSE;
|
||||
}
|
||||
strncpy(desc->ice_pwd, ice_session_local_pwd(session), sizeof(desc->ice_pwd));
|
||||
strncpy(desc->ice_ufrag, ice_session_local_ufrag(session), sizeof(desc->ice_ufrag));
|
||||
|
|
@ -833,10 +833,10 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
nb_candidates = 0;
|
||||
if (!sal_stream_description_active(stream) || (cl == NULL)) continue;
|
||||
if (ice_check_list_state(cl) == ICL_Completed) {
|
||||
stream->ice_completed = TRUE;
|
||||
if (use_nortpproxy) stream->set_nortpproxy = TRUE;
|
||||
result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
|
||||
} else {
|
||||
stream->ice_completed = FALSE;
|
||||
stream->set_nortpproxy = FALSE;
|
||||
result = ice_check_list_default_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
|
||||
}
|
||||
if (result == TRUE) {
|
||||
|
|
@ -1178,6 +1178,16 @@ static int get_local_ip_with_getifaddrs(int type, char *address, int size){
|
|||
}
|
||||
#endif
|
||||
|
||||
static const char *ai_family_to_string(int af){
|
||||
switch(af){
|
||||
case AF_INET: return "AF_INET";
|
||||
case AF_INET6: return "AF_INET6";
|
||||
case AF_UNSPEC: return "AF_UNSPEC";
|
||||
default:
|
||||
return "invalid address family";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
static int get_local_ip_for_with_connect(int type, const char *dest, char *result){
|
||||
int err,tmp;
|
||||
|
|
@ -1202,13 +1212,18 @@ static int get_local_ip_for_with_connect(int type, const char *dest, char *resul
|
|||
return -1;
|
||||
}
|
||||
sock=socket(res->ai_family,SOCK_DGRAM,0);
|
||||
if (sock == (ortp_socket_t)-1){
|
||||
ms_error("get_local_ip_for_with_connect() could not create [%s] socket: %s",
|
||||
ai_family_to_string(res->ai_family), getSocketError());
|
||||
return -1;
|
||||
}
|
||||
tmp=1;
|
||||
err=setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(SOCKET_OPTION_VALUE)&tmp,sizeof(int));
|
||||
if (err<0){
|
||||
if (err == -1){
|
||||
ms_warning("Error in setsockopt: %s",strerror(errno));
|
||||
}
|
||||
err=connect(sock,res->ai_addr,(int)res->ai_addrlen);
|
||||
if (err<0) {
|
||||
if (err == -1) {
|
||||
/*the network isn't reachable*/
|
||||
if (getSocketErrorCode()!=ENETUNREACH) ms_error("Error in connect: %s",strerror(errno));
|
||||
freeaddrinfo(res);
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ static void initiate_incoming(const SalStreamDescription *local_cap,
|
|||
strcpy(result->ice_pwd, local_cap->ice_pwd);
|
||||
strcpy(result->ice_ufrag, local_cap->ice_ufrag);
|
||||
result->ice_mismatch = local_cap->ice_mismatch;
|
||||
result->ice_completed = local_cap->ice_completed;
|
||||
result->set_nortpproxy = local_cap->set_nortpproxy;
|
||||
memcpy(result->ice_candidates, local_cap->ice_candidates, sizeof(result->ice_candidates));
|
||||
memcpy(result->ice_remote_candidates, local_cap->ice_remote_candidates, sizeof(result->ice_remote_candidates));
|
||||
strcpy(result->name,local_cap->name);
|
||||
|
|
@ -603,7 +603,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
strcpy(result->ice_pwd, local_capabilities->ice_pwd);
|
||||
strcpy(result->ice_ufrag, local_capabilities->ice_ufrag);
|
||||
result->ice_lite = local_capabilities->ice_lite;
|
||||
result->ice_completed = local_capabilities->ice_completed;
|
||||
result->set_nortpproxy = local_capabilities->set_nortpproxy;
|
||||
result->custom_sdp_attributes = sal_custom_sdp_attribute_clone(local_capabilities->custom_sdp_attributes);
|
||||
|
||||
strcpy(result->name,local_capabilities->name);
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ struct _LinphoneCallParams{
|
|||
bool_t video_multicast_enabled;
|
||||
bool_t audio_multicast_enabled;
|
||||
bool_t realtimetext_enabled;
|
||||
bool_t update_call_when_ice_completed;
|
||||
bool_t encryption_mandatory;
|
||||
};
|
||||
|
||||
BELLE_SIP_DECLARE_VPTR(LinphoneCallParams);
|
||||
|
|
@ -195,6 +197,7 @@ struct _LinphoneCallLog{
|
|||
char* call_id; /**unique id of a call*/
|
||||
struct _LinphoneQualityReporting reporting;
|
||||
bool_t video_enabled;
|
||||
bool_t was_conference; /**<That call was a call with a conference server */
|
||||
unsigned int storage_id;
|
||||
};
|
||||
|
||||
|
|
@ -493,7 +496,7 @@ int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call);
|
|||
void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call);
|
||||
void linphone_call_stats_fill(LinphoneCallStats *stats, MediaStream *ms, OrtpEvent *ev);
|
||||
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDescription *result);
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session);
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session, bool_t use_nortpproxy);
|
||||
void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call);
|
||||
void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md);
|
||||
void linphone_call_clear_unused_ice_candidates(LinphoneCall *call, const SalMediaDescription *md);
|
||||
|
|
|
|||
|
|
@ -613,7 +613,9 @@ void __sal_op_set_network_origin(SalOp *op, const char *origin){
|
|||
}
|
||||
|
||||
void __sal_op_set_remote_contact(SalOp *op, const char* remote_contact){
|
||||
SET_PARAM(op,remote_contact);
|
||||
assign_address(&((SalOpBase*)op)->remote_contact_address,remote_contact);\
|
||||
/*to preserve header params*/
|
||||
assign_string(&((SalOpBase*)op)->remote_contact,remote_contact); \
|
||||
}
|
||||
|
||||
void __sal_op_set_network_origin_address(SalOp *op, SalAddress *origin){
|
||||
|
|
|
|||
|
|
@ -635,6 +635,8 @@ static gboolean linphone_gtk_in_call_view_refresh(LinphoneCall *call){
|
|||
}
|
||||
rating_to_color(rating,&color);
|
||||
gtk_widget_modify_bg(qi,GTK_STATE_NORMAL,&color);
|
||||
|
||||
linphone_gtk_update_video_button(call); /*in case of no ice re-invite, video button status shall be checked by polling*/
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1285,19 +1285,21 @@ static void linphone_gtk_media_encryption_changed(GtkWidget *combo){
|
|||
char *selected=gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
GtkWidget *toplevel=gtk_widget_get_toplevel(combo);
|
||||
GtkWidget *mandatory_box = linphone_gtk_get_widget(toplevel,"media_encryption_mandatory");
|
||||
if (selected!=NULL){
|
||||
if (strcasecmp(selected,"SRTP")==0){
|
||||
linphone_core_set_media_encryption(lc,LinphoneMediaEncryptionSRTP);
|
||||
linphone_gtk_set_media_encryption_mandatory_sensitive(toplevel,TRUE);
|
||||
gtk_widget_set_sensitive(mandatory_box,TRUE);
|
||||
}else if (strcasecmp(selected,"DTLS")==0){
|
||||
linphone_core_set_media_encryption(lc,LinphoneMediaEncryptionDTLS);
|
||||
linphone_gtk_set_media_encryption_mandatory_sensitive(toplevel,FALSE);
|
||||
gtk_widget_set_sensitive(mandatory_box,FALSE);
|
||||
}else if (strcasecmp(selected,"ZRTP")==0){
|
||||
linphone_core_set_media_encryption(lc,LinphoneMediaEncryptionZRTP);
|
||||
linphone_gtk_set_media_encryption_mandatory_sensitive(toplevel,FALSE);
|
||||
gtk_widget_set_sensitive(mandatory_box,FALSE);
|
||||
} else {
|
||||
linphone_core_set_media_encryption(lc,LinphoneMediaEncryptionNone);
|
||||
linphone_gtk_set_media_encryption_mandatory_sensitive(toplevel,FALSE);
|
||||
gtk_widget_set_sensitive(mandatory_box,FALSE);
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mandatory_box), FALSE);
|
||||
}
|
||||
g_free(selected);
|
||||
}else g_warning("gtk_combo_box_get_active_text() returned NULL");
|
||||
|
|
|
|||
|
|
@ -246,8 +246,8 @@ typedef struct SalStreamDescription{
|
|||
SalSrtpCryptoAlgo crypto[SAL_CRYPTO_ALGO_MAX];
|
||||
unsigned int crypto_local_tag;
|
||||
int max_rate;
|
||||
bool_t implicit_rtcp_fb;
|
||||
OrtpRtcpFbConfiguration rtcp_fb;
|
||||
bool_t implicit_rtcp_fb;
|
||||
OrtpRtcpFbConfiguration rtcp_fb;
|
||||
OrtpRtcpXrConfiguration rtcp_xr;
|
||||
SalCustomSdpAttribute *custom_sdp_attributes;
|
||||
SalIceCandidate ice_candidates[SAL_MEDIA_DESCRIPTION_MAX_ICE_CANDIDATES];
|
||||
|
|
@ -255,7 +255,7 @@ typedef struct SalStreamDescription{
|
|||
char ice_ufrag[SAL_MEDIA_DESCRIPTION_MAX_ICE_UFRAG_LEN];
|
||||
char ice_pwd[SAL_MEDIA_DESCRIPTION_MAX_ICE_PWD_LEN];
|
||||
bool_t ice_mismatch;
|
||||
bool_t ice_completed;
|
||||
bool_t set_nortpproxy; /*Formely set by ICE to indicate to the proxy that it has nothing to do*/
|
||||
bool_t rtcp_mux;
|
||||
bool_t pad[1];
|
||||
char dtls_fingerprint[256];
|
||||
|
|
@ -285,7 +285,7 @@ typedef struct SalMediaDescription{
|
|||
char ice_ufrag[SAL_MEDIA_DESCRIPTION_MAX_ICE_UFRAG_LEN];
|
||||
char ice_pwd[SAL_MEDIA_DESCRIPTION_MAX_ICE_PWD_LEN];
|
||||
bool_t ice_lite;
|
||||
bool_t ice_completed;
|
||||
bool_t set_nortpproxy;
|
||||
bool_t pad[2];
|
||||
} SalMediaDescription;
|
||||
|
||||
|
|
@ -657,7 +657,9 @@ const SalAddress *sal_op_get_contact_address(const SalOp *op);
|
|||
const char *sal_op_get_route(const SalOp *op);
|
||||
const MSList* sal_op_get_route_addresses(const SalOp *op);
|
||||
const char *sal_op_get_proxy(const SalOp *op);
|
||||
/*raw contact header value with header params*/
|
||||
const char *sal_op_get_remote_contact(const SalOp *op);
|
||||
/*contact header address only (I.E without header params*/
|
||||
const SalAddress* sal_op_get_remote_contact_address(const SalOp *op);
|
||||
/*for incoming requests, returns the origin of the packet as a sip uri*/
|
||||
const char *sal_op_get_network_origin(const SalOp *op);
|
||||
|
|
|
|||
|
|
@ -121,4 +121,9 @@ public interface LinphoneCallLog {
|
|||
* @return the SIP call-id.
|
||||
*/
|
||||
public String getCallId();
|
||||
/**
|
||||
* Tells whether the call was a call to a conference server
|
||||
* @return true if the call was a call to a conference server
|
||||
*/
|
||||
public boolean wasConference();
|
||||
}
|
||||
|
|
|
|||
25
java/common/org/linphone/core/LinphoneConferenceParams.java
Normal file
25
java/common/org/linphone/core/LinphoneConferenceParams.java
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
LinphoneConferenceParams.java
|
||||
Copyright (C) 2015 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.linphone.core;
|
||||
|
||||
public interface LinphoneConferenceParams {
|
||||
public void enableVideo(boolean enable);
|
||||
public boolean isVideoRequested();
|
||||
}
|
||||
|
|
@ -1348,6 +1348,19 @@ public interface LinphoneCore {
|
|||
void setZrtpSecretsCache(String file);
|
||||
void enableEchoLimiter(boolean val);
|
||||
|
||||
/**
|
||||
* Create a conference
|
||||
* @param params Parameters of the conference. Can be null
|
||||
* @return The new conference or null if the creation has failed
|
||||
*/
|
||||
LinphoneConference createConference(LinphoneConferenceParams params);
|
||||
/**
|
||||
* Return the value of the C pointer on the conference instance.
|
||||
*
|
||||
* That function can be used to test whether a conference is running.
|
||||
* @return A positive value if a conference is running, 0 if not.
|
||||
**/
|
||||
LinphoneConference getConference();
|
||||
/**
|
||||
* Indicates whether the local user is part of the conference.
|
||||
**/
|
||||
|
|
@ -1368,7 +1381,6 @@ public interface LinphoneCore {
|
|||
* When the local participant is out of the conference, the remote participants can continue to talk normally.
|
||||
**/
|
||||
void leaveConference();
|
||||
|
||||
/**
|
||||
* Merge a call into a conference.
|
||||
*
|
||||
|
|
@ -1417,13 +1429,6 @@ public interface LinphoneCore {
|
|||
* @returns the number of participants to the conference
|
||||
**/
|
||||
int getConferenceSize();
|
||||
/**
|
||||
* Return the value of the C pointer on the conference instance.
|
||||
*
|
||||
* That function can be used to test whether a conference is running.
|
||||
* @return A positive value if a conference is running, 0 if not.
|
||||
**/
|
||||
LinphoneConference getConference();
|
||||
|
||||
/**
|
||||
* Request recording of the conference into a supplied file path.
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
|
|||
private native int getCallDuration(long nativePtr);
|
||||
private native String getCallId(long nativePtr);
|
||||
private native long getTimestamp(long nativePtr);
|
||||
private native boolean wasConference(long nativePtr);
|
||||
|
||||
LinphoneCallLogImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
|
|
@ -69,4 +70,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
|
|||
public long getTimestamp() {
|
||||
return getTimestamp(nativePtr) * 1000; // Need milliseconds, not seconds
|
||||
}
|
||||
public boolean wasConference() {
|
||||
return wasConference(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
LinphoneConferenceParamsImpl.java
|
||||
Copyright (C) 2015 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
package org.linphone.core;
|
||||
|
||||
public class LinphoneConferenceParamsImpl implements LinphoneConferenceParams {
|
||||
private long nativePtr = 0;
|
||||
|
||||
private native long createInstance(LinphoneCoreImpl core);
|
||||
public LinphoneConferenceParamsImpl(LinphoneCore core) {
|
||||
this.nativePtr = createInstance((LinphoneCoreImpl)core);
|
||||
}
|
||||
|
||||
private native long copyInstance(long paramsPtr);
|
||||
public LinphoneConferenceParamsImpl(LinphoneConferenceParamsImpl params) {
|
||||
nativePtr = copyInstance(params.nativePtr);
|
||||
}
|
||||
|
||||
private native void destroyInstance(long nativePtr);
|
||||
public void finalize() {
|
||||
destroyInstance(this.nativePtr);
|
||||
}
|
||||
|
||||
private native void enableVideo(long paramsPtr, boolean enable);
|
||||
@Override
|
||||
public void enableVideo(boolean enable) {
|
||||
enableVideo(this.nativePtr, enable);
|
||||
}
|
||||
|
||||
private native boolean isVideoRequested(long paramsPtr);
|
||||
@Override
|
||||
public boolean isVideoRequested() {
|
||||
return isVideoRequested(this.nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
setNetworkStateReachable(nativePtr,isReachable);
|
||||
}
|
||||
public synchronized void setPlaybackGain(float gain) {
|
||||
setPlaybackGain(nativePtr,gain);
|
||||
setPlaybackGain(nativePtr, gain);
|
||||
|
||||
}
|
||||
public synchronized float getPlaybackGain() {
|
||||
|
|
@ -383,7 +383,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
|
||||
public synchronized boolean payloadTypeIsVbr(PayloadType pt) {
|
||||
isValid();
|
||||
return payloadTypeIsVbr(nativePtr, ((PayloadTypeImpl)pt).nativePtr);
|
||||
return payloadTypeIsVbr(nativePtr, ((PayloadTypeImpl) pt).nativePtr);
|
||||
}
|
||||
|
||||
public synchronized void enableEchoCancellation(boolean enable) {
|
||||
|
|
@ -450,7 +450,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
|
||||
public synchronized void addFriend(LinphoneFriend lf) throws LinphoneCoreException {
|
||||
addFriend(nativePtr,((LinphoneFriendImpl)lf).nativePtr);
|
||||
addFriend(nativePtr, ((LinphoneFriendImpl) lf).nativePtr);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
return new LinphoneChatRoomImpl(getOrCreateChatRoom(nativePtr,to));
|
||||
}
|
||||
public synchronized LinphoneChatRoom getChatRoom(LinphoneAddress to) {
|
||||
return new LinphoneChatRoomImpl(getChatRoom(nativePtr,((LinphoneAddressImpl)to).nativePtr));
|
||||
return new LinphoneChatRoomImpl(getChatRoom(nativePtr, ((LinphoneAddressImpl) to).nativePtr));
|
||||
}
|
||||
public synchronized void setPreviewWindow(Object w) {
|
||||
setPreviewWindowId(nativePtr,w);
|
||||
|
|
@ -498,7 +498,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
|
||||
public synchronized void enableVideo(boolean vcap_enabled, boolean display_enabled) {
|
||||
enableVideo(nativePtr,vcap_enabled, display_enabled);
|
||||
enableVideo(nativePtr, vcap_enabled, display_enabled);
|
||||
}
|
||||
public synchronized boolean isVideoEnabled() {
|
||||
return isVideoEnabled(nativePtr);
|
||||
|
|
@ -516,7 +516,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
setFirewallPolicy(nativePtr,pol.value());
|
||||
}
|
||||
public synchronized void setStunServer(String stunServer) {
|
||||
setStunServer(nativePtr,stunServer);
|
||||
setStunServer(nativePtr, stunServer);
|
||||
}
|
||||
|
||||
public synchronized LinphoneCall inviteAddressWithParams(LinphoneAddress to, LinphoneCallParams params) throws LinphoneCoreException {
|
||||
|
|
@ -656,7 +656,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
|
||||
public synchronized void enableIpv6(boolean enable) {
|
||||
enableIpv6(nativePtr,enable);
|
||||
enableIpv6(nativePtr, enable);
|
||||
}
|
||||
public synchronized boolean isIpv6Enabled() {
|
||||
return isIpv6Enabled(nativePtr);
|
||||
|
|
@ -679,14 +679,14 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
|
||||
}
|
||||
public synchronized void setUploadPtime(int ptime) {
|
||||
setUploadPtime(nativePtr,ptime);
|
||||
setUploadPtime(nativePtr, ptime);
|
||||
}
|
||||
|
||||
public synchronized void setZrtpSecretsCache(String file) {
|
||||
setZrtpSecretsCache(nativePtr,file);
|
||||
setZrtpSecretsCache(nativePtr, file);
|
||||
}
|
||||
public synchronized void enableEchoLimiter(boolean val) {
|
||||
enableEchoLimiter(nativePtr,val);
|
||||
enableEchoLimiter(nativePtr, val);
|
||||
}
|
||||
public synchronized void setVideoDevice(int id) {
|
||||
Log.i("Setting camera id :", id);
|
||||
|
|
@ -722,6 +722,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public synchronized int getConferenceSize() {
|
||||
return getConferenceSize(nativePtr);
|
||||
}
|
||||
private native LinphoneConference createConference(long corePtr, LinphoneConferenceParams params);
|
||||
public synchronized LinphoneConference createConference(LinphoneConferenceParams params) {
|
||||
return createConference(this.nativePtr, params);
|
||||
}
|
||||
private native LinphoneConference getConference(long nativePtr);
|
||||
public synchronized LinphoneConference getConference() {
|
||||
return getConference(nativePtr);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 66ad948e85e77f1d92545bb5e12823cd5a489d6a
|
||||
Subproject commit b6f83b3d7048caf6660c7a163f74e0df89abf8ca
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 3c0e10e3a4ec3e6b69820f890012db8fe3cba6f7
|
||||
Subproject commit 3ac1cac8859d4774ee993a1da6f0058e59a31ef4
|
||||
|
|
@ -321,10 +321,25 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
|||
&& linphone_core_get_firewall_policy(callee_mgr->lc) == LinphonePolicyUseIce
|
||||
&& !linphone_core_sdp_200_ack_enabled(caller_mgr->lc) /*ice does not work with sdp less invite*/
|
||||
&& lp_config_get_int(callee_mgr->lc->config, "sip", "update_call_when_ice_completed", TRUE)
|
||||
&& lp_config_get_int(caller_mgr->lc->config, "sip", "update_call_when_ice_completed", TRUE)) {
|
||||
&& lp_config_get_int(caller_mgr->lc->config, "sip", "update_call_when_ice_completed", TRUE)
|
||||
&& linphone_core_get_media_encryption(caller_mgr->lc) != LinphoneMediaEncryptionDTLS /*no ice-reinvite with DTLS*/) {
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&caller_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_caller.number_of_LinphoneCallStreamsRunning+2));
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&callee_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_callee.number_of_LinphoneCallStreamsRunning+2));
|
||||
|
||||
} else if (linphone_core_get_firewall_policy(caller_mgr->lc) == LinphonePolicyUseIce) {
|
||||
/* check no ice re-invite received*/
|
||||
BC_ASSERT_FALSE(wait_for_until(callee_mgr->lc,caller_mgr->lc,&caller_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_caller.number_of_LinphoneCallStreamsRunning+2,2000));
|
||||
BC_ASSERT_FALSE(wait_for_until(callee_mgr->lc,caller_mgr->lc,&callee_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_callee.number_of_LinphoneCallStreamsRunning+2,2000));
|
||||
|
||||
}
|
||||
if (linphone_core_get_media_encryption(caller_mgr->lc) == LinphoneMediaEncryptionDTLS ) {
|
||||
if (linphone_core_get_current_call(caller_mgr->lc)->audiostream)
|
||||
BC_ASSERT_TRUE(ms_media_stream_sessions_get_encryption_mandatory(&linphone_core_get_current_call(caller_mgr->lc)->audiostream->ms.sessions));
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (linphone_core_get_current_call(caller_mgr->lc)->videostream && video_stream_started(linphone_core_get_current_call(caller_mgr->lc)->videostream))
|
||||
BC_ASSERT_TRUE(ms_media_stream_sessions_get_encryption_mandatory(&linphone_core_get_current_call(caller_mgr->lc)->videostream->ms.sessions));
|
||||
#endif
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -876,6 +876,7 @@ static void dos_module_trigger(void) {
|
|||
int i = 0;
|
||||
const char* passmsg = "This one should pass through";
|
||||
int number_of_messge_to_send = 100;
|
||||
LinphoneChatMessage * chat_msg = NULL;
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
|
||||
|
|
@ -887,7 +888,8 @@ static void dos_module_trigger(void) {
|
|||
do {
|
||||
char msg[128];
|
||||
sprintf(msg, "Flood message number %i", i);
|
||||
linphone_chat_room_send_message(chat_room, msg);
|
||||
chat_msg = linphone_chat_room_create_message(chat_room, msg);
|
||||
linphone_chat_room_send_chat_message(chat_room, chat_msg);
|
||||
ms_usleep(10000);
|
||||
i++;
|
||||
} while (i < number_of_messge_to_send);
|
||||
|
|
@ -898,8 +900,8 @@ static void dos_module_trigger(void) {
|
|||
|
||||
reset_counters(&marie->stat);
|
||||
reset_counters(&pauline->stat);
|
||||
|
||||
linphone_chat_room_send_message(chat_room, passmsg);
|
||||
chat_msg = linphone_chat_room_create_message(chat_room, passmsg);
|
||||
linphone_chat_room_send_chat_message(chat_room, chat_msg);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageReceived, 1));
|
||||
BC_ASSERT_EQUAL(marie->stat.number_of_LinphoneMessageReceived, 1, int, "%d");
|
||||
if (marie->stat.last_received_chat_message) {
|
||||
|
|
@ -909,8 +911,9 @@ static void dos_module_trigger(void) {
|
|||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
||||
|
||||
#define USE_PRESENCE_SERVER 0
|
||||
static void test_subscribe_notify_with_sipp_publisher(void) {
|
||||
#if USE_PRESENCE_SERVER
|
||||
char *scen;
|
||||
FILE * sipp_out;
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
|
@ -943,8 +946,10 @@ static void test_subscribe_notify_with_sipp_publisher(void) {
|
|||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
#endif
|
||||
}
|
||||
static void test_subscribe_notify_with_sipp_publisher_double_publish(void) {
|
||||
#if USE_PRESENCE_SERVER
|
||||
char *scen;
|
||||
FILE * sipp_out;
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
|
@ -977,6 +982,7 @@ static void test_subscribe_notify_with_sipp_publisher_double_publish(void) {
|
|||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void test_publish_unpublish(void) {
|
||||
|
|
@ -1035,6 +1041,7 @@ static void test_list_subscribe (void) {
|
|||
linphone_event_add_custom_header(lev,"Supported","eventlist");
|
||||
linphone_event_add_custom_header(lev,"Accept","application/pidf+xml, application/rlmi+xml");
|
||||
linphone_event_add_custom_header(lev,"Content-Disposition", "recipient-list");
|
||||
linphone_event_add_custom_header(lev,"Require", "recipient-list-subscribe");
|
||||
|
||||
linphone_event_send_subscribe(lev,content);
|
||||
|
||||
|
|
|
|||
|
|
@ -1394,7 +1394,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
LinphoneChatRoom *marie_chat_room = linphone_call_get_chat_room(marie_call);
|
||||
|
||||
for (i = 0; i < strlen(message); i++) {
|
||||
linphone_chat_message_put_char(rtt_message, message[i]);
|
||||
BC_ASSERT_FALSE(linphone_chat_message_put_char(rtt_message, message[i]));
|
||||
BC_ASSERT_TRUE(wait_for_until(pauline->lc, marie->lc, &marie->stat.number_of_LinphoneIsComposingActiveReceived, i+1, 1000));
|
||||
BC_ASSERT_EQUAL(linphone_chat_room_get_char(marie_chat_room), message[i], char, "%c");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,9 +262,7 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
|
|||
BC_ASSERT_PTR_NOT_NULL(conference = linphone_core_get_conference(marie->lc));
|
||||
if(conference) {
|
||||
MSList *participants = linphone_conference_get_participants(conference);
|
||||
BC_ASSERT_EQUAL(linphone_conference_get_size(conference), linphone_core_get_conference_size(marie->lc), int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_conference_get_size(conference), ms_list_size(participants)+(linphone_conference_is_in(conference)?1:0), int, "%d");
|
||||
BC_ASSERT_TRUE(linphone_conference_is_in(conference));
|
||||
BC_ASSERT_EQUAL(ms_list_size(participants), 2, int, "%d");
|
||||
ms_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue