Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 323141) +++ channels/chan_sip.c (working copy) @@ -23955,7 +23955,7 @@ } p->subscribed = MWI_NOTIFICATION; - if (ast_test_flag(&authpeer->flags[1], SIP_PAGE2_SUBSCRIBEMWIONLY)) { + if (!ast_test_flag(&authpeer->flags[1], SIP_PAGE2_SUBSCRIBEMWIONLY)) { add_peer_mwi_subs(authpeer); } if (authpeer->mwipvt && authpeer->mwipvt != p) { /* Destroy old PVT if this is a new one */ Index: main/event.c =================================================================== --- main/event.c (revision 323141) +++ main/event.c (working copy) @@ -444,6 +444,7 @@ }; const enum ast_event_type event_types[] = { type, AST_EVENT_ALL }; int i; + int has_check = 0; if (type >= AST_EVENT_TOTAL) { ast_log(LOG_ERROR, "%u is an invalid type!\n", type); @@ -493,6 +494,7 @@ if (insert) { AST_LIST_INSERT_TAIL(&check_ie_vals.ie_vals, ie_value, entry); + has_check++; } else { ast_log(LOG_WARNING, "Unsupported PLTYPE(%d)\n", ie_value->ie_pltype); } @@ -503,7 +505,7 @@ AST_RWDLLIST_RDLOCK(&ast_event_subs[event_types[i]]); AST_RWDLLIST_TRAVERSE(&ast_event_subs[event_types[i]], sub, entry) { AST_LIST_TRAVERSE(&sub->ie_vals, ie_val, entry) { - if (!match_sub_ie_val_to_event(ie_val, &check_ie_vals)) { + if (has_check && !match_sub_ie_val_to_event(ie_val, &check_ie_vals)) { /* The current subscription ie did not match an event ie. */ break; }