UtlBoolean SipDialogMgr::earlyDialogExistsFor(const char* establishedDialogHandle) { UtlBoolean foundDialog = FALSE; UtlString handle(establishedDialogHandle ? establishedDialogHandle : ""); // If we have an established dialog handle if(!SipDialog::isEarlyDialog(handle)) { lock(); // Looking for an dialog that matches this handle, if there // is not an exact match see if there is an early dialog // that matches the given presumably established dialog handle SipDialog* dialog = findDialog(handle, TRUE, // if established, match early dialog FALSE); // if early, match established dialog if(dialog && !dialog->isEarlyDialog()) { foundDialog = TRUE; } unlock(); } return(foundDialog); }
UtlBoolean SipDialogMgr::getEstablishedDialogHandleFor(const char* earlyDialogHandle, UtlString& establishedDialogHandle) { UtlBoolean foundDialog = FALSE; UtlString handle(earlyDialogHandle ? earlyDialogHandle : ""); lock(); // Looking for an dialog that matches this earlyHandle, if there // is not an exact match see if there is an established dialog // that matches SipDialog* dialog = findDialog(handle, FALSE, // if established, match early dialog TRUE); // if early, match established dialog if (dialog && !dialog->isEarlyDialog()) { dialog->getHandle(establishedDialogHandle); foundDialog = TRUE; } else { establishedDialogHandle = ""; } unlock(); return(foundDialog); }
UtlBoolean SipDialogMgr::earlyDialogExists(const char* dialogHandle) { UtlBoolean foundDialog = FALSE; UtlString handle(dialogHandle ? dialogHandle : ""); lock(); // Looking for an dialog that matches this handle, if there // is not an exact match see if there is an early dialog // that matches the given presumably established dialog handle SipDialog* dialog = findDialog(handle, TRUE, // if established, match early dialog FALSE); // if early, match established dialog // We only want early dialogs if(dialog && dialog->isEarlyDialog()) { foundDialog = TRUE; } unlock(); return(foundDialog); }