< Previous by Date Date Index  
< Previous in Thread Thread Index  

Re: [reSIProcate-users] Construct the mDocumentKey without port of request line


resip/dum provides the framework for DialogEvent package handling, but it does not include any dialog event subscription server code.  

The only place resip/dum calls applyToServerSubscriptions is for the presence server that it implements, and this appears to call with an AOR (that as far as I can see), that does include the port.

The issue may be in your custom code that implements your dialog state server.

Note:  An AOR typically should NOT include a port on it.

Best Regards,
Scott

On Mon, Aug 12, 2019 at 11:14 PM Roamer <roamer2998@xxxxxxxxx> wrote:
Currently the DUM constructs the mDocumentKey in BaseSubscription and ServerPublication with the URI of request line include the port.

But in the DialogEventStateManager, the onEarly and other onXX callbacks, the DUM pass  DialogEvent to these callbacks that URI without the port, that will causes the ApplyToServerSubscription doesn't sent the NOTIFY since can't find the range in the mServerSubscriptions, the elements with the port, but the key that without the port:

       // will apply the specified functor(which takes a
      //ServerSubscriptionHandle) to each matching ServerSubscription.  
      //Returns the functor after the last application.
      template<typename UnaryFunction>
      UnaryFunction applyToServerSubscriptions(const Data& aor, 
                                               const Data& eventType, 
                                               UnaryFunction applyFn)
      {
         Data key = eventType + aor; // The aor without port,
         std::pair<ServerSubscriptions::iterator,ServerSubscriptions::iterator> 
            range = mServerSubscriptions.equal_range(key); // Elements in mServerSubscriptions with port
         
         for (ServerSubscriptions::iterator i=range.first; i!=range.second; ++i)
         {
            ServerSubscriptionHandle h = i->second->getHandle();
            applyFn(h);
         }
         return applyFn;         
      } 

This issue occurs with below SUBSCRIBE message:

SUBSCRIBE sip:10001@192.168.1.102:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.223:5060;branch=z9hG4bK9213299;rport=5060
Max-Forwards: 70
Contact: <sip:10000@192.168.1.223:5060>
To: <sip:10001@xxxxxxxxxxx:5060>;tag=9f57fb76
From: "10000"<sip:10000@xxxxxxxxxxx:5060>;tag=2580923442
Call-ID: 0_837872518@192.168.1.223
CSeq: 3 SUBSCRIBE
Expires: 900
Accept: application/dialog-info+xml
Proxy-Authorization: Digest username="10000",realm="example.com",nonce="13210074173:d7c6f7877c76305975ac8736f95c85ae",uri="sip:10001@192.168.1.102:5060",response="a5bf59d0d780a83d4388407211a385d0",algorithm=MD5
User-Agent: Yealink SIP-T58 58.83.0.20 805ec0009c8c
Event: dialog
Content-Length: 0

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