FS-4561 send notify with terminate state when we get a SUBSCRIBE with expires 0
This commit is contained in:
parent
7da8e15e96
commit
60cd56d1fc
|
@ -3632,6 +3632,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||||
switch_safe_free(sql);
|
switch_safe_free(sql);
|
||||||
|
|
||||||
sstr = switch_mprintf("terminated;reason=noresource");
|
sstr = switch_mprintf("terminated;reason=noresource");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
sip_accept_t *ap = sip->sip_accept;
|
sip_accept_t *ap = sip->sip_accept;
|
||||||
char accept[256] = "";
|
char accept[256] = "";
|
||||||
|
@ -3733,6 +3734,13 @@ void sofia_presence_handle_sip_i_subscribe(int status,
|
||||||
|
|
||||||
switch_safe_free(new_contactstr);
|
switch_safe_free(new_contactstr);
|
||||||
switch_safe_free(sticky);
|
switch_safe_free(sticky);
|
||||||
|
|
||||||
|
if (sub_state == nua_substate_terminated) {
|
||||||
|
nua_notify(nh,
|
||||||
|
SIPTAG_EXPIRES_STR("0"),
|
||||||
|
SIPTAG_SUBSCRIPTION_STATE_STR(sstr),
|
||||||
|
TAG_END());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sub_state == nua_substate_terminated) {
|
if (sub_state == nua_substate_terminated) {
|
||||||
|
|
Loading…
Reference in New Issue