< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate-users] Does resip support in-dialog notify ?


Hi, when my UA received an in-dialog NOTIFY, the DUM replied 406, please see attached log.

It's seems the 406 is send from Dialog::dispatch(const SipMessage& msg):


         case NOTIFY:
            {
               ClientSubscription* client = findMatchingClientSub(request);
               if (client)
               {
                  client->dispatch(request);
               }
               else
               {
                  BaseCreator* creator = mDialogSet.getCreator();
                  if (creator && (creator->getLastRequest()->header(h_RequestLine).method() == SUBSCRIBE ||
                     creator->getLastRequest()->header(h_RequestLine).method() == REFER))  
                  {
                     DebugLog (<< "Making subscription (from creator) request: " << *creator->getLastRequest());
                     ClientSubscription* sub = makeClientSubscription(*creator->getLastRequest());
                     mClientSubscriptions.push_back(sub);
                     sub->dispatch(request);
                  }
                  else
                  {
                     if (mInviteSession != 0 && (!msg.exists(h_Event) || msg.header(h_Event).value() == "refer") && 
                         mDum.getClientSubscriptionHandler("refer")!=0) 
                     {
                        DebugLog (<< "Making subscription from NOTIFY: " << msg);
                        ClientSubscription* sub = makeClientSubscription(msg);
                        mClientSubscriptions.push_back(sub);
                        ClientSubscriptionHandle client = sub->getHandle();
                        mDum.mInviteSessionHandler->onReferAccepted(mInviteSession->getSessionHandle(), client, msg);      
                        sub->dispatch(request);
                     }
                     else
                     {
                        SharedPtr<SipMessage> response(new SipMessage);
                        makeResponse(*response, msg, 406);
                        send(response);
                     }
                  }
               }
            }
            break;


I have been added the events in my UA:

void UserAgent::setDefaultEvents()
{
Data customEvent("refer");
mDum->addClientSubscriptionHandler(customEvent, this);

customEvent = "talk";
mDum->addClientSubscriptionHandler(customEvent, this);
mDum->addServerSubscriptionHandler(customEvent, this);

customEvent = "hold";
mDum->addClientSubscriptionHandler(customEvent, this);
mDum->addServerSubscriptionHandler(customEvent, this);

customEvent = "conference";
mDum->addClientSubscriptionHandler(customEvent, this);
mDum->addServerSubscriptionHandler(customEvent, this);

customEvent = "presence";
mDum->addClientSubscriptionHandler(customEvent, this);
mDum->addServerSubscriptionHandler(customEvent, this);
mDum->addClientPublicationHandler(customEvent, this);

Data messageSummaryEvent("message-summary");
mDum->addClientSubscriptionHandler(messageSummaryEvent, this);

}

How can I fix it ?

Thanks!
[...trace elided...]