mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-30 17:36:22 +00:00
Merge branch 'master' of git.linphone.org:linphone
This commit is contained in:
commit
4ffd88d85f
4 changed files with 36 additions and 5 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl Keep this line, it is parsed by Android Makefile
|
|
||||||
LINPHONE_VERSION=3.5.2
|
|
||||||
|
|
||||||
AC_INIT([linphone],[$LINPHONE_VERSION],[linphone-developers@nongnu.org])
|
AC_INIT([linphone],[3.5.2],[linphone-developers@nongnu.org])
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
|
AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -474,6 +474,8 @@ const char *linphone_proxy_config_get_addr(const LinphoneProxyConfig *obj);
|
||||||
int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj);
|
int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj);
|
||||||
bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj);
|
bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj);
|
||||||
void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj);
|
void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj);
|
||||||
|
const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj);
|
||||||
|
void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params);
|
||||||
struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj);
|
struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj);
|
||||||
|
|
||||||
bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg);
|
bool_t linphone_proxy_config_get_dial_escape_plus(const LinphoneProxyConfig *cfg);
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,7 @@ struct _LinphoneProxyConfig
|
||||||
char *reg_identity;
|
char *reg_identity;
|
||||||
char *reg_route;
|
char *reg_route;
|
||||||
char *realm;
|
char *realm;
|
||||||
|
char *contact_params;
|
||||||
int expires;
|
int expires;
|
||||||
int reg_time;
|
int reg_time;
|
||||||
SalOp *op;
|
SalOp *op;
|
||||||
|
|
|
||||||
|
|
@ -256,9 +256,10 @@ static char *guess_contact_for_register(LinphoneProxyConfig *obj){
|
||||||
if (proxy==NULL) return NULL;
|
if (proxy==NULL) return NULL;
|
||||||
host=linphone_address_get_domain (proxy);
|
host=linphone_address_get_domain (proxy);
|
||||||
if (host!=NULL){
|
if (host!=NULL){
|
||||||
LinphoneAddress *contact;
|
|
||||||
char localip[LINPHONE_IPADDR_SIZE];
|
char localip[LINPHONE_IPADDR_SIZE];
|
||||||
|
char *tmp;
|
||||||
LCSipTransports tr;
|
LCSipTransports tr;
|
||||||
|
LinphoneAddress *contact;
|
||||||
|
|
||||||
linphone_core_get_local_ip(obj->lc,host,localip);
|
linphone_core_get_local_ip(obj->lc,host,localip);
|
||||||
contact=linphone_address_new(obj->reg_identity);
|
contact=linphone_address_new(obj->reg_identity);
|
||||||
|
|
@ -274,8 +275,12 @@ static char *guess_contact_for_register(LinphoneProxyConfig *obj){
|
||||||
sal_address_set_param(contact,"transport","tls");
|
sal_address_set_param(contact,"transport","tls");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret=linphone_address_as_string(contact);
|
tmp=linphone_address_as_string_uri_only(contact);
|
||||||
|
if (obj->contact_params)
|
||||||
|
ret=ms_strdup_printf("<%s;%s>",tmp,obj->contact_params);
|
||||||
|
else ret=ms_strdup_printf("<%s>",tmp);
|
||||||
linphone_address_destroy(contact);
|
linphone_address_destroy(contact);
|
||||||
|
ms_free(tmp);
|
||||||
}
|
}
|
||||||
linphone_address_destroy (proxy);
|
linphone_address_destroy (proxy);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
@ -511,6 +516,31 @@ bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj){
|
||||||
return obj->reg_sendregister;
|
return obj->reg_sendregister;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set optional contact parameters that will be added to the contact information sent in the registration.
|
||||||
|
* @param obj the proxy config object
|
||||||
|
* @param contact_params a string contaning the additional parameters in text form, like "myparam=something;myparam2=something_else"
|
||||||
|
*
|
||||||
|
* The main use case for this function is provide the proxy additional information regarding the user agent, like for example unique identifier or apple push id.
|
||||||
|
* As an example, the contact address in the SIP register sent will look like <sip:joe@15.128.128.93:50421;apple-push-id=43143-DFE23F-2323-FA2232>.
|
||||||
|
**/
|
||||||
|
void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params){
|
||||||
|
if (obj->contact_params) {
|
||||||
|
ms_free(obj->contact_params);
|
||||||
|
obj->contact_params=NULL;
|
||||||
|
}
|
||||||
|
if (contact_params){
|
||||||
|
obj->contact_params=ms_strdup(contact_params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns previously set contact parameters.
|
||||||
|
**/
|
||||||
|
const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj){
|
||||||
|
return obj->contact_params;
|
||||||
|
}
|
||||||
|
|
||||||
struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj){
|
struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig *obj){
|
||||||
return obj->lc;
|
return obj->lc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue