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

[reSIProcate-users] No onTerminated callback getting called after CANCEL


Experts,

I have a program using DUM that is sending an INVITE, waiting 10 seconds, and then CANCELling (using the AppDialogSet::end() function).  If I try it against two different gateways, my program behaves as expected with one of them, and misbehaves on the other.  Here's what happens:

Gateway 1: Working gateway.

-> INVITE
<- 100 Trying
<- 183 Session Progress
<- 180 Ringing
-> CANCEL
<- 487 Request Terminated (response to the INVITE)
<- 200 OK (response to the CANCEL)
onTerminated() is called at about this point.

Gateway 2: Misbehaving gateway
-> INVITE
<- 100 Trying
<- 180 Ringing
-> CANCEL
<- 200 OK (response to the CANCEL)
<- 487 Request Terminated (response to the INVITE)
onTerminated() is never called

The two big differences between the behavior of the two gateways are:
  (1) The second, misbehaving gateway is not sending a 183 message.
  (2) The second, misbehaving gateway sends a 200 OK to the CANCEL before sending 487 Request Terminated.

I can imagine that this problem has something to do with the Dialog being in the early state or not, and thus #1 above is the culprit.  But am I missing something here?  Is there another callback (other than OnTerminated) that I should be looking for?

thanks,
  Shaun