diff --git a/coreapi/bellesip_sal/sal_op_presence.c b/coreapi/bellesip_sal/sal_op_presence.c
index b68ef1f33..af321069b 100644
--- a/coreapi/bellesip_sal/sal_op_presence.c
+++ b/coreapi/bellesip_sal/sal_op_presence.c
@@ -325,6 +325,23 @@ entity=\"%s\">\n\
\n\
\n\
",
+contact_info, contact_info);
+ }
+ else if (online_status == SalPresenceOnVacation)
+ {
+ snprintf(buf, buflen, "\n\
+\n\
+\n\
+open\n\
+%s\n\
+\n\
+\n\
+\n\
+\n\
+",
contact_info, contact_info);
}
else if (online_status==SalPresenceOnthephone)
@@ -356,7 +373,7 @@ entity=\"%s\">\n\
%s\n\
\n\
\n\
-\n\
+\n\
Out to lunch \n\
\n\
",
@@ -533,12 +550,15 @@ static void presence_process_request_event(void *op_base, const belle_sip_reques
|| strstr(body,"on-the-phone")!=NULL){
estatus=SalPresenceOnthephone;
}else if (strstr(body,"outtolunch")!=NULL
+ || strstr(body,"lunch")!=NULL
|| strstr(body,"meal")!=NULL){
estatus=SalPresenceOuttolunch;
}else if (strstr(body,"closed")!=NULL){
estatus=SalPresenceOffline;
}else if ((strstr(body,"online")!=NULL) || (strstr(body,"open")!=NULL)) {
estatus=SalPresenceOnline;
+ }else if((strstr(body,"vacation")!=NULL)) {
+ estatus = SalPresenceOnVacation;
}else{
estatus=SalPresenceOffline;
}
diff --git a/coreapi/friend.c b/coreapi/friend.c
index 5c548d706..8bd252aed 100644
--- a/coreapi/friend.c
+++ b/coreapi/friend.c
@@ -62,6 +62,8 @@ const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
case LinphoneStatusPending:
str=_("Pending");
break;
+ case LinphoneStatusVacation:
+ str=_("Vacation");
default:
str=_("Unknown-bug");
}
@@ -259,6 +261,9 @@ SalPresenceStatus linphone_online_status_to_sal(LinphoneOnlineStatus os){
case LinphoneStatusPending:
return SalPresenceOffline;
break;
+ case LinphoneStatusVacation:
+ return SalPresenceOnVacation;
+ break;
default:
return SalPresenceOffline;
break;
diff --git a/coreapi/linphonefriend.h b/coreapi/linphonefriend.h
index b8a041b14..cd5e74a48 100644
--- a/coreapi/linphonefriend.h
+++ b/coreapi/linphonefriend.h
@@ -97,6 +97,11 @@ typedef enum _LinphoneOnlineStatus{
*/
LinphoneStatusPending,
+ /**
+ * Vacation
+ */
+ LinphoneStatusVacation,
+
LinphoneStatusEnd
}LinphoneOnlineStatus;
diff --git a/coreapi/presence.c b/coreapi/presence.c
index 5289a2301..2eb11ff64 100644
--- a/coreapi/presence.c
+++ b/coreapi/presence.c
@@ -131,6 +131,9 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, Sa
case SalPresenceDonotdisturb:
estatus=LinphoneStatusDoNotDisturb;
break;
+ case SalPresenceOnVacation:
+ estatus=LinphoneStatusVacation;
+ break;
case SalPresenceMoved:
case SalPresenceAltService:
estatus=LinphoneStatusMoved;
diff --git a/coreapi/sal_eXosip2_presence.c b/coreapi/sal_eXosip2_presence.c
index b9f7b5763..c99a48793 100644
--- a/coreapi/sal_eXosip2_presence.c
+++ b/coreapi/sal_eXosip2_presence.c
@@ -520,6 +520,23 @@ contact_info, contact_info);
"\n"
"\n"
"",
+contact_info, contact_info);
+ }
+ else if (online_status == SalPresenceOnVacation)
+ {
+ snprintf(buf, buflen, "\n"
+"\n"
+"\n"
+"open\n"
+"%s\n"
+"\n"
+"\n"
+"\n"
+"\n"
+"",
contact_info, contact_info);
}
else if (online_status==SalPresenceOnthephone)
@@ -551,7 +568,7 @@ contact_info, contact_info);
"%s\n"
"\n"
"\n"
-"\n"
+"\n"
"Out to lunch \n"
"\n"
"",
@@ -737,12 +754,15 @@ void sal_exosip_notify_recv(Sal *sal, eXosip_event_t *ev){
|| strstr(body->body,"on-the-phone")!=NULL){
estatus=SalPresenceOnthephone;
}else if (strstr(body->body,"outtolunch")!=NULL
+ || strstr(body->body,"lunch") != NULL
|| strstr(body->body,"meal")!=NULL){
estatus=SalPresenceOuttolunch;
}else if (strstr(body->body,"closed")!=NULL){
estatus=SalPresenceOffline;
}else if ((strstr(body->body,"online")!=NULL) || (strstr(body->body,"open")!=NULL)) {
estatus=SalPresenceOnline;
+ }else if(strstr(body->body,"vacation") != NULL) {
+ estatus = SalPresenceOnVacation;
}else{
estatus=SalPresenceOffline;
}
diff --git a/include/sal/sal.h b/include/sal/sal.h
index d3efc5722..7ace50bdb 100644
--- a/include/sal/sal.h
+++ b/include/sal/sal.h
@@ -288,6 +288,7 @@ typedef enum SalPresenceStatus{
SalPresenceDonotdisturb,
SalPresenceMoved,
SalPresenceAltService,
+ SalPresenceOnVacation
}SalPresenceStatus;
const char* sal_presence_status_to_string(const SalPresenceStatus status);
diff --git a/tester/presence_tester.c b/tester/presence_tester.c
index 18308f13e..543caccbe 100644
--- a/tester/presence_tester.c
+++ b/tester/presence_tester.c
@@ -62,7 +62,8 @@ void notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf) {
case LinphoneStatusAltService: counters->number_of_LinphoneStatusMoved++; break;
case LinphoneStatusPending: counters->number_of_LinphoneStatusPending++; break;
case LinphoneStatusEnd: counters->number_of_LinphoneStatusEnd++; break;
-
+ default:
+ break;
}
}