add use_101 option to disable 101 dialog established

This commit is contained in:
Jehan Monnier 2011-05-23 17:27:28 +02:00
parent 08b8b1220d
commit 3981cdd264
4 changed files with 10 additions and 1 deletions

View 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);

View 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);

View 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;

View 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{