Perhaps your SipApplicationSession is getting invalidated before it expires.

There are two ways it could be invalidated:

(1) Your application explicitly invalidates it.

If this is the case, try a call flow that takes longer than two minutes before your code calls appSession.invalidate();

(2) The "Invalidate When Ready" mechanism is enabled and the conditions are satisfied for invalidation. See section 6.1.2.2.2 of JSR-289. By default, this mechanism is enabled for JSR-289 applications.

If this is the case, then try appSession.setInvalidateWhenReady(false);