private IQ receiveSessionAcceptAction ( Jingle jingle , JingleDescription description ) throws JingleException { IQ response = null ; PayloadType . Audio agreedCommonAudioPt ; if ( bestCommonAudioPt == null ) { // Update the best common audio PT bestCommonAudioPt = calculateBestCommonAudioPt ( remoteAudioPts ) ; // response = createAcceptMessage(); } List < PayloadType > offeredPayloads = description . getAudioPayloadTypesList ( ) ; if ( ! offeredPayloads . isEmpty ( ) ) { if ( offeredPayloads . size ( ) == 1 ) { agreedCommonAudioPt = ( PayloadType . Audio ) offeredPayloads . get ( 0 ) ; if ( bestCommonAudioPt != null ) { // If the accepted PT matches the best payload // everything is fine if ( ! agreedCommonAudioPt . equals ( bestCommonAudioPt ) ) { throw new JingleException ( JingleError . NEGOTIATION_ERROR ) ; } } } else if ( offeredPayloads . size ( ) > 1 ) { throw new JingleException ( JingleError . MALFORMED_STANZA ) ; } } return response ; }
A jmf description has been accepted . In this case we must save the accepted payload type and notify any listener ...