[reSIProcate-users] InviteSession::reject Assertion '0' failed. How to handle multithread ?
Hi,
I have a problem with InviteSession usage.
I have an application based on resiprocate which has different sources
of event.
SipStack is one of them, but also two other sources which interacts with
initial client or server dialog.
Each source runs in a different thread and can interact with a SIP
dialog, by rejecting the call for instance.
My problem is syncronization with the ServerInviteSession state.
The application thread receives a new ServerSession commands from
InviteSessionHandler.
The application thread pushes a 100 provisional to dum using dum.post()
(which is later sent via ServerInviteSessionHandler)
The application thread receives an offer commands from InviteSessionHandler.
then in parallel :
The application thread wants to reject the call and schedule a
reject by pushing a reject command with dum::post()
The UAC cancels the call, the application threads receives an
onTerminated()
dum treats the reject command -> assert(0) because ServerInviteSession
is in state Terminated.
How should it be handled if I do not want to run everything in one thread ?
I could test the mState but it is private ...
Thanks.
Aurelien