Module app_ allows execution of Java code from Kamailio configuration file, providing access to SIP message which is processed at that time. Exported functions by app_java can be available in the Java code as class Kamailio.
References:
Java API documentation is part of module README.