]> sjero.net Git - linphone/commitdiff
add use_101 option to disable 101 dialog established
authorJehan Monnier <jehan.monnier@linphone.org>
Mon, 23 May 2011 15:27:28 +0000 (17:27 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Mon, 23 May 2011 15:27:28 +0000 (17:27 +0200)
coreapi/linphonecore.c
coreapi/sal.h
coreapi/sal_eXosip2.c
coreapi/sal_eXosip2.h

index d075517c8fae400f00ea2c3a6da2ac2d2101ef20..1b9647f37e8e49b54336ef14e490a03cb78596b6 100644 (file)
@@ -464,6 +464,7 @@ static void sip_config_read(LinphoneCore *lc)
        }
 
        sal_use_rport(lc->sal,lp_config_get_int(lc->config,"sip","use_rport",1));
+       sal_use_101(lc->sal,lp_config_get_int(lc->config,"sip","use_101",1));
 
        tmp=lp_config_get_int(lc->config,"sip","use_rfc2833",0);
        linphone_core_set_use_rfc2833_for_dtmf(lc,tmp);
index ecb140b71a84c305716ec92da2a4147fdc01a09b..a89b862c05369740edde30ca3c2c72e685a6831e 100644 (file)
@@ -263,6 +263,7 @@ void sal_use_session_timers(Sal *ctx, int expires);
 void sal_use_double_registrations(Sal *ctx, bool_t enabled);
 void sal_use_one_matching_codec_policy(Sal *ctx, bool_t one_matching_codec);
 void sal_use_rport(Sal *ctx, bool_t use_rports);
+void sal_use_101(Sal *ctx, bool_t use_101);
 
 int sal_iterate(Sal *sal);
 MSList * sal_get_pending_auths(Sal *sal);
index 34cfd44f52958b9f7bfcda5bf7442e593d23584d..a0622226c6458e43a61fead124e630124d853838 100644 (file)
@@ -274,6 +274,7 @@ Sal * sal_init(){
        sal->keepalive_period=30;
        sal->double_reg=TRUE;
        sal->use_rports=TRUE;
+       sal->use_101=TRUE;
        return sal;
 }
 
@@ -369,6 +370,9 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
        /*see if it looks like an IPv6 address*/
        int use_rports = ctx->use_rports; // Copy char to int to avoid bad alignment
        eXosip_set_option(EXOSIP_OPT_USE_RPORT,&use_rports);
+       int dont_use_101 = !ctx->use_101; // Copy char to int to avoid bad alignment
+       eXosip_set_option(EXOSIP_OPT_DONT_SEND_101,&dont_use_101);
+
        ipv6=strchr(addr,':')!=NULL;
        eXosip_enable_ipv6(ipv6);
 
@@ -417,7 +421,9 @@ void sal_use_double_registrations(Sal *ctx, bool_t enabled){
 void sal_use_rport(Sal *ctx, bool_t use_rports){
        ctx->use_rports=use_rports;
 }
-
+void sal_use_101(Sal *ctx, bool_t use_101){
+       ctx->use_101=use_101;
+}
 static int extract_received_rport(osip_message_t *msg, const char **received, int *rportval){
        osip_via_t *via=NULL;
        osip_generic_param_t *param=NULL;
index 1f83a85ebb153119c9368f487a0e06ece9fce3ab..a050f5133c8100f812bd19c12800cfb936613a6a 100644 (file)
@@ -43,6 +43,7 @@ struct Sal{
        bool_t one_matching_codec;
        bool_t double_reg;
        bool_t use_rports;
+       bool_t use_101;
 };
 
 struct SalOp{