Commit 3d7bbb5b authored by Simon Morlat's avatar Simon Morlat
Browse files

remove linphone_core_create_default_call_parameters() because this function is...

remove linphone_core_create_default_call_parameters() because this function is dangerous and error prone.
Indeed, it cannot guarantee that the created call params are compatible with the call being accepted or updated.
For doing an outgoing call there is no problem in using it but linphone_core_create_call_params() is better and hard to mis-use.
parent 933a75d8
...@@ -564,7 +564,7 @@ lpc_cmd_call(LinphoneCore *lc, char *args) ...@@ -564,7 +564,7 @@ lpc_cmd_call(LinphoneCore *lc, char *args)
} }
{ {
LinphoneCall *call; LinphoneCall *call;
LinphoneCallParams *cp=linphone_core_create_default_call_parameters (lc); LinphoneCallParams *cp=linphone_core_create_call_params (lc, NULL);
char *opt1,*opt2; char *opt1,*opt2;
if ( linphone_core_in_call(lc) ) if ( linphone_core_in_call(lc) )
{ {
......
...@@ -359,7 +359,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L ...@@ -359,7 +359,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
if ( auto_answer) { if ( auto_answer) {
answer_call=TRUE; answer_call=TRUE;
} else if (real_early_media_sending) { } else if (real_early_media_sending) {
LinphoneCallParams* callparams = linphone_core_create_default_call_parameters(lc); LinphoneCallParams* callparams = linphone_core_create_call_params(lc, call);
linphonec_out("Sending early media using real hardware\n"); linphonec_out("Sending early media using real hardware\n");
linphone_call_params_enable_early_media_sending(callparams, TRUE); linphone_call_params_enable_early_media_sending(callparams, TRUE);
if (vcap_enabled) linphone_call_params_enable_video(callparams, TRUE); if (vcap_enabled) linphone_call_params_enable_video(callparams, TRUE);
......
...@@ -709,7 +709,7 @@ static void call_updating(SalOp *op, bool_t is_update){ ...@@ -709,7 +709,7 @@ static void call_updating(SalOp *op, bool_t is_update){
if (call->state!=LinphoneCallPaused){ if (call->state!=LinphoneCallPaused){
/*Refresh the local description, but in paused state, we don't change anything.*/ /*Refresh the local description, but in paused state, we don't change anything.*/
if (rmd == NULL && lp_config_get_int(call->core->config,"sip","sdp_200_ack_follow_video_policy",0)) { if (rmd == NULL && lp_config_get_int(call->core->config,"sip","sdp_200_ack_follow_video_policy",0)) {
LinphoneCallParams *p=linphone_core_create_default_call_parameters (lc); LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
ms_message("Applying default policy for offering SDP on call [%p]",call); ms_message("Applying default policy for offering SDP on call [%p]",call);
linphone_call_set_new_params(call, p); linphone_call_set_new_params(call, p);
linphone_call_params_destroy(p); linphone_call_params_destroy(p);
......
...@@ -77,7 +77,7 @@ int main(int argc, char *argv[]){ ...@@ -77,7 +77,7 @@ int main(int argc, char *argv[]){
/* /*
Place an outgoing call with rtt enabled Place an outgoing call with rtt enabled
*/ */
LinphoneCallParams *cp = linphone_core_create_default_call_parameters(lc); LinphoneCallParams *cp = linphone_core_create_call_params(lc, NULL);
linphone_call_params_enable_realtime_text(cp,TRUE); /*enable real time text*/ linphone_call_params_enable_realtime_text(cp,TRUE); /*enable real time text*/
call=linphone_core_invite_with_params(lc,dest,cp); call=linphone_core_invite_with_params(lc,dest,cp);
linphone_call_params_destroy(cp); linphone_call_params_destroy(cp);
......
...@@ -2746,7 +2746,7 @@ const char * linphone_core_get_route(LinphoneCore *lc){ ...@@ -2746,7 +2746,7 @@ const char * linphone_core_get_route(LinphoneCore *lc){
* @return a LinphoneCall corresponding to the new call that is attempted to the transfer destination. * @return a LinphoneCall corresponding to the new call that is attempted to the transfer destination.
**/ **/
LinphoneCall * linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){ LinphoneCall * linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
LinphoneCallParams *cp=params ? linphone_call_params_copy(params) : linphone_core_create_default_call_parameters(lc); LinphoneCallParams *cp=params ? linphone_call_params_copy(params) : linphone_core_create_call_params(lc, NULL);
LinphoneCall *newcall; LinphoneCall *newcall;
if (call->state!=LinphoneCallPaused){ if (call->state!=LinphoneCallPaused){
...@@ -2978,7 +2978,7 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, const Linph ...@@ -2978,7 +2978,7 @@ int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, const Linph
**/ **/
LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url){ LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url){
LinphoneCall *call; LinphoneCall *call;
LinphoneCallParams *p=linphone_core_create_default_call_parameters (lc); LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
p->has_video &= !!lc->video_policy.automatically_initiate; p->has_video &= !!lc->video_policy.automatically_initiate;
call=linphone_core_invite_with_params(lc,url,p); call=linphone_core_invite_with_params(lc,url,p);
linphone_call_params_destroy(p); linphone_call_params_destroy(p);
...@@ -3026,7 +3026,7 @@ LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *ur ...@@ -3026,7 +3026,7 @@ LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *ur
**/ **/
LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr){ LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddress *addr){
LinphoneCall *call; LinphoneCall *call;
LinphoneCallParams *p=linphone_core_create_default_call_parameters(lc); LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
p->has_video &= !!lc->video_policy.automatically_initiate; p->has_video &= !!lc->video_policy.automatically_initiate;
call=linphone_core_invite_address_with_params (lc,addr,p); call=linphone_core_invite_address_with_params (lc,addr,p);
linphone_call_params_destroy(p); linphone_call_params_destroy(p);
...@@ -6682,12 +6682,14 @@ LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc){ ...@@ -6682,12 +6682,14 @@ LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc){
return lc->state; return lc->state;
} }
LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc){
static LinphoneCallParams *_create_call_params(LinphoneCore *lc){
LinphoneCallParams *p=linphone_call_params_new(); LinphoneCallParams *p=linphone_call_params_new();
linphone_core_init_default_params(lc, p); linphone_core_init_default_params(lc, p);
return p; return p;
} }
/** /**
* Create a LinphoneCallParams suitable for linphone_core_invite_with_params(), linphone_core_accept_call_with_params(), linphone_core_accept_early_media_with_params(), * Create a LinphoneCallParams suitable for linphone_core_invite_with_params(), linphone_core_accept_call_with_params(), linphone_core_accept_early_media_with_params(),
* linphone_core_accept_call_update(). * linphone_core_accept_call_update().
...@@ -6698,7 +6700,7 @@ LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *l ...@@ -6698,7 +6700,7 @@ LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *l
* @ingroup call_control * @ingroup call_control
*/ */
LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call){ LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call){
if (!call) return linphone_core_create_default_call_parameters(lc); if (!call) return _create_call_params(lc);
return linphone_call_params_copy(call->params); return linphone_call_params_copy(call->params);
} }
......
...@@ -2446,14 +2446,6 @@ LINPHONE_PUBLIC int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *ca ...@@ -2446,14 +2446,6 @@ LINPHONE_PUBLIC int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *ca
LINPHONE_PUBLIC int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call); LINPHONE_PUBLIC int linphone_core_defer_call_update(LinphoneCore *lc, LinphoneCall *call);
LINPHONE_PUBLIC int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params); LINPHONE_PUBLIC int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params);
/**
* @ingroup media_parameters
* Get default call parameters reflecting current linphone core configuration
* @param lc LinphoneCore object
* @return LinphoneCallParams
* @deprecated use linphone_core_create_call_params()
*/
LINPHONE_PUBLIC LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *lc);
LINPHONE_PUBLIC LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call); LINPHONE_PUBLIC LinphoneCallParams *linphone_core_create_call_params(LinphoneCore *lc, LinphoneCall *call);
......
...@@ -881,7 +881,7 @@ static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){ ...@@ -881,7 +881,7 @@ static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
LinphoneAddress *addr=linphone_core_interpret_url(lc,entered); LinphoneAddress *addr=linphone_core_interpret_url(lc,entered);
if (addr!=NULL){ if (addr!=NULL){
LinphoneCallParams *params=linphone_core_create_default_call_parameters(lc); LinphoneCallParams *params=linphone_core_create_call_params(lc, NULL);
gchar *record_file=linphone_gtk_get_record_path(addr,FALSE); gchar *record_file=linphone_gtk_get_record_path(addr,FALSE);
linphone_call_params_set_record_file(params,record_file); linphone_call_params_set_record_file(params,record_file);
linphone_core_invite_address_with_params(lc,addr,params); linphone_core_invite_address_with_params(lc,addr,params);
......
...@@ -1179,7 +1179,7 @@ static void call_with_custom_headers(void) { ...@@ -1179,7 +1179,7 @@ static void call_with_custom_headers(void) {
linphone_address_destroy(marie->identity); linphone_address_destroy(marie->identity);
marie->identity=marie_identity; marie->identity=marie_identity;
params=linphone_core_create_default_call_parameters(marie->lc); params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_add_custom_header(params,"Weather","bad"); linphone_call_params_add_custom_header(params,"Weather","bad");
linphone_call_params_add_custom_header(params,"Working","yes"); linphone_call_params_add_custom_header(params,"Working","yes");
...@@ -1252,7 +1252,7 @@ static void call_with_custom_sdp_attributes(void) { ...@@ -1252,7 +1252,7 @@ static void call_with_custom_sdp_attributes(void) {
const char *value; const char *value;
LinphoneCoreVTable *vtable; LinphoneCoreVTable *vtable;
pauline_params = linphone_core_create_default_call_parameters(pauline->lc); pauline_params = linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_add_custom_sdp_attribute(pauline_params, "weather", "bad"); linphone_call_params_add_custom_sdp_attribute(pauline_params, "weather", "bad");
linphone_call_params_add_custom_sdp_attribute(pauline_params, "working", "yes"); linphone_call_params_add_custom_sdp_attribute(pauline_params, "working", "yes");
linphone_call_params_add_custom_sdp_media_attribute(pauline_params, LinphoneStreamTypeAudio, "sleeping", "almost"); linphone_call_params_add_custom_sdp_media_attribute(pauline_params, LinphoneStreamTypeAudio, "sleeping", "almost");
...@@ -1408,7 +1408,7 @@ end: ...@@ -1408,7 +1408,7 @@ end:
static void call_paused_resumed_with_video_base_call_cb(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message) { static void call_paused_resumed_with_video_base_call_cb(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message) {
if (cstate == LinphoneCallUpdatedByRemote) { if (cstate == LinphoneCallUpdatedByRemote) {
LinphoneCallParams *params = linphone_core_create_default_call_parameters(lc); LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
linphone_call_params_enable_video(params, TRUE); linphone_call_params_enable_video(params, TRUE);
ms_message (" New state LinphoneCallUpdatedByRemote on call [%p], accepting with video on",call); ms_message (" New state LinphoneCallUpdatedByRemote on call [%p], accepting with video on",call);
BC_ASSERT_NOT_EQUAL(linphone_core_accept_call_update(lc, call, params), 0, int, "%i"); BC_ASSERT_NOT_EQUAL(linphone_core_accept_call_update(lc, call, params), 0, int, "%i");
...@@ -1475,7 +1475,7 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack ...@@ -1475,7 +1475,7 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack
} }
/*now pauline wants to resume*/ /*now pauline wants to resume*/
if (resume_in_audio_send_only_video_inactive_first) { if (resume_in_audio_send_only_video_inactive_first) {
LinphoneCallParams *params = linphone_core_create_default_call_parameters(pauline->lc); LinphoneCallParams *params = linphone_core_create_call_params(pauline->lc, call_pauline);
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionInactive); linphone_call_params_set_video_direction(params,LinphoneMediaDirectionInactive);
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly); linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly);
linphone_core_update_call(pauline->lc,call_pauline,params); linphone_core_update_call(pauline->lc,call_pauline,params);
...@@ -1963,12 +1963,12 @@ static void call_with_declined_video_base(bool_t using_policy) { ...@@ -1963,12 +1963,12 @@ static void call_with_declined_video_base(bool_t using_policy) {
linphone_core_set_video_policy(pauline->lc,&pauline_policy); linphone_core_set_video_policy(pauline->lc,&pauline_policy);
} }
caller_test_params.base=linphone_core_create_default_call_parameters(pauline->lc); caller_test_params.base=linphone_core_create_call_params(pauline->lc, NULL);
if (!using_policy) if (!using_policy)
linphone_call_params_enable_video(caller_test_params.base,TRUE); linphone_call_params_enable_video(caller_test_params.base,TRUE);
if (!using_policy){ if (!using_policy){
callee_test_params.base=linphone_core_create_default_call_parameters(marie->lc); callee_test_params.base=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_video(callee_test_params.base,FALSE); linphone_call_params_enable_video(callee_test_params.base,FALSE);
} }
...@@ -2015,9 +2015,9 @@ static void call_with_declined_video_despite_policy(void) { ...@@ -2015,9 +2015,9 @@ static void call_with_declined_video_despite_policy(void) {
linphone_core_set_video_policy(marie->lc,&marie_policy); linphone_core_set_video_policy(marie->lc,&marie_policy);
linphone_core_set_video_policy(pauline->lc,&pauline_policy); linphone_core_set_video_policy(pauline->lc,&pauline_policy);
caller_test_params.base=linphone_core_create_default_call_parameters(pauline->lc); caller_test_params.base=linphone_core_create_call_params(pauline->lc, NULL);
callee_test_params.base=linphone_core_create_default_call_parameters(marie->lc); callee_test_params.base=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_video(callee_test_params.base,FALSE); linphone_call_params_enable_video(callee_test_params.base,FALSE);
BC_ASSERT_TRUE((call_ok=call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,FALSE))); BC_ASSERT_TRUE((call_ok=call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,FALSE)));
...@@ -2074,12 +2074,12 @@ void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, ...@@ -2074,12 +2074,12 @@ void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie,
linphone_core_set_media_encryption(marie->lc,mode); linphone_core_set_media_encryption(marie->lc,mode);
linphone_core_set_media_encryption(pauline->lc,mode); linphone_core_set_media_encryption(pauline->lc,mode);
caller_test_params.base=linphone_core_create_default_call_parameters(pauline->lc); caller_test_params.base=linphone_core_create_call_params(pauline->lc, NULL);
if (!using_policy) if (!using_policy)
linphone_call_params_enable_video(caller_test_params.base,TRUE); linphone_call_params_enable_video(caller_test_params.base,TRUE);
if (!using_policy){ if (!using_policy){
callee_test_params.base=linphone_core_create_default_call_parameters(marie->lc); callee_test_params.base=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_video(callee_test_params.base,TRUE); linphone_call_params_enable_video(callee_test_params.base,TRUE);
} }
...@@ -2428,7 +2428,7 @@ static void call_with_privacy(void) { ...@@ -2428,7 +2428,7 @@ static void call_with_privacy(void) {
LinphoneCall *c1,*c2; LinphoneCall *c1,*c2;
LinphoneCallParams *params; LinphoneCallParams *params;
LinphoneProxyConfig* pauline_proxy; LinphoneProxyConfig* pauline_proxy;
params=linphone_core_create_default_call_parameters(pauline->lc); params=linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_set_privacy(params,LinphonePrivacyId); linphone_call_params_set_privacy(params,LinphonePrivacyId);
BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params)); BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params));
...@@ -2483,7 +2483,7 @@ static void call_with_privacy2(void) { ...@@ -2483,7 +2483,7 @@ static void call_with_privacy2(void) {
LinphoneCall *c1,*c2; LinphoneCall *c1,*c2;
LinphoneCallParams *params; LinphoneCallParams *params;
LinphoneProxyConfig* pauline_proxy; LinphoneProxyConfig* pauline_proxy;
params=linphone_core_create_default_call_parameters(pauline->lc); params=linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_set_privacy(params,LinphonePrivacyId); linphone_call_params_set_privacy(params,LinphonePrivacyId);
linphone_core_get_default_proxy(pauline->lc,&pauline_proxy); linphone_core_get_default_proxy(pauline->lc,&pauline_proxy);
...@@ -3446,7 +3446,7 @@ static void multiple_early_media(void) { ...@@ -3446,7 +3446,7 @@ static void multiple_early_media(void) {
LinphoneCoreManager* marie1 = linphone_core_manager_new("marie_early_rc"); LinphoneCoreManager* marie1 = linphone_core_manager_new("marie_early_rc");
LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc"); LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc");
MSList *lcs=NULL; MSList *lcs=NULL;
LinphoneCallParams *params=linphone_core_create_default_call_parameters(pauline->lc); LinphoneCallParams *params=linphone_core_create_call_params(pauline->lc, NULL);
LinphoneVideoPolicy pol; LinphoneVideoPolicy pol;
LinphoneCall *marie1_call; LinphoneCall *marie1_call;
LinphoneCall *marie2_call; LinphoneCall *marie2_call;
...@@ -3616,7 +3616,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone ...@@ -3616,7 +3616,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
} }
if (call) { if (call) {
params=linphone_core_create_default_call_parameters(marie->lc); params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly); linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly);
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendOnly); linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendOnly);
linphone_core_accept_call_with_params(marie->lc,call,params); linphone_core_accept_call_with_params(marie->lc,call,params);
...@@ -3716,8 +3716,8 @@ static void record_call(const char *filename, bool_t enableVideo, const char *vi ...@@ -3716,8 +3716,8 @@ static void record_call(const char *filename, bool_t enableVideo, const char *vi
marie = linphone_core_manager_new("marie_h264_rc"); marie = linphone_core_manager_new("marie_h264_rc");
pauline = linphone_core_manager_new("pauline_h264_rc"); pauline = linphone_core_manager_new("pauline_h264_rc");
marieParams = linphone_core_create_default_call_parameters(marie->lc); marieParams = linphone_core_create_call_params(marie->lc, NULL);
paulineParams = linphone_core_create_default_call_parameters(pauline->lc); paulineParams = linphone_core_create_call_params(pauline->lc, NULL);
#ifdef VIDEO_ENABLED #ifdef VIDEO_ENABLED
linphone_core_set_video_device(pauline->lc, liblinphone_tester_mire_id); linphone_core_set_video_device(pauline->lc, liblinphone_tester_mire_id);
...@@ -3778,8 +3778,8 @@ static void video_call_recording_vp8_test(void) { ...@@ -3778,8 +3778,8 @@ static void video_call_recording_vp8_test(void) {
static void video_call_snapshot(void) { static void video_call_snapshot(void) {
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
LinphoneCallParams *marieParams = linphone_core_create_default_call_parameters(marie->lc); LinphoneCallParams *marieParams = linphone_core_create_call_params(marie->lc, NULL);
LinphoneCallParams *paulineParams = linphone_core_create_default_call_parameters(pauline->lc); LinphoneCallParams *paulineParams = linphone_core_create_call_params(pauline->lc, NULL);
LinphoneCall *callInst = NULL; LinphoneCall *callInst = NULL;
char *filename = create_filepath(bc_tester_get_writable_dir_prefix(), "snapshot", "jpeg"); char *filename = create_filepath(bc_tester_get_writable_dir_prefix(), "snapshot", "jpeg");
int dummy = 0; int dummy = 0;
...@@ -3920,7 +3920,7 @@ static void call_log_from_taken_from_p_asserted_id(void) { ...@@ -3920,7 +3920,7 @@ static void call_log_from_taken_from_p_asserted_id(void) {
LpConfig *marie_lp; LpConfig *marie_lp;
bool_t call_ok; bool_t call_ok;
params=linphone_core_create_default_call_parameters(pauline->lc); params=linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_add_custom_header(params,"P-Asserted-Identity",pauline_asserted_id); linphone_call_params_add_custom_header(params,"P-Asserted-Identity",pauline_asserted_id);
/*fixme, should be able to add several time the same header linphone_call_params_add_custom_header(params,"P-Asserted-Identity","\"Paupauche\" <tel:+12345>");*/ /*fixme, should be able to add several time the same header linphone_call_params_add_custom_header(params,"P-Asserted-Identity","\"Paupauche\" <tel:+12345>");*/
...@@ -4132,7 +4132,7 @@ static void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ic ...@@ -4132,7 +4132,7 @@ static void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ic
/* /*
Marie calls Pauline, and after the call has rung, transitions to an early_media session Marie calls Pauline, and after the call has rung, transitions to an early_media session
*/ */
params = linphone_core_create_default_call_parameters(marie->lc); params = linphone_core_create_call_params(marie->lc, NULL);
if( use_video){ if( use_video){
......
...@@ -509,7 +509,7 @@ static void early_media_call_forking(void) { ...@@ -509,7 +509,7 @@ static void early_media_call_forking(void) {
LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc"); LinphoneCoreManager* marie2 = linphone_core_manager_new("marie_early_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
MSList *lcs=NULL; MSList *lcs=NULL;
LinphoneCallParams *params=linphone_core_create_default_call_parameters(pauline->lc); LinphoneCallParams *params=linphone_core_create_call_params(pauline->lc, NULL);
LinphoneVideoPolicy pol; LinphoneVideoPolicy pol;
int dummy=0; int dummy=0;
......
...@@ -1304,7 +1304,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled) { ...@@ -1304,7 +1304,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled) {
linphone_core_set_media_encryption_mandatory(pauline->lc, TRUE); linphone_core_set_media_encryption_mandatory(pauline->lc, TRUE);
} }
marie_params = linphone_core_create_default_call_parameters(marie->lc); marie_params = linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_realtime_text(marie_params,TRUE); linphone_call_params_enable_realtime_text(marie_params,TRUE);
if (!audio_stream_enabled) { if (!audio_stream_enabled) {
linphone_call_params_enable_audio(marie_params,FALSE); linphone_call_params_enable_audio(marie_params,FALSE);
...@@ -1359,7 +1359,7 @@ static void real_time_text_conversation(void) { ...@@ -1359,7 +1359,7 @@ static void real_time_text_conversation(void) {
LinphoneChatRoom *pauline_chat_room, *marie_chat_room; LinphoneChatRoom *pauline_chat_room, *marie_chat_room;
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCallParams *marie_params = linphone_core_create_default_call_parameters(marie->lc); LinphoneCallParams *marie_params = linphone_core_create_call_params(marie->lc, NULL);
LinphoneCall *pauline_call, *marie_call; LinphoneCall *pauline_call, *marie_call;
linphone_call_params_enable_realtime_text(marie_params,TRUE); linphone_call_params_enable_realtime_text(marie_params,TRUE);
......
...@@ -39,8 +39,8 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) { ...@@ -39,8 +39,8 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
MSList* lcs; MSList* lcs;
LinphoneCall* pauline_called_by_marie; LinphoneCall* pauline_called_by_marie;
LinphoneCall* pauline_called_by_laure=NULL; LinphoneCall* pauline_called_by_laure=NULL;
LinphoneCallParams *laure_params=linphone_core_create_default_call_parameters(laure->lc); LinphoneCallParams *laure_params=linphone_core_create_call_params(laure->lc, NULL);
LinphoneCallParams *marie_params=linphone_core_create_default_call_parameters(marie->lc); LinphoneCallParams *marie_params=linphone_core_create_call_params(marie->lc, NULL);
if (enable_caller_privacy) if (enable_caller_privacy)
linphone_call_params_set_privacy(marie_params,LinphonePrivacyId); linphone_call_params_set_privacy(marie_params,LinphonePrivacyId);
...@@ -118,8 +118,8 @@ static void incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallState ...@@ -118,8 +118,8 @@ static void incoming_call_accepted_when_outgoing_call_in_state(LinphoneCallState
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCoreManager* laure = linphone_core_manager_new( "laure_rc"); LinphoneCoreManager* laure = linphone_core_manager_new( "laure_rc");
MSList* lcs; MSList* lcs;
LinphoneCallParams *laure_params=linphone_core_create_default_call_parameters(laure->lc); LinphoneCallParams *laure_params=linphone_core_create_call_params(laure->lc, NULL);
LinphoneCallParams *marie_params=linphone_core_create_default_call_parameters(marie->lc); LinphoneCallParams *marie_params=linphone_core_create_call_params(marie->lc, NULL);
lcs=ms_list_append(NULL,marie->lc); lcs=ms_list_append(NULL,marie->lc);
lcs=ms_list_append(lcs,pauline->lc); lcs=ms_list_append(lcs,pauline->lc);
......
...@@ -188,7 +188,7 @@ static void quality_reporting_not_sent_if_low_bandwidth(void) { ...@@ -188,7 +188,7 @@ static void quality_reporting_not_sent_if_low_bandwidth(void) {
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
LinphoneCallParams* marie_params; LinphoneCallParams* marie_params;
marie_params=linphone_core_create_default_call_parameters(marie->lc); marie_params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_low_bandwidth(marie_params,TRUE); linphone_call_params_enable_low_bandwidth(marie_params,TRUE);
if (create_call_for_quality_reporting_tests(marie, pauline, NULL, NULL, marie_params, NULL)) { if (create_call_for_quality_reporting_tests(marie, pauline, NULL, NULL, marie_params, NULL)) {
...@@ -291,9 +291,9 @@ static void quality_reporting_session_report_if_video_stopped(void) { ...@@ -291,9 +291,9 @@ static void quality_reporting_session_report_if_video_stopped(void) {
linphone_core_enable_video_display(marie->lc, FALSE); linphone_core_enable_video_display(marie->lc, FALSE);
linphone_core_enable_video_capture(pauline->lc, TRUE); linphone_core_enable_video_capture(pauline->lc, TRUE);
linphone_core_enable_video_display(pauline->lc, FALSE); linphone_core_enable_video_display(pauline->lc, FALSE);
marie_params=linphone_core_create_default_call_parameters(marie->lc); marie_params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_video(marie_params,TRUE); linphone_call_params_enable_video(marie_params,TRUE);
pauline_params=linphone_core_create_default_call_parameters(pauline->lc); pauline_params=linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_enable_video(pauline_params,TRUE); linphone_call_params_enable_video(pauline_params,TRUE);
if (create_call_for_quality_reporting_tests(marie, pauline, &call_marie, &call_pauline, marie_params, pauline_params)) { if (create_call_for_quality_reporting_tests(marie, pauline, &call_marie, &call_pauline, marie_params, pauline_params)) {
...@@ -371,10 +371,10 @@ static void quality_reporting_interval_report_video_and_rtt(void) { ...@@ -371,10 +371,10 @@ static void quality_reporting_interval_report_video_and_rtt(void) {
linphone_core_enable_video_display(marie->lc, FALSE); linphone_core_enable_video_display(marie->lc, FALSE);
linphone_core_enable_video_capture(pauline->lc, TRUE); linphone_core_enable_video_capture(pauline->lc, TRUE);
linphone_core_enable_video_display(pauline->lc, FALSE); linphone_core_enable_video_display(pauline->lc, FALSE);
marie_params=linphone_core_create_default_call_parameters(marie->lc); marie_params=linphone_core_create_call_params(marie->lc, NULL);
linphone_call_params_enable_video(marie_params,TRUE); linphone_call_params_enable_video(marie_params,TRUE);
linphone_call_params_enable_realtime_text(marie_params,TRUE); linphone_call_params_enable_realtime_text(marie_params,TRUE);
pauline_params=linphone_core_create_default_call_parameters(pauline->lc); pauline_params=linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_enable_video(pauline_params,TRUE); linphone_call_params_enable_video(pauline_params,TRUE);
linphone_call_params_enable_realtime_text(pauline_params,TRUE); linphone_call_params_enable_realtime_text(pauline_params,TRUE);
......
...@@ -118,7 +118,7 @@ static void early_media_video_call_state_changed(LinphoneCore *lc, LinphoneCall ...@@ -118,7 +118,7 @@ static void early_media_video_call_state_changed(LinphoneCore *lc, LinphoneCall
video_call_state_changed(lc, call, cstate, msg); video_call_state_changed(lc, call, cstate, msg);
switch (cstate) { switch (cstate) {
case LinphoneCallIncomingReceived: case LinphoneCallIncomingReceived:
params = linphone_core_create_default_call_parameters(lc); params = linphone_core_create_call_params(lc, call);
linphone_call_params_enable_video(params, TRUE); linphone_call_params_enable_video(params, TRUE);
linphone_call_params_set_audio_direction(params, LinphoneMediaDirectionSendOnly); linphone_call_params_set_audio_direction(params, LinphoneMediaDirectionSendOnly);
linphone_call_params_set_video_direction(params, LinphoneMediaDirectionRecvOnly); linphone_call_params_set_video_direction(params, LinphoneMediaDirectionRecvOnly);
...@@ -136,7 +136,7 @@ static void early_media_video_call_state_changed_with_inactive_audio(LinphoneCor ...@@ -136,7 +136,7 @@ static void early_media_video_call_state_changed_with_inactive_audio(LinphoneCor
video_call_state_changed(lc, call, cstate, msg); video_call_state_changed(lc, call, cstate, msg);
switch (cstate) { switch (cstate) {
case LinphoneCallIncomingReceived: case LinphoneCallIncomingReceived:
params = linphone_core_create_default_call_parameters(lc); params = linphone_core_create_call_params(lc, call);
linphone_call_params_enable_video(params, TRUE); linphone_call_params_enable_video(params, TRUE);
linphone_call_params_set_audio_direction(params, LinphoneMediaDirectionInactive); linphone_call_params_set_audio_direction(params, LinphoneMediaDirectionInactive);
linphone_call_params_set_video_direction(params, LinphoneMediaDirectionRecvOnly); linphone_call_params_set_video_direction(params, LinphoneMediaDirectionRecvOnly);
...@@ -208,7 +208,7 @@ static LinphoneCallParams * _configure_for_video(LinphoneCoreManager *manager, L ...@@ -208,7 +208,7 @@ static LinphoneCallParams * _configure_for_video(LinphoneCoreManager *manager, L
linphone_core_set_video_device(manager->lc, "StaticImage: Static picture"); linphone_core_set_video_device(manager->lc, "StaticImage: Static picture");
linphone_core_enable_video_capture(manager->lc, TRUE); linphone_core_enable_video_capture(manager->lc, TRUE);
linphone_core_enable_video_display(manager->lc, TRUE); linphone_core_enable_video_display(manager->lc, TRUE);
params = linphone_core_create_default_call_parameters(manager->lc); params = linphone_core_create_call_params(manager->lc, NULL);
linphone_call_params_enable_video(params, TRUE); linphone_call_params_enable_video(params, TRUE);
if (linphone_core_find_payload_type(manager->lc,"VP8", 90000, -1)!=NULL){ if (linphone_core_find_payload_type(manager->lc,"VP8", 90000, -1)!=NULL){
disable_all_video_codecs_except_one(manager->lc, "VP8"); disable_all_video_codecs_except_one(manager->lc, "VP8");
...@@ -422,7 +422,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void ...@@ -422,7 +422,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
lcs = ms_list_append(lcs,marie2->lc); lcs = ms_list_append(lcs,marie2->lc);
lcs = ms_list_append(lcs,pauline->lc); lcs = ms_list_append(lcs,pauline->lc);
pauline_params = linphone_core_create_default_call_parameters(pauline->lc); pauline_params = linphone_core_create_call_params(pauline->lc, NULL);
linphone_call_params_enable_early_media_sending(pauline_params, TRUE); linphone_call_params_enable_early_media_sending(pauline_params, TRUE);
linphone_call_params_enable_video(pauline_params, TRUE); linphone_call_params_enable_video(pauline_params, TRUE);
marie1_params = configure_for_early_media_video_receiving_with_inactive_audio(marie1); marie1_params = configure_for_early_media_video_receiving_with_inactive_audio(marie1);
......
...@@ -57,7 +57,7 @@ static void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCal ...@@ -57,7 +57,7 @@ static void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCal
case LinphoneCallIncomingReceived: case LinphoneCallIncomingReceived:
ms_message("Incoming call arrive !\n"); ms_message("Incoming call arrive !\n");
/* accept the incoming call*/ /* accept the incoming call*/
call_params = linphone_core_create_default_call_parameters(lc); call_params = linphone_core_create_call_params(lc, call);
linphone_call_params_enable_video(call_params,TRUE); linphone_call_params_enable_video(call_params,TRUE);
linphone_call_params_set_audio_direction(call_params,LinphoneMediaDirectionSendOnly); linphone_call_params_set_audio_direction(call_params,LinphoneMediaDirectionSendOnly);<