FS-3758 --resolve ok so I wrote my own patch but i did borrow the 2 lines of code to create a seq from the original patch! sofia changes probably need to be converted to a tag if they are to go upstream. This completely manages sub/pub from inside mod_sofia inside the db and subs can now persist and/or fail over mid dialog tested on several things like polycom/snom/yealink on SLA and presence

This commit is contained in:
Anthony Minessale
2011-12-15 16:30:33 -06:00
parent e164b76caf
commit e9bde2eb0e
9 changed files with 314 additions and 723 deletions
@@ -827,10 +827,10 @@ static int nua_notify_usage_shutdown(nua_handle_t *nh,
nua_dialog_usage_t *du)
{
struct notifier_usage *nu = nua_dialog_usage_private(du);
nua_client_request_t *cr = du->du_cr;
//nua_client_request_t *cr = du->du_cr;
nu->nu_substate = nua_substate_terminated;
#if 0
if (cr) {
SU_DEBUG_5(("%s(%p, %p, %p): using existing cr=%p\n",
"nua_notify_usage_shutdown",
@@ -852,7 +852,7 @@ static int nua_notify_usage_shutdown(nua_handle_t *nh,
TAG_END()) >= 0)
return 0;
}
#endif
nua_dialog_usage_remove(nh, ds, du, NULL, NULL);
return 200;
}
@@ -158,14 +158,15 @@ int nua_stack_process_request(nua_handle_t *nh,
/* These must be in-dialog */
sm = NULL;
}
else if (initial && sip->sip_to->a_tag) {
else if (initial && sip->sip_to->a_tag && method != sip_method_subscribe) {
/* RFC 3261 section 12.2.2:
If the UAS wishes to reject the request because it does not wish to
recreate the dialog, it MUST respond to the request with a 481
(Call/Transaction Does Not Exist) status code and pass that to the
server transaction.
*/
*/ /* we allow this on subscribes because we have disabled the built-in notify server and we need those messages in the application layer */
if (method == sip_method_info)
/* accept out-of-dialog info */; else
if (method != sip_method_message || !NH_PGET(nh, win_messenger_enable))