Created
September 13, 2014 16:05
-
-
Save arslan70/2095639897a52efe595f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void processResponse(ResponseEvent arg0) { | |
Response response = (Response) arg0.getResponse(); | |
ClientTransaction tid = arg0.getClientTransaction(); | |
System.out.println(response.getStatusCode()); | |
if (response.getStatusCode() == Response.PROXY_AUTHENTICATION_REQUIRED | |
|| response.getStatusCode() == Response.UNAUTHORIZED) { | |
AuthenticationHelper authenticationHelper = ((SipStackExt) sipStack) | |
.getAuthenticationHelper(new AccountManagerImpl(), | |
headerFactory); | |
try { | |
ClientTransaction inviteTid = authenticationHelper | |
.handleChallenge(response, tid, sipProvider, 5); | |
inviteTid.sendRequest(); | |
} catch (NullPointerException e) { | |
e.printStackTrace(); | |
} catch (SipException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment