// error details for when the test fails: ' + a.format()' wouldn't
// work in the first parameter here:
assertTrue("Wait response error", a.waitOutgoingCallResponse(10000));
SipResponse resp = a.getLastReceivedResponse(); // watch for TRYING
int status_code = resp.getStatusCode();
while (status_code != Response.RINGING)
{
assertFalse("Unexpected final response, status = " + status_code,
status_code > 200);
assertFalse("Got OK but no RINGING", status_code == Response.OK);
a.waitOutgoingCallResponse(10000);
assertLastOperationSuccess("Subsequent response never received - "
+ a.format(), a);
resp = a.getLastReceivedResponse();
status_code = resp.getStatusCode();
}
// if you want operation error details in your test fail output,
// you have to invoke and complete the operation first: