add set/get for SDP control

This commit is contained in:
Jehan Monnier 2014-03-18 10:56:23 +01:00
parent 260e7e1d5c
commit 504616b3ef
5 changed files with 38 additions and 51 deletions

View file

@ -6502,3 +6502,10 @@ void linphone_core_set_chat_database_path(LinphoneCore *lc, const char *path){
linphone_core_message_storage_init(lc);
}
}
void linphone_core_enable_sdp_200_ack(LinphoneCore *lc, bool_t enable) {
lp_config_set_int(lc->config,"sip","sdp_200_ack",lc->sip_conf.sdp_200_ack=enable);
}
bool_t linphone_core_sdp_200_ack_enabled(const LinphoneCore *lc) {
return lc->sip_conf.sdp_200_ack!=0;
}

View file

@ -2329,6 +2329,21 @@ LINPHONE_PUBLIC bool_t linphone_core_is_provisioning_transient(LinphoneCore *lc)
LINPHONE_PUBLIC int linphone_core_migrate_to_multi_transport(LinphoneCore *lc);
LINPHONE_PUBLIC void linphone_core_set_call_error_tone(LinphoneCore *lc, LinphoneReason reason, const char *audiofile);
/**
* Control when media offer is sent in SIP INVITE.
* @param lc the linphone core
* @param enable true if INVITE has to be sent whitout SDP.
* @ingroup network_parameters
**/
LINPHONE_PUBLIC void linphone_core_enable_sdp_200_ack(LinphoneCore *lc, bool_t enable);
/**
* Media offer control param for SIP INVITE.
* @return true if INVITE has to be sent whitout SDP.
* @ingroup network_parameters
**/
LINPHONE_PUBLIC bool_t linphone_core_sdp_200_ack_enabled(const LinphoneCore *lc);
#ifdef __cplusplus
}
#endif

View file

@ -4593,6 +4593,17 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_PayloadTypeImpl_getSendFmtp(JNI
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_enableSdp200Ack(JNIEnv* env
,jobject thiz
,jlong lc
,jboolean enable) {
linphone_core_enable_sdp_200_ack((LinphoneCore*)lc,enable);
}
JNIEXPORT jbool JNICALL Java_org_linphone_core_LinphoneCoreImpl_isSdp200AckEnabled(JNIEnv* env
,jobject thiz
,jlong lc) {
return (jbool)linphone_core_sdp_200_ack_enabled((const LinphoneCore*)lc);
}

View file

@ -478,9 +478,11 @@ static void call_terminated_by_caller(void) {
}
static void call_with_no_sdp(void) {
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_no_sdp_rc");
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
linphone_core_enable_sdp_200_ack(marie->lc,TRUE);
CU_ASSERT_TRUE(call(marie,pauline));
/*just to sleep*/
linphone_core_terminate_all_calls(pauline->lc);

View file

@ -1,48 +0,0 @@
[sip]
sip_port=5082
sip_tcp_port=5082
sip_tls_port=5083
default_proxy=0
ping_with_options=0
register_only_when_network_is_up=0
sdp_200_ack=1
[auth_info_0]
username=marie
userid=marie
passwd=secret
realm=sip.example.org
[proxy_0]
reg_proxy=sip.example.org;transport=tcp
reg_route=sip.example.org;transport=tcp;lr
reg_identity=sip:marie@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[friend_0]
url="Paupoche" <sip:pauline@sip.example.org>
pol=accept
subscribe=0
[rtp]
audio_rtp_port=8070
video_rtp_port=8072
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture
[sound]
echocancellation=0 #to not overload cpu in case of VG