// in the Dialog
// Table
// This happens before the dialog state is assigned.
if (!dialog.testAndSetIsDialogTerminatedEventDelivered()) {
DialogTerminatedEvent event = new DialogTerminatedEvent(dialog
.getSipProvider(), dialog);
// Provide notification to the listener that the dialog has
// ended.
dialog.getSipProvider().handleEvent(event, null);
}
} else if ( this.isDialogTerminatedEventDeliveredForNullDialog ) {
if (!dialog.testAndSetIsDialogTerminatedEventDelivered()) {
DialogTerminatedEvent event = new DialogTerminatedEvent(dialog
.getSipProvider(), dialog);
// Provide notification to the listener that the dialog has
// ended.
dialog.getSipProvider().handleEvent(event, null);