src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java
/**
     * Handles the start and end of the <tt>Call</tt>s this policy applies to in
     * order to have them or stop having them put the other existing calls on
     * hold when the former change their states to
     * <tt>CallState.CALL_IN_PROGRESS</tt>.
     * <p>
     * Also handles call rejection via "busy here" according to the call policy.
     * </p>
     *
     * @param type one of {@link CallEvent#CALL_ENDED},
     * {@link CallEvent#CALL_INITIATED} and {@link CallEvent#CALL_RECEIVED}
     * which describes the type of the event to be handled
     * @param call the <tt>Call</tt> instance.
     */
Handles the start and end of the Calls this policy applies to in
order to have them or stop having them put the other existing calls on
hold when the former change their states to
CallState.CALL_IN_PROGRESS.

Also handles call rejection via "busy here" according to the call policy.

@param type one of  CallEvent#CALL_ENDED,
CallEvent#CALL_INITIATED and  CallEvent#CALL_RECEIVED
which describes the type of the event to be handled
@param call the Call instance.
Handles the start and end of the Calls this policy applies to in order to have them or stop having them put the other existing calls on hold when the former change their states to CallState . CALL_IN_PROGRESS . Also handles call rejection via " busy here " according to the call policy . @param type one of CallEvent#CALL_ENDED CallEvent#CALL_INITIATED and CallEvent#CALL_RECEIVED which describes the type of the event to be handled @param call the Call instance .
private void handleCallEvent(int type, Call call)
    {
        if(logger.isTraceEnabled())
        {
            logger.trace("Call event fired.");
        }
        switch (type)
        {
        case CallEvent.CALL_ENDED:
            removeCallListener(call);
            break;
        case CallEvent.CALL_INITIATED:
        case CallEvent.CALL_RECEIVED:
            addCallListener(call);
            break;
        }
        /*
         * Forward to onThePhoneStatusPolicy for which we are proxying the
         * Call-related events.
         */
        onThePhoneStatusPolicy.handleCallEvent(type, call);
    }
private void handleCallEvent ( int type , Call call ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Call event fired." ) ; } switch ( type ) { case CallEvent . CALL_ENDED : removeCallListener ( call ) ; break ; case CallEvent . CALL_INITIATED : case CallEvent . CALL_RECEIVED : addCallListener ( call ) ; break ; } /*
         * Forward to onThePhoneStatusPolicy for which we are proxying the
         * Call-related events.
         */ onThePhoneStatusPolicy . handleCallEvent ( type , call ) ; }
Handles the start and end of the <tt>Call</tt>s this policy applies to in
 order to have them or stop having them put the other existing calls on
 hold when the former change their states to
 <tt>CallState.CALL_IN_PROGRESS</tt>.
Handles the start and end of the <tt > Call< / tt > s this policy applies to in order to have them or stop having them put the other existing calls on hold when the former change their states to <tt > CallState . CALL_IN_PROGRESS< / tt > .