diff --git a/channels/chan_sip.c b/channels/chan_sip.c index af79f4b683835e0998e8fac71a749f75c4947911..1808d92892e2f1e68928fdc7ff9b100e7c4f47d3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -14531,7 +14531,8 @@ static void state_notify_build_xml(struct state_notify_data *data, int full, con else ast_str_append(tmp, 0, "<status><basic>%s</basic></status>\n", (local_state != NOTIFY_CLOSED) ? "open" : "closed"); - if (allow_notify_user_presence(p) && (data->presence_state > 0)) { + if (allow_notify_user_presence(p) && (data->presence_state != AST_PRESENCE_INVALID) + && (data->presence_state != AST_PRESENCE_NOT_SET)) { ast_str_append(tmp, 0, "</tuple>\n"); ast_str_append(tmp, 0, "<tuple id=\"digium-presence\">\n"); ast_str_append(tmp, 0, "<status>\n");