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

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


The problem appears to be that you're receiving a NOTIFY but you never sent a SUBSCRIBE. This isn't allowed. It would appear that Samsung is doing something that's not really SIP.

You could hack logic into this segment of code that forces a subscription to magically appear when you get one of these nonstandard Samsung almost-but-not-quite-SIP messages -- it would look a lot like the logic for REFER that appears just above the section you've highlighted. You'll want to make sure you understand how subscription lifetimes are managed in resip, and ensure that you don't leak this subscription when the dialog terminates (this might be okay as-is, but you'll want to check to be sure).

It would be much better if you could figure out how to get the Samsung device that you're talking to to operate in a more standard way.

/a



On 6/6/16 11:27 AM, Karlsson wrote:
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!


_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/