src/plugins/rayo/src/java/com/sun/voip/server/CallSetupAgent.java
/**
     * Notification that a treatment has finished
     *
     * The state we are in determines what we do next.
     */
Notification that a treatment has finished
The state we are in determines what we do next.
Notification that a treatment has finished The state we are in determines what we do next .
public void treatmentDoneNotification(TreatmentManager treatmentManager) {
        if (Logger.logLevel >= Logger.LOG_MOREINFO) {
            Logger.println("Call " + callHandler 
		+ " treatment done notification, current state "
                + callState + " " + callHandler);
        }
        switch (getState()) {
        case CallState.INVITED:
            /*
             * When join confirmation is requested, we stay in the
             * CALL_PARTICIPANT_INVITED state until a dtmf key is pressed.
             * Then we change state to CALL_PARTICIPANT_ANSWERED and
             * fall through.
	     *
	     * XXX We need to make sure the treatment repeats enough times.
	     * If it finishes before we timeout, we'll treat the call as answered!
	     *
             */
	    if (reasonCallTerminated != null) {
		break;
	    }
            setState(CallState.ANSWERED);
        case CallState.ANSWERED:
	    /*
	     * Call answered treatment is done, we're ready for the conference
	     */
	    MediaInfo mediaInfo = 
		callHandler.getConferenceManager().getMediaInfo();
	    setState(CallState.ESTABLISHED,
		"ConferencePayload='" +  mediaInfo.getPayload() + "'"
		+ " BridgeIPAddress='" 
		+ Bridge.getPrivateHost() + "'");
            break;
	case CallState.ENDING:
	    /*
	     * Call end treatment is done, time to end the call
	     */
	    terminateCall();
	    done();
	    break;
	default:
	    Logger.error("Call " + callHandler 
		+ ":  unexpected state " + callState);
            break;
        }
    }
public void treatmentDoneNotification ( TreatmentManager treatmentManager ) { if ( Logger . logLevel >= Logger . LOG_MOREINFO ) { Logger . println ( "Call " + callHandler + " treatment done notification, current state " + callState + " " + callHandler ) ; } switch ( getState ( ) ) { case CallState . INVITED : /*
             * When join confirmation is requested, we stay in the
             * CALL_PARTICIPANT_INVITED state until a dtmf key is pressed.
             * Then we change state to CALL_PARTICIPANT_ANSWERED and
             * fall through.
	     *
	     * XXX We need to make sure the treatment repeats enough times.
	     * If it finishes before we timeout, we'll treat the call as answered!
	     *
             */ if ( reasonCallTerminated != null ) { break ; } setState ( CallState . ANSWERED ) ; case CallState . ANSWERED : /*
	     * Call answered treatment is done, we're ready for the conference
	     */ MediaInfo mediaInfo = callHandler . getConferenceManager ( ) . getMediaInfo ( ) ; setState ( CallState . ESTABLISHED , "ConferencePayload='" + mediaInfo . getPayload ( ) + "'" + " BridgeIPAddress='" + Bridge . getPrivateHost ( ) + "'" ) ; break ; case CallState . ENDING : /*
	     * Call end treatment is done, time to end the call
	     */ terminateCall ( ) ; done ( ) ; break ; default : Logger . error ( "Call " + callHandler + ":  unexpected state " + callState ) ; break ; } }
Notification that a treatment has finished
 The state we are in determines what we do next.
Notification that a treatment has finished The state we are in determines what we do next .