Пример #1
0
void printCallSummary(CC_DevicePtr devicePtr)
{
    if (devicePtr == NULL)
    {
        return;
    }

    CC_DeviceInfoPtr deviceInfoPtr = devicePtr->getDeviceInfo();

    if (deviceInfoPtr == NULL)
    {
        return;
    }

    vector<CC_CallPtr> calls = deviceInfoPtr->getCalls();

    CSFLogDebugS(logTag, " List of all calls ");
    for (vector<CC_CallPtr>::iterator it = calls.begin(); it != calls.end(); it++)
    {
        CC_CallPtr call = *it;

        if (call==NULL)
        {
            continue;
        }

        CC_CallInfoPtr callInfoPtr = call->getCallInfo();

        if (callInfoPtr==NULL)
        {
            continue;
		}
        bool audioMute = callInfoPtr->isAudioMuted();
        bool videoMute = callInfoPtr->isVideoMuted();
        
        PRINT_OFFSET_1;
        PRINT_EVENT_INFO_NICELY_USING_GETNAME("CallState", callInfoPtr, getCallState, call_state_getname);
        PRINT_OFFSET_1;
        PRINT_EVENT_INFO_NICELY_USING_GETNAME("CallType", callInfoPtr, getCallType, call_type_getname);
        PRINT_OFFSET_1;
        PRINT_EVENT_INFO_NICELY_USING_GETNAME("VideoDirection", callInfoPtr, getVideoDirection, sdp_direction_getname);
        PRINT_OFFSET_1;
        CSFLogDebugS(logTag, "(AudioMute ");
        CSFLogDebugS(logTag, "----------");
        CSFLogDebug(logTag, " %s )", (audioMute) ? "true" : "false");
        PRINT_OFFSET_1;
        CSFLogDebugS(logTag, "(VideoMute ");
        CSFLogDebugS(logTag, "----------");
        CSFLogDebug(logTag, " %s )", (videoMute) ? "true" : "false");
        PRINT_OFFSET_1;
        printCallPartiesInfo(callInfoPtr);
        PRINT_OFFSET_1;
        CSFLogDebugS(logTag, "(CallCaps ");
        CSFLogDebugS(logTag, "----------");
        printCallCapabilities(callInfoPtr, WRAPPED_LINE_ALIGNMENT_OFFSET_2);

    }//end for (calls)
    CSFLogDebugS(logTag, "End of List");
}
Пример #2
0
static void handleUnmuteAudioForFirstConnectedCall (CallControlManagerPtr ccmPtr)
{
    CC_CallPtr call = getFirstCallInGivenState(ccmPtr, CONNECTED);

    if (call != NULL)
    {
    	CSFLogDebugS(logTag, "Unmuting (audio) 1st connected call...");
    	if (!call->unmuteAudio())
    	{
    		CSFLogDebugS(logTag, "Attempt to unmute (audio) failed.");
    	}
        CC_CallInfoPtr info = call->getCallInfo();
        if (info->isAudioMuted())
        {
            // note that when CTI adds mute it might fail here, because the setAudioMute will not be a synchronous call
            // So we might change this check for CTI when that time comes.
        	CSFLogDebugS(logTag, "MUTE FAILED TO BE REFLECTED IN CALL INFO");
        }
    }
    else
    {
    	CSFLogDebugS(logTag, "No calls exist that can be unmuted (audio).");
    }
}