LinphoneFriend *lf=NULL;
char *tmp;
LinphoneAddress *uri;
+ LinphoneProxyConfig *cfg;
+ const char *fixed_contact;
uri=linphone_address_new(from);
linphone_address_clean(uri);
tmp=linphone_address_as_string(uri);
ms_message("Receiving new subscription from %s.",from);
+
+ cfg=linphone_core_lookup_known_proxy(lc,uri);
+ if (cfg!=NULL){
+ if (cfg->op){
+ fixed_contact=sal_op_get_contact(cfg->op);
+ if (fixed_contact) {
+ sal_op_set_contact (op,fixed_contact);
+ ms_message("Contact for next subscribe answer has been fixed using proxy to %s",fixed_contact);
+ }
+ }
+ }
/* check if we answer to this subscription */
if (linphone_find_friend(lc->friends,uri,&lf)!=NULL){
lf->insub=op;
ms_free(tmp);
}
-void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeState ss, SalPresenceStatus sal_status){
+void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, SalPresenceStatus sal_status){
char *tmp;
LinphoneFriend *lf;
LinphoneAddress *friend=NULL;