亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? faststart.c

?? 基于h323協議的軟phone
?? C
?? 第 1 頁 / 共 4 頁
字號:
                {
                    getGoodAddressForCall((HCALL)call,rtp);
                    cmTAToVt_H245(hVal,tmpNodeId, rtp);
                }
                else
                    pvtDelete(hVal, tmpNodeId);

                tmpNodeId = pvtAddBranch(hVal, h2250ParametersNodeId, __h245(mediaControlChannel));
                if ((rtcp != NULL) && (rtcp->ip || rtcp->port))
                {
                    getGoodAddressForCall((HCALL)call,rtcp);
                    cmTAToVt_H245(hVal,tmpNodeId, rtcp);
                }
                else
                    pvtDelete(hVal, pvtGetChild(hVal, h2250ParametersNodeId, __h245(mediaControlChannel), NULL));
            }
        }
        ret = outOLCNodeId;

        emaUnlock((EMAElement)hsCall);
    }

    cmiAPIExit(hApp, "cmFastStartChannelsAckIndex: [%d]", ret);
    return ret;
}


RVAPI int RVCALLCONV
cmFastStartChannelsAck(
    IN HCALL                hsCall,
    IN cmFastStartChannel*  pFastChannel)
{
    int ret=1;
    callElem* call=(callElem*)hsCall;
    HAPP hApp=(HAPP)emaGetInstance((EMAElement)call);
    if (!hsCall || !hApp) return RV_ERROR_UNKNOWN;

    cmiAPIEnter(hApp, "cmFastStartChannelsAck: hsCall=0x%p",hsCall);
    if (emaLock((EMAElement)hsCall))
    {
        ret = cmFastStartChannelsAckIndex(hsCall,pFastChannel->index, &(pFastChannel->rtcp), &(pFastChannel->rtp));
        emaUnlock((EMAElement)hsCall);
    }

    cmiAPIExit(hApp, "cmFastStartChannelsAck: [%d]",ret);

    return ret;
}


RVAPI int RVCALLCONV
cmFastStartChannelsReady(IN HCALL hsCall)
{
    callElem* call=(callElem*)hsCall;
    HAPP hApp=(HAPP)emaGetInstance((EMAElement)call);
    if (!hsCall || !hApp) return RV_ERROR_UNKNOWN;

    cmiAPIEnter(hApp, "cmFastStartChannelsReady: hsCall=0x%p",hsCall);
    if (emaLock((EMAElement)hsCall))
    {
        H245Control *ctrl = (H245Control *)cmiGetControl(hsCall);
        int fastStartPrpd[2*MAX_FS_SESSION_ID];
        int i;
        int limit = RvMin(call->fastStartNodesAckCount, (2*MAX_FS_SESSION_ID));

        memset(fastStartPrpd, 0xff, sizeof(fastStartPrpd));
        for(i=0; i<limit; i++)
        {
            fastStartPrpd[i] = call->fastStartNodes[call->fastStartIndexes[i]];
        }

        if (cmCallFastStartOpenChannels((HCALL)hsCall, fastStartPrpd, call->fastStartNodesAck, RV_FALSE) >= 0)
        {
            /* Notify the application that the fast staart procedure is complete */
            cmiReportControl(hsCall,cmControlStateFastStartComplete,(cmControlStateMode)0);
        }

        m_callset(call, fastStartFinished, RV_TRUE);
        cmcReadyEvent(ctrl);
        emaUnlock((EMAElement)hsCall);
    }

    cmiAPIExit(hApp, "cmFastStartChannelsReady: [OK]");

    return RV_TRUE;
}

RVAPI int RVCALLCONV
cmFastStartChannelsRefuse(IN HCALL hsCall)
{
    callElem* call=(callElem*)hsCall;
    HAPP hApp=(HAPP)emaGetInstance((EMAElement)call);

    if ((hsCall == NULL) || (hApp == NULL))
        return RV_ERROR_NULLPTR;

    cmiAPIEnter(hApp, "cmFastStartChannelsRefuse: hsCall=0x%p",hsCall);
    if (emaLock((EMAElement)hsCall))
    {
        H245Control *ctrl = (H245Control *)cmiGetControl(hsCall);

        call->fastStartState = fssRej;
        m_callset(call, fastStartFinished, RV_TRUE);
        cmcReadyEvent(ctrl);
        emaUnlock((EMAElement)hsCall);
    }

    cmiAPIExit(hApp, "cmFastStartChannelsRefuse: [OK]");
    return RV_TRUE;
}

/******************************************************************************************
 * cmFastStartReply
 *
 * Purpose:  This function is called from the CM whenever a response message after SETUP
 *           is received (CallProceeding, Alerting, Connect, Facility and Progress).
 *           It checks for FastStart response. If such exists, it processes it and opens
 *           the relevant channels.
 *
 * Input:    call       - call object instance
 *           uuNodeId   - UserUser node ID of the message
 *
 * Reurned Value: Non-negative value on success
 *                Negative value on failure
 ****************************************************************************************/
int cmFastStartReply(
    IN callElem*    call,
    IN int          uuNodeId)
{
    cmElem*app=(cmElem*)emaGetInstance((EMAElement)call);
    H245Control *ctrl=(H245Control *)cmiGetControl((HCALL)call);
    HPVT hVal=app->hVal;
    int fsNodeId;
    RvBool fsChannelsExist;
    int  rc;

    /* Are we in the right fast-start state? */
    if ((call->fastStartState==fssAck) || (call->fastStartState==fssRej))
        return RV_ERROR_UNKNOWN;

    /* Make sure we've got fast start information here and get the first one */
    fsNodeId=pvtGetChild(hVal,uuNodeId,__q931(fastStart),NULL);
    fsChannelsExist = (fsNodeId >= 0);
    fsNodeId=pvtChild(hVal, fsNodeId);

    /* Loop through all of the acknowledgements and put them into the call's structure */
    while (fsNodeId >= 0)
    {
        RvUint8* encodeBuffer;
        int length;
        int decoded_length;
        int chanMsgId;
        int decodingResult;

        /* Decode a single OLC.Ack message */
        chanMsgId = pvtAddRoot(hVal, app->synOLC, 0, NULL);
        getEncodeDecodeBuffer(app->encodeBufferSize, &encodeBuffer);
        length=pvtGetString(hVal, fsNodeId, app->encodeBufferSize, (char*)encodeBuffer);

        decodingResult = cmEmDecode(hVal, chanMsgId, encodeBuffer, length, &decoded_length);
        if (decodingResult < 0)
        {
            pvtDelete(hVal, chanMsgId);
            chanMsgId = -1;
        }

        RvH323CmPrintMessage(&app->logFastStart, "Accepted faststart channel decoded:",
            hVal, chanMsgId, encodeBuffer, decoded_length, RV_TRUE);

        if (decodingResult >= 0)
        {
            /* Add the decoded OLC.Ack into the fast start acknowledgments of the call */
            call->fastStartNodesAck[call->fastStartNodesAckCount++] = chanMsgId;
        }

        /* Goto the next one in the next entry to the while loop */
        if (call->fastStartNodesAckCount == app->maxFsAccepted)
            /* array is maxFsAccepted+1 size, must leave the last one -1 */
            break;
        fsNodeId=pvtBrother(hVal, fsNodeId);
    }

    if (fsChannelsExist)
    {
        rc = cmCallFastStartOpenChannels((HCALL)call, call->fastStartNodes, call->fastStartNodesAck, RV_TRUE);

        /* Notify the application that the fast staart procedure is complete */
        cmiReportControl((HCALL)call,cmControlStateFastStartComplete,(cmControlStateMode)0);

        m_callset(call, fastStartFinished, RV_TRUE);
        cmcReadyEvent(ctrl);
    }
    else
        rc = RV_ERROR_UNKNOWN;

    return rc;
}

void deleteFastStart(callElem*call)
{
    cmElem*app=(cmElem*)emaGetInstance((EMAElement)call);
    int i;
    for (i=0;i<call->fastStartNodesCount;i++)
    {
        pvtDelete(app->hVal,call->fastStartNodes[i]);
        call->fastStartNodes[i]=RV_ERROR_UNKNOWN;
    }
    call->fastStartNodesCount=0;
    for (i=0;i<call->fastStartNodesAckCount;i++)
    {
        pvtDelete(app->hVal,call->fastStartNodesAck[i]);
        call->fastStartNodesAck[i]=RV_ERROR_UNKNOWN;
    }
    call->fastStartNodesAckCount=0;
}


/******************************************************************************************
 * addFastStart
 *
 * Purpose:  This function adds the fast start messages that are stored on the call
 *           to an outgoing message
 *
 * Input:    call       - call object instance
 *           message    - message's root node ID to add fast start information to
 *
 * Reurned Value: none
 ****************************************************************************************/
void addFastStart(
    IN callElem*    call,
    IN int          message)
{
    cmElem*app=(cmElem*)emaGetInstance((EMAElement)call);
    HPVT hVal=app->hVal;
    int nodeCount,*nodes;

    /* See which side is it - we need to know which fast start node to add */
    if (m_callget(call, callInitiator))
    {
        /* Initiator of the call */
        nodeCount = call->fastStartNodesCount;
        nodes = call->fastStartNodes;

        /* Make sure it's a setup message - otherwise we shouldn't add the fast start nodes */
        if (pvtGetChildTagByPath(hVal,message,"message",1) != cmQ931setup)
            return;
    }
    else
    {
        if(call->fastStartState == fssRej)
        {
            int tmpNodeId;
            /* reject the fast start - was approved with no channels */
            __pvtBuildByFieldIds(tmpNodeId, hVal, message,
                {_q931(message)
                _anyField
                _q931(userUser)
                _q931(h323_UserInformation)
                _q931(h323_uu_pdu)
                _q931(h323_message_body)
                _anyField
                _q931(fastConnectRefused)
                LAST_TOKEN},0,NULL);
            return;
        }
        /* Destination of the call sends Ack nodes */
        nodeCount = call->fastStartNodesAckCount;
        nodes = call->fastStartNodesAck;
    }

    if (nodeCount > 0)
    {
        /* We have fast start nodes - go through them and add them in */
        int i;
        RvPvtNodeId tmpNodeId;

        /* first, we'll check if we already have a fast start field in the message */
        __pvtGetByFieldIds(tmpNodeId, hVal, message,
            {_q931(message) _anyField _q931(userUser) _q931(h323_UserInformation) _q931(h323_uu_pdu)
            _q931(h323_message_body) _anyField _q931(fastStart) LAST_TOKEN},NULL,NULL,NULL);
        if (RV_PVT_NODEID_IS_VALID(tmpNodeId))
        {
            /* we have a FS element in the message already. this may be because the call was transferred,
            or it may be because the user used setParam() to set a faststart element. we can do one of 
            two things: either delete the node and put our own FS content, or we could keep the existing
            FS and return. adding to the current FS message is out of the question. */
#if 1
            /* we assume that the user will not use both setParam() and FS functions, or that this is a
            transfer, and we better update our information */
            pvtDelete(hVal, tmpNodeId);
#else
            /* we assume that we should keep whatever was set, and leave things up to the user */
            return;
#endif
        }

            /* Build the fast start SEQUENCE OF node */
        __pvtBuildByFieldIds(tmpNodeId, hVal, message,
                    {_q931(message)
                     _anyField
                     _q931(userUser)
                     _q931(h323_UserInformation)
                     _q931(h323_uu_pdu)
                     _q931(h323_message_body)
                     _anyField
                     _q931(fastStart)
                     LAST_TOKEN},0,NULL);

        for (i = 0; i < nodeCount; i++)
        {
            int iBufLen;
            RvUint8* encodeBuffer;

            getEncodeDecodeBuffer(app->encodeBufferSize, &encodeBuffer);

            /* Encode a faststart proposal/acceptance */
            if (cmEmEncode(hVal, nodes[i], encodeBuffer, app->encodeBufferSize, &iBufLen) >= 0)
            {
                /* That's it, now we can add the encoded OLC message to the SETUP message */
                pvtAdd(hVal, tmpNodeId, -800, iBufLen, (char*)encodeBuffer, NULL);
            }
            else
                iBufLen = -1;

            RvH323CmPrintMessage(&app->logFastStart,
                m_callget(call,callInitiator) ? "Suggested faststart channel encoded:":"Accepted faststart channel encoded:",
                hVal, nodes[i], encodeBuffer, iBufLen, RV_FALSE);
        }
    }
}



/************************************************************************
 * cmCallFastStartOpenChannels
 * purpose: Set the answered information to be sent for a fast start
 *          proposal and open the channels on the destination side of the
 *          call. This function should be called after receiving
 *          cmEvCallFastStart() or cmEvCallFastStartSetup().
 *          It is automatically called on the initiator of the call.
 * input  : hsCall      - Call to use
 *          proposed    - List of proposed channels. This list is searched for
 *                        their RTP and RTCP addresses.
 *                        Each parameter in this list is a root node of an
 *                        OpenLogicalChannel message to propose in faststart
 *                        The last element in this list should be a negative value.
 *          accepted    - List of accepted channels.
 *                        Each paramenter in this list is a root node of an
 *                        OpenLogicalChannel message sent to the origin of the call
 *                        by this endpoint.
 *                        The last element in this list should be a negative value.
 *          origin      - RV_TRUE if this application is the origin of the call
 *                        RV_FALSE if this application is not the origin of the call
 * output : none
 * return : non-negative value on success
 *          negative value on failure

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品黄色| 国产成人午夜99999| 精品亚洲国内自在自线福利| 丁香天五香天堂综合| 欧美另类久久久品| 一区二区中文字幕在线| 麻豆国产欧美日韩综合精品二区| 一本色道久久加勒比精品| 久久先锋资源网| 日韩成人dvd| 色妞www精品视频| 中文在线一区二区| 国精品**一区二区三区在线蜜桃| 欧美三级资源在线| 最新久久zyz资源站| 国产精品996| 精品日韩在线观看| 免费观看在线综合色| 欧美午夜影院一区| 亚洲免费伊人电影| 99精品在线免费| 国产精品三级电影| 国产成人综合亚洲网站| 欧美成人精品福利| 蜜臀久久99精品久久久画质超高清| 在线看国产日韩| 亚洲精品国产第一综合99久久| 国产成人8x视频一区二区| 欧美sm极限捆绑bd| 国产一区二区在线观看视频| 精品日韩欧美在线| 久久99热国产| 精品毛片乱码1区2区3区| 免费成人美女在线观看| 欧美一区二区日韩一区二区| 日产国产高清一区二区三区 | 制服视频三区第一页精品| 一区二区三区视频在线看| 91在线观看地址| 亚洲美女偷拍久久| 欧美视频在线一区二区三区| 亚洲bt欧美bt精品| 538prom精品视频线放| 日本在线播放一区二区三区| 日韩欧美国产高清| 韩国三级中文字幕hd久久精品| 亚洲精品一区二区三区四区高清 | 欧美日韩性生活| 午夜亚洲福利老司机| 337p亚洲精品色噜噜狠狠| 日韩高清在线一区| 精品国产亚洲在线| 粉嫩久久99精品久久久久久夜| 国产精品免费久久| 91丨porny丨在线| 亚洲亚洲精品在线观看| 日韩一区二区影院| 国产成人精品免费看| 亚洲三级电影全部在线观看高清| 91麻豆精品视频| 日韩av中文在线观看| 久久精品欧美一区二区三区不卡 | 91精品国产综合久久精品| 韩国毛片一区二区三区| 国产精品国产自产拍高清av王其| 色综合色狠狠综合色| 热久久国产精品| 日本一二三四高清不卡| 欧美女孩性生活视频| 国产乱子伦一区二区三区国色天香| 中文字幕av一区二区三区免费看| 欧美影院一区二区| 国产精品99久久久久久有的能看| 亚洲自拍偷拍欧美| 久久影音资源网| 欧美亚洲高清一区二区三区不卡| 裸体健美xxxx欧美裸体表演| 中文字幕一区二区视频| 在线不卡一区二区| 成人免费的视频| 欧美aaa在线| 自拍偷自拍亚洲精品播放| 日韩一区二区三免费高清| 91在线视频在线| 国产一区二区久久| 偷拍与自拍一区| 亚洲欧洲精品一区二区精品久久久 | 亚洲高清视频中文字幕| 久久女同精品一区二区| 欧美日韩你懂得| 在线免费精品视频| 成人性生交大片免费看在线播放| 丝袜美腿亚洲一区二区图片| 国产精品电影一区二区| 久久在线观看免费| 日韩亚洲欧美成人一区| 欧美日韩小视频| 一本一道综合狠狠老| 成人午夜电影久久影院| 国内成人免费视频| 久久成人免费网站| 日韩成人午夜精品| 日日夜夜精品免费视频| 一区二区三区高清不卡| 亚洲欧美偷拍三级| 中文字幕成人av| 国产精品欧美一级免费| 久久久亚洲午夜电影| 91精品国产综合久久小美女| 欧美午夜精品一区二区蜜桃 | 国产一区二区三区综合| 日本一不卡视频| 午夜久久福利影院| 视频一区二区三区在线| 一区二区国产视频| 亚洲综合色在线| 午夜日韩在线电影| 亚洲午夜激情网站| 午夜精品免费在线| 亚洲国产成人av好男人在线观看| 亚洲精品乱码久久久久久 | 欧美日韩国产欧美日美国产精品| 91精彩视频在线| 欧美日韩一区二区三区免费看| 欧美日韩中文精品| 欧美日韩黄色影视| 欧美一级爆毛片| 久久久亚洲精华液精华液精华液 | 国产精品一区二区久久不卡| 国产在线乱码一区二区三区| 国产一区亚洲一区| 国产盗摄一区二区三区| 99久久久无码国产精品| 色噜噜狠狠色综合欧洲selulu| 欧美视频一区二| 欧美电影精品一区二区| 国产无一区二区| 亚洲男人的天堂一区二区| 性做久久久久久免费观看欧美| 久久精品国产亚洲一区二区三区| 国产一区二区三区在线观看免费 | 欧美剧在线免费观看网站| 日韩亚洲欧美中文三级| 亚洲国产精品黑人久久久| 亚洲欧美日本在线| 免费在线观看不卡| 成人av网在线| 717成人午夜免费福利电影| 国产亚洲欧洲一区高清在线观看| ...xxx性欧美| 另类综合日韩欧美亚洲| av在线免费不卡| 91精品国产91久久综合桃花| 欧美国产日韩在线观看| 亚洲成人动漫精品| 国产成人在线视频免费播放| 在线精品亚洲一区二区不卡| 久久亚洲精品小早川怜子| 一区二区三区四区在线免费观看 | 91色九色蝌蚪| 精品欧美一区二区在线观看| 中文字幕一区二区三区精华液 | 欧美一区日本一区韩国一区| 国产精品婷婷午夜在线观看| 日韩电影免费一区| 91年精品国产| 久久精品一二三| 日本三级亚洲精品| 日本黄色一区二区| 亚洲国产精品成人综合| 美腿丝袜亚洲综合| 欧美午夜影院一区| 国产精品久久久久9999吃药| 毛片不卡一区二区| 在线视频一区二区三| 欧美激情一区二区三区在线| 免费成人小视频| 欧美日本乱大交xxxxx| 国产精品传媒入口麻豆| 激情五月婷婷综合网| 欧美日韩视频第一区| 亚洲另类春色国产| 风间由美一区二区三区在线观看| 欧美一二区视频| 午夜激情久久久| 一本色道久久综合精品竹菊| 国产精品理论在线观看| 国产一区二区在线观看免费| 欧美一区二区三区在线| 亚洲国产一区二区视频| 色香蕉成人二区免费| 国产精品白丝在线| 成人丝袜高跟foot| 久久久久久久久久看片| 激情欧美日韩一区二区| 精品欧美一区二区久久| 狠狠狠色丁香婷婷综合激情| 日韩女优电影在线观看| 毛片一区二区三区| 久久美女艺术照精彩视频福利播放|