Пример #1
0
UtlBoolean SipDialogMgr::initialDialogExistsFor(const char* establishedDialogHandle)
{
    UtlBoolean foundDialog = FALSE;
    UtlString handle(establishedDialogHandle ? establishedDialogHandle : "");

    // If we have an established dialog handle
    if(!SipDialog::isInitialDialog(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->isInitialDialog())
        {
            foundDialog = TRUE;
        }
        unlock();
    }

    return(foundDialog);
}
Пример #2
0
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->isInitialDialog())
    {
        dialog->getDialogHandle(establishedDialogHandle);
        foundDialog = TRUE;
    }
    else
    {
        establishedDialogHandle = "";
    }
    unlock();

    return(foundDialog);

}
Пример #3
0
UtlBoolean SipDialogMgr::initialDialogExists(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->isInitialDialog())
    {
        foundDialog = TRUE;
    }

    unlock();

    return(foundDialog);
}