forked from mirrors/linphone-iphone
implement option to disable rport, fix broken out subcribes
This commit is contained in:
parent
300b0e6727
commit
e6a00efa5a
5 changed files with 12 additions and 1 deletions
|
|
@ -489,6 +489,8 @@ static void sip_config_read(LinphoneCore *lc)
|
|||
sal_use_session_timers(lc->sal,200);
|
||||
}
|
||||
|
||||
sal_use_rport(lc->sal,lp_config_get_int(lc->config,"sip","use_rport",1));
|
||||
|
||||
tmp=lp_config_get_int(lc->config,"sip","use_rfc2833",0);
|
||||
linphone_core_set_use_rfc2833_for_dtmf(lc,tmp);
|
||||
|
||||
|
|
|
|||
|
|
@ -262,6 +262,8 @@ unsigned int sal_get_keepalive_period(Sal *ctx);
|
|||
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);
|
||||
|
||||
int sal_iterate(Sal *sal);
|
||||
MSList * sal_get_pending_auths(Sal *sal);
|
||||
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ Sal * sal_init(){
|
|||
sal=ms_new0(Sal,1);
|
||||
sal->keepalive_period=30;
|
||||
sal->double_reg=TRUE;
|
||||
sal->use_rports=TRUE;
|
||||
return sal;
|
||||
}
|
||||
|
||||
|
|
@ -366,6 +367,7 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
|
|||
eXosip_set_option(13,&err); /*13=EXOSIP_OPT_SRV_WITH_NAPTR, as it is an enum value, we can't use it unless we are sure of the
|
||||
version of eXosip, which is not the case*/
|
||||
/*see if it looks like an IPv6 address*/
|
||||
eXosip_set_option(EXOSIP_OPT_USE_RPORT,&ctx->use_rports);
|
||||
ipv6=strchr(addr,':')!=NULL;
|
||||
eXosip_enable_ipv6(ipv6);
|
||||
|
||||
|
|
@ -411,6 +413,10 @@ void sal_use_double_registrations(Sal *ctx, bool_t enabled){
|
|||
ctx->double_reg=enabled;
|
||||
}
|
||||
|
||||
void sal_use_rport(Sal *ctx, bool_t use_rports){
|
||||
ctx->use_rports=use_rports;
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ struct Sal{
|
|||
void *up;
|
||||
bool_t one_matching_codec;
|
||||
bool_t double_reg;
|
||||
bool_t use_rports;
|
||||
};
|
||||
|
||||
struct SalOp{
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ int sal_subscribe_presence(SalOp *op, const char *from, const char *to){
|
|||
eXosip_lock();
|
||||
eXosip_subscribe_build_initial_request(&msg,sal_op_get_to(op),sal_op_get_from(op),
|
||||
sal_op_get_route(op),"presence",600);
|
||||
if (msg!=NULL){
|
||||
if (msg==NULL){
|
||||
ms_error("Could not build subscribe request to %s",to);
|
||||
eXosip_unlock();
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue