I create a separate instance of this object for each presentity I want to subscribe to and call SendSubscribeL(). The
client is sent a NOTIFY for each SUBSCRIBE however the stack only reports the last NOTIFY sent by the server, ie for the
last SUBSCRIBE sent by the client.
My theory is that the stack is only aware of the last SUBSCRIBE it sends and so it reports the last NOTIFY received since
the call-Ids match?
The docs state you can have multiple CSIPSubscribeDialogAssoc per CSIPDialog however I do not use that constructor. I use
constructor which takes CSIPConnection From, To etc as there does not seem to be a way to manipulate To header otherwise.
The problem was behind the keyboard and in front of the screen
The stack does indeed support multiple concurrent CSIPSubscribeDialogAssoc objects.
Prior to sending each subscribe, I was checking for the existance of previous CSIPClientTransaction (which is returned by the SendSubscribeL method of CSIPSubscribeDialogAssoc ) and was deleting it to prevent memory leak... doh!
Since I was deleting the client Transaction the 200 OK for Subscribe was not reported by the stack and so neither was the corresponding NOTIFY... All works well now.
To prevent memory leak I add all the CSIPSubscribeDialogAssoc objects to an RPointerArray and all the CSIPClientTransaction objects to an RPointer array and call there ResetAndDestroy methods, and delete the arrays in class destructor...