/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.31
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC)
#   if (__SUNPRO_CC <= 0x560)
#     define SWIGTEMPLATEDISAMBIGUATOR template
#   else
#     define SWIGTEMPLATEDISAMBIGUATOR 
#   endif
# else
#   define SWIGTEMPLATEDISAMBIGUATOR 
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif


/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
  typedef long long __int64;
#endif

/* Fix for jlong on 64-bit x86 Solaris */
#if defined(__x86_64)
# ifdef _LP64
#   undef _LP64
# endif
#endif

#include <jni.h>
#include <stdlib.h>
#include <string.h>


/* Support for throwing Java exceptions */
typedef enum {
  SWIG_JavaOutOfMemoryError = 1, 
  SWIG_JavaIOException, 
  SWIG_JavaRuntimeException, 
  SWIG_JavaIndexOutOfBoundsException,
  SWIG_JavaArithmeticException,
  SWIG_JavaIllegalArgumentException,
  SWIG_JavaNullPointerException,
  SWIG_JavaDirectorPureVirtual,
  SWIG_JavaUnknownError
} SWIG_JavaExceptionCodes;

typedef struct {
  SWIG_JavaExceptionCodes code;
  const char *java_exception;
} SWIG_JavaExceptions_t;


static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  jclass excep;
  static const SWIG_JavaExceptions_t java_exceptions[] = {
    { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
    { SWIG_JavaIOException, "java/io/IOException" },
    { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
    { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
    { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
    { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
    { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
    { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
    { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
    { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" } };
  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;

  while (except_ptr->code != code && except_ptr->code)
    except_ptr++;

  jenv->ExceptionClear();
  excep = jenv->FindClass(except_ptr->java_exception);
  if (excep)
    jenv->ThrowNew(excep, msg);
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else


#include "switch_cpp.h"
#include "freeswitch_java.h"


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1log(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return ;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  console_log(arg1,arg2);
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_console_1clean_1log(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  char *arg1 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return ;
  }
  console_clean_log(arg1);
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
}


SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1execute(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
  jstring jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  result = (char *)api_execute(arg1,arg2);
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_api_1reply_1delete(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  char *arg1 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return ;
  }
  api_reply_delete(arg1);
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_process_1callback_1result(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2, jobject jarg2_, jlong jarg3) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  input_callback_state *arg2 = (input_callback_state *) 0 ;
  switch_core_session_t *arg3 = (switch_core_session_t *) 0 ;
  switch_status_t result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg2_;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = *(input_callback_state **)&jarg2; 
  arg3 = *(switch_core_session_t **)&jarg3; 
  result = process_callback_result(arg1,arg2,arg3);
  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1function_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *arg2 = (void *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  if (arg1) (arg1)->function = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1function_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  result = (void *) ((arg1)->function);
  *(void **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1threadState_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *arg2 = (void *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  if (arg1) (arg1)->threadState = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1threadState_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  result = (void *) ((arg1)->threadState);
  *(void **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1extra_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *arg2 = (void *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  if (arg1) (arg1)->extra = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1extra_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  void *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  result = (void *) ((arg1)->extra);
  *(void **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1funcargs_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  char *arg2 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  {
    if (arg1->funcargs) delete [] arg1->funcargs;
    if (arg2) {
      arg1->funcargs = (char *) (new char[strlen((const char *)arg2)+1]);
      strcpy((char *)arg1->funcargs, (const char *)arg2);
    } else {
      arg1->funcargs = 0;
    }
  }
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_input_1callback_1state_1t_1funcargs_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(input_callback_state_t **)&jarg1; 
  result = (char *) ((arg1)->funcargs);
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1input_1callback_1state_1t(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  input_callback_state_t *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (input_callback_state_t *)new input_callback_state_t();
  *(input_callback_state_t **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1input_1callback_1state_1t(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(input_callback_state_t **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_S_1HUP_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  session_flag_t result;
  
  (void)jenv;
  (void)jcls;
  result = (session_flag_t)S_HUP;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_S_1FREE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  session_flag_t result;
  
  (void)jenv;
  (void)jcls;
  result = (session_flag_t)S_FREE;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_S_1RDLOCK_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  session_flag_t result;
  
  (void)jenv;
  (void)jcls;
  result = (session_flag_t)S_RDLOCK;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1CoreSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(CoreSession **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(switch_core_session_t **)&jarg2; 
  if (arg1) (arg1)->session = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1session_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_core_session_t *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (switch_core_session_t *) ((arg1)->session);
  *(switch_core_session_t **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_channel_t *arg2 = (switch_channel_t *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(switch_channel_t **)&jarg2; 
  if (arg1) (arg1)->channel = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1channel_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_channel_t *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (switch_channel_t *) ((arg1)->channel);
  *(switch_channel_t **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  unsigned int arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = (unsigned int)jarg2; 
  if (arg1) (arg1)->flags = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flags_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  unsigned int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (unsigned int) ((arg1)->flags);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  input_callback_state *arg2 = (input_callback_state *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(input_callback_state **)&jarg2; 
  if (arg1) (arg1)->cb_state = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1cb_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  input_callback_state *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (input_callback_state *)& ((arg1)->cb_state);
  *(input_callback_state **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_channel_state_t arg2 ;
  switch_channel_state_t *argp2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  argp2 = *(switch_channel_state_t **)&jarg2; 
  if (!argp2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_channel_state_t");
    return ;
  }
  arg2 = *argp2; 
  if (arg1) (arg1)->hook_state = arg2;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hook_1state_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_channel_state_t result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result =  ((arg1)->hook_state);
  *(switch_channel_state_t **)&jresult = new switch_channel_state_t((switch_channel_state_t &)result); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1answer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (int)(arg1)->answer();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1preAnswer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (int)(arg1)->preAnswer();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  (arg1)->hangup(arg2);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->setVariable(arg2,arg3);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getVariable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jstring jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  result = (char *)(arg1)->getVariable(arg2);
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  int arg4 = (int) 0 ;
  int arg5 = (int) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setCallerData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->setCallerData(arg2,arg3);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  CoreSession *arg2 = (CoreSession *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 = (int) 60 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(CoreSession **)&jarg2; 
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return 0;
  }
  arg4 = (int)jarg4; 
  result = (int)(arg1)->originate(arg2,arg3,arg4);
  jresult = (jint)result; 
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setDTMFCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jstring jarg3) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  void *arg2 = (void *) 0 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->setDTMFCallback(arg2,arg3);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1speak(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  result = (int)(arg1)->speak(arg2);
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1set_1tts_1parms(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->set_tts_parms(arg2,arg3);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1collectDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (int)(arg1)->collectDigits(arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1getDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jint jarg3, jint jarg4, jstring jarg5, jbyteArray jarg6, jint jarg7) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  int arg7 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  {
    arg2 = (char*) jenv->GetByteArrayElements(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = 0;
  if (jarg5) {
    arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    if (!arg5) return 0;
  }
  {
    arg6 = (char*) jenv->GetByteArrayElements(jarg6, 0);
    if (!arg6) return 0;
  }
  arg7 = (int)jarg7; 
  result = (int)(arg1)->getDigits(arg2,arg3,arg4,arg5,arg6,arg7);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg2, (jbyte*) arg2, 0);
  }
  {
    jenv->ReleaseByteArrayElements(jarg6, (jbyte*) arg6, 0);
  }
  
  if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
  
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return 0;
  }
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  result = (int)(arg1)->transfer(arg2,arg3,arg4);
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jbyteArray jarg9, jstring jarg10) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  char *arg6 = (char *) 0 ;
  char *arg7 = (char *) 0 ;
  char *arg8 = (char *) 0 ;
  char *arg9 = (char *) 0 ;
  char *arg10 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = 0;
  if (jarg6) {
    arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
    if (!arg6) return 0;
  }
  arg7 = 0;
  if (jarg7) {
    arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    if (!arg7) return 0;
  }
  arg8 = 0;
  if (jarg8) {
    arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
    if (!arg8) return 0;
  }
  {
    arg9 = (char*) jenv->GetByteArrayElements(jarg9, 0);
    if (!arg9) return 0;
  }
  arg10 = 0;
  if (jarg10) {
    arg10 = (char *)jenv->GetStringUTFChars(jarg10, 0);
    if (!arg10) return 0;
  }
  result = (int)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
  jresult = (jint)result; 
  {
    jenv->ReleaseByteArrayElements(jarg9, (jbyte*) arg9, 0);
  }
  if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
  if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
  if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
  
  if (arg10) jenv->ReleaseStringUTFChars(jarg10, (const char *)arg10);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (int)jarg3; 
  result = (int)(arg1)->streamFile(arg2,arg3);
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flushEvents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (int)(arg1)->flushEvents();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flushDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (int)(arg1)->flushDigits();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setAutoHangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  jint jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  bool arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  result = (int)(arg1)->setAutoHangup(arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1setHangupHook(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  void *arg2 = (void *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  (arg1)->setHangupHook(arg2);
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1ready(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (bool)(arg1)->ready();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->execute(arg2,arg3);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1begin_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (bool)(arg1)->begin_allow_threads();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1end_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (bool)(arg1)->end_allow_threads();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1get_1uuid(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  result = (char *)((CoreSession const *)arg1)->get_uuid();
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1get_1cb_1args(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  switch_input_args_t *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  {
    switch_input_args_t const &_result_ref = ((CoreSession const *)arg1)->get_cb_args();
    result = (switch_input_args_t *) &_result_ref;
  }
  *(switch_input_args_t **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1check_1hangup_1hook(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  CoreSession *arg1 = (CoreSession *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  (arg1)->check_hangup_hook();
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1run_1dtmf_1callback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
  jlong jresult = 0 ;
  CoreSession *arg1 = (CoreSession *) 0 ;
  void *arg2 = (void *) 0 ;
  switch_input_type_t arg3 ;
  switch_status_t result;
  switch_input_type_t *argp3 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(CoreSession **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  argp3 = *(switch_input_type_t **)&jarg3; 
  if (!argp3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_input_type_t");
    return 0;
  }
  arg3 = *argp3; 
  result = (arg1)->run_dtmf_callback(arg2,arg3);
  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_bridge(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  CoreSession *arg1 = 0 ;
  CoreSession *arg2 = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(CoreSession **)&jarg1;
  if(!arg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "CoreSession & reference is null");
    return ;
  } 
  arg2 = *(CoreSession **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "CoreSession & reference is null");
    return ;
  } 
  bridge(*arg1,*arg2);
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_hanguphook(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
  switch_status_t result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(switch_core_session_t **)&jarg1; 
  result = hanguphook(arg1);
  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_dtmf_1callback(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3, jlong jarg4, jlong jarg5) {
  jlong jresult = 0 ;
  switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
  void *arg2 = (void *) 0 ;
  switch_input_type_t arg3 ;
  void *arg4 = (void *) 0 ;
  unsigned int arg5 ;
  switch_status_t result;
  switch_input_type_t *argp3 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(switch_core_session_t **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  argp3 = *(switch_input_type_t **)&jarg3; 
  if (!argp3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_input_type_t");
    return 0;
  }
  arg3 = *argp3; 
  arg4 = *(void **)&jarg4; 
  arg5 = (unsigned int)jarg5; 
  result = dtmf_callback(arg1,arg2,arg3,arg4,arg5);
  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_javaVM_1set(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  JavaVM *arg1 = (JavaVM *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(JavaVM **)&jarg1; 
  javaVM = arg1;
  
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_javaVM_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  JavaVM *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (JavaVM *)javaVM;
  *(JavaVM **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  JavaSession *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (JavaSession *)new JavaSession();
  *(JavaSession **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  JavaSession *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  result = (JavaSession *)new JavaSession(arg1);
  *(JavaSession **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1JavaSession_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
  JavaSession *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(switch_core_session_t **)&jarg1; 
  result = (JavaSession *)new JavaSession(arg1);
  *(JavaSession **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1JavaSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  JavaSession *arg1 = (JavaSession *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(JavaSession **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1begin_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  JavaSession *arg1 = (JavaSession *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  result = (bool)(arg1)->begin_allow_threads();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1end_1allow_1threads(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  JavaSession *arg1 = (JavaSession *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  result = (bool)(arg1)->end_allow_threads();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1setDTMFCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2, jstring jarg3) {
  JavaSession *arg1 = (JavaSession *) 0 ;
  jobject arg2 ;
  char *arg3 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  arg2 = jarg2; 
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  (arg1)->setDTMFCallback(arg2,arg3);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1setHangupHook(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
  JavaSession *arg1 = (JavaSession *) 0 ;
  jobject arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  arg2 = jarg2; 
  (arg1)->setHangupHook(arg2);
}


SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1check_1hangup_1hook(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  JavaSession *arg1 = (JavaSession *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  (arg1)->check_hangup_hook();
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_JavaSession_1run_1dtmf_1callback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
  jlong jresult = 0 ;
  JavaSession *arg1 = (JavaSession *) 0 ;
  void *arg2 = (void *) 0 ;
  switch_input_type_t arg3 ;
  switch_status_t result;
  switch_input_type_t *argp3 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(JavaSession **)&jarg1; 
  arg2 = *(void **)&jarg2; 
  argp3 = *(switch_input_type_t **)&jarg3; 
  if (!argp3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null switch_input_type_t");
    return 0;
  }
  arg3 = *argp3; 
  result = (arg1)->run_dtmf_callback(arg2,arg3);
  *(switch_status_t **)&jresult = new switch_status_t((switch_status_t &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_SWIGJavaSessionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(CoreSession **)&baseptr = *(JavaSession **)&jarg1;
    return baseptr;
}

#ifdef __cplusplus
}
#endif

