public FireableEventType getEventId ( EventLookupFacility eventLookupFacility , Response response ) { String statusCodeName = null ; final int responseStatus = response . getStatusCode ( ) ; if ( responseStatus == 100 ) { statusCodeName = "TRYING" ; } else if ( 100 < responseStatus && responseStatus < 200 ) { statusCodeName = "PROVISIONAL" ; } else if ( responseStatus < 300 ) { statusCodeName = "SUCCESS" ; } else if ( responseStatus < 400 ) { statusCodeName = "REDIRECT" ; } else if ( responseStatus < 500 ) { statusCodeName = "CLIENT_ERROR" ; } else if ( responseStatus < 600 ) { statusCodeName = "SERVER_ERROR" ; } else { statusCodeName = "GLOBAL_FAILURE" ; } // in dialog responses use the 1.1 event id prefix return getEventId ( eventLookupFacility , new StringBuilder ( RESPONSE_EVENT_PREFIX ) . append ( statusCodeName ) . toString ( ) ) ; }
Retrieves the event id for a SIP Response event .