Index: /pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw
===================================================================
--- /pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw	(revision 1127)
+++ /pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw	(revision 1128)
@@ -52,4 +52,16 @@
 ###############################################################################
 
+Project: "pjnath"="..\..\pjnath\build\pjnath.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
 Project: "pjsip_core"="..\..\pjsip\build\pjsip_core.dsp" - Package Owner=<4>
 
@@ -168,4 +180,7 @@
     Project_Dep_Name pjsua_lib
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
 }}}
 
Index: /pjproject/trunk/pjsip-apps/build/py_pjsua.dsp
===================================================================
--- /pjproject/trunk/pjsip-apps/build/py_pjsua.dsp	(revision 1127)
+++ /pjproject/trunk/pjsip-apps/build/py_pjsua.dsp	(revision 1128)
@@ -44,5 +44,5 @@
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /I "../../pjnath/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /c
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -54,5 +54,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 python24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib /nologo /dll /map /machine:I386 /nodefaultlib:"libcmt.lib" /out:"..\lib\py_pjsua.pyd" /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib"
+# ADD LINK32 python24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib iphlpapi.lib /nologo /dll /map /machine:I386 /nodefaultlib:"libcmt.lib" /out:"..\lib\py_pjsua.pyd" /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib"
 # SUBTRACT LINK32 /nodefaultlib
 
@@ -71,5 +71,5 @@
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /I "../../pjnath/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /GZ /c
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -81,5 +81,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 python24_d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib /nologo /dll /debug /machine:I386 /out:"..\lib\py_pjsua_d.pyd" /pdbtype:sept /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PCbuild" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PC\VC6"
+# ADD LINK32 python24_d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib iphlpapi.lib /nologo /dll /debug /machine:I386 /out:"..\lib\py_pjsua_d.pyd" /pdbtype:sept /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PCbuild" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PC\VC6"
 
 !ENDIF 
Index: /pjproject/trunk/pjsip-apps/src/py_pjsua/pjsua_app.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/py_pjsua/pjsua_app.py	(revision 1127)
+++ /pjproject/trunk/pjsip-apps/src/py_pjsua/pjsua_app.py	(revision 1128)
@@ -209,14 +209,14 @@
 
 	# Configure STUN config
-	stun_cfg = py_pjsua.stun_config_default()
-	stun_cfg.stun_srv1 = C_STUN_SRV
-	stun_cfg.stun_srv2 = C_STUN_SRV
-	stun_cfg.stun_port1 = C_STUN_PORT
-	stun_cfg.stun_port2 = C_STUN_PORT
+	#stun_cfg = py_pjsua.stun_config_default()
+	#stun_cfg.stun_srv1 = C_STUN_SRV
+	#stun_cfg.stun_srv2 = C_STUN_SRV
+	#stun_cfg.stun_port1 = C_STUN_PORT
+	#stun_cfg.stun_port2 = C_STUN_PORT
 
 	# Configure UDP transport config
 	transport_cfg = py_pjsua.transport_config_default()
 	transport_cfg.port = C_SIP_PORT
-	transport_cfg.stun_config = stun_cfg
+	#transport_cfg.stun_config = stun_cfg
 	if C_STUN_SRV != "":
 		transport_cfg.use_stun = 1
Index: /pjproject/trunk/pjsip-apps/src/py_pjsua/py_pjsua.c
===================================================================
--- /pjproject/trunk/pjsip-apps/src/py_pjsua/py_pjsua.c	(revision 1127)
+++ /pjproject/trunk/pjsip-apps/src/py_pjsua/py_pjsua.c	(revision 1128)
@@ -919,4 +919,7 @@
     unsigned outbound_proxy_cnt;
     pj_str_t outbound_proxy[4];
+    PyObject *stun_domain;
+    PyObject *stun_host;
+    PyObject *stun_relay_host;
     unsigned cred_count;
     pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES];
@@ -2348,139 +2351,4 @@
 
 /*
- * stun_config_Object
- * STUN configuration
- */
-typedef struct
-{
-    PyObject_HEAD
-    /* Type-specific fields go here. */
-    PyObject * stun_srv1;    
-    unsigned stun_port1;
-    PyObject * stun_srv2;
-    unsigned stun_port2;    
-} stun_config_Object;
-
-
-/*
- * stun_config_dealloc
- * deletes a stun config from memory
- */
-static void stun_config_dealloc(stun_config_Object* self)
-{
-    Py_XDECREF(self->stun_srv1);
-    Py_XDECREF(self->stun_srv2);
-    self->ob_type->tp_free((PyObject*)self);
-}
-
-
-/*
- * stun_config_new
- * constructor for stun_config object
- */
-static PyObject * stun_config_new(PyTypeObject *type, PyObject *args,
-                                    PyObject *kwds)
-{
-    stun_config_Object *self;	
-    self = (stun_config_Object *)type->tp_alloc(type, 0);
-    if (self != NULL)
-    {
-        self->stun_srv1 = PyString_FromString("");
-        if (self->stun_srv1 == NULL)
-    	{
-            Py_DECREF(self);
-            return NULL;
-        }
-        self->stun_srv2 = PyString_FromString("");
-        if (self->stun_srv2 == NULL)
-    	{
-            Py_DECREF(self);
-            return NULL;
-        }
-    }
-
-    return (PyObject *)self;
-}
-
-
-/*
- * stun_config_members
- */
-static PyMemberDef stun_config_members[] =
-{
-    {
-        "stun_port1", T_INT, offsetof(stun_config_Object, stun_port1), 0,
-        "The first STUN server IP address or hostname."
-    },
-    {
-        "stun_port2", T_INT, offsetof(stun_config_Object, stun_port2), 0,
-        "Port number of the second STUN server. "
-        "If zero, default STUN port will be used."
-    },    
-    {
-        "stun_srv1", T_OBJECT_EX,
-        offsetof(stun_config_Object, stun_srv1), 0,
-        "The first STUN server IP address or hostname"
-    },
-    {
-        "stun_srv2", T_OBJECT_EX,
-        offsetof(stun_config_Object, stun_srv2), 0,
-        "Optional second STUN server IP address or hostname, for which the "
-        "result of the mapping request will be compared to. If the value "
-        "is empty, only one STUN server will be used"
-    },
-    {NULL}  /* Sentinel */
-};
-
-
-
-
-/*
- * stun_config_Type
- */
-static PyTypeObject stun_config_Type =
-{
-    PyObject_HEAD_INIT(NULL)
-    0,                              /*ob_size*/
-    "py_pjsua.STUN_Config",      /*tp_name*/
-    sizeof(stun_config_Object),  /*tp_basicsize*/
-    0,                              /*tp_itemsize*/
-    (destructor)stun_config_dealloc,/*tp_dealloc*/
-    0,                              /*tp_print*/
-    0,                              /*tp_getattr*/
-    0,                              /*tp_setattr*/
-    0,                              /*tp_compare*/
-    0,                              /*tp_repr*/
-    0,                              /*tp_as_number*/
-    0,                              /*tp_as_sequence*/
-    0,                              /*tp_as_mapping*/
-    0,                              /*tp_hash */
-    0,                              /*tp_call*/
-    0,                              /*tp_str*/
-    0,                              /*tp_getattro*/
-    0,                              /*tp_setattro*/
-    0,                              /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
-    "STUN Config objects",       /* tp_doc */
-    0,                              /* tp_traverse */
-    0,                              /* tp_clear */
-    0,                              /* tp_richcompare */
-    0,                              /* tp_weaklistoffset */
-    0,                              /* tp_iter */
-    0,                              /* tp_iternext */
-    0,                              /* tp_methods */
-    stun_config_members,         /* tp_members */
-    0,                              /* tp_getset */
-    0,                              /* tp_base */
-    0,                              /* tp_dict */
-    0,                              /* tp_descr_get */
-    0,                              /* tp_descr_set */
-    0,                              /* tp_dictoffset */
-    0,                              /* tp_init */
-    0,                              /* tp_alloc */
-    stun_config_new,             /* tp_new */
-
-};
-
-/*
  * transport_config_Object
  * Transport configuration for creating UDP transports for both SIP
@@ -2494,6 +2362,4 @@
     PyObject * public_addr;
     PyObject * bound_addr;
-    int use_stun;
-    stun_config_Object * stun_config;
 } transport_config_Object;
 
@@ -2507,5 +2373,4 @@
     Py_XDECREF(self->public_addr);    
     Py_XDECREF(self->bound_addr);    
-    Py_XDECREF(self->stun_config);    
     self->ob_type->tp_free((PyObject*)self);
 }
@@ -2536,12 +2401,4 @@
             return NULL;
         }
-        self->stun_config = 
-            (stun_config_Object *)stun_config_new(&stun_config_Type,NULL,NULL);
-        if (self->stun_config == NULL)
-    	{
-            Py_DECREF(self);
-            return NULL;
-        }
-        
     }
 
@@ -2580,14 +2437,4 @@
         "used for that purpose)."		
     },    
-    {
-        "use_stun", T_INT,
-        offsetof(transport_config_Object, use_stun), 0,
-        "Flag to indicate whether STUN should be used."
-    },
-    {
-        "stun_config", T_OBJECT_EX,
-        offsetof(transport_config_Object, stun_config), 0,
-        "STUN configuration, must be specified when STUN is used."
-    },
     {NULL}  /* Sentinel */
 };
@@ -2641,135 +2488,4 @@
     transport_config_new,             /* tp_new */
 
-};
-
-/*
- * sockaddr_Object
- * C/Python wrapper for sockaddr object
- */
-typedef struct
-{
-    PyObject_HEAD
-    /* Type-specific fields go here. */
-#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
-    pj_uint8_t  sa_zero_len;
-    pj_uint8_t  sa_family;
-#else
-    pj_uint16_t	sa_family;	/**< Common data: address family.   */
-#endif
-    PyObject * sa_data;	/**< Address data.		    */
-} sockaddr_Object;
-
-/*
- * sockaddr_dealloc
- * deletes a sockaddr from memory
- */
-static void sockaddr_dealloc(sockaddr_Object* self)
-{
-    Py_XDECREF(self->sa_data);    
-    self->ob_type->tp_free((PyObject*)self);
-}
-
-
-/*
- * sockaddr_new
- * constructor for sockaddr object
- */
-static PyObject * sockaddr_new(PyTypeObject *type, PyObject *args,
-                                    PyObject *kwds)
-{
-    sockaddr_Object *self;
-
-    self = (sockaddr_Object *)type->tp_alloc(type, 0);
-    if (self != NULL)
-    {
-        self->sa_data = PyString_FromString("");
-        if (self->sa_data == NULL)
-    	{
-            Py_DECREF(self);
-            return NULL;
-        }
-        
-    }
-
-    return (PyObject *)self;
-}
-
-
-/*
- * sockaddr_members
- * declares attributes accessible from both C and Python for sockaddr object
- */
-static PyMemberDef sockaddr_members[] =
-{
-#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
-    {
-        "sa_zero_len", T_INT, offsetof(sockaddr_Object, sa_zero_len), 0,
-        ""
-    },
-    {
-        "sa_family", T_INT,
-        offsetof(sockaddr_Object, sa_family), 0,
-        "Common data: address family."
-    },
-#else
-    {
-        "sa_family", T_INT,
-        offsetof(sockaddr_Object, sa_family), 0,
-        "Common data: address family."
-    },
-#endif
-    {
-        "sa_data", T_OBJECT_EX,
-        offsetof(sockaddr_Object, sa_data), 0,
-        "Address data"
-    },
-    {NULL}  /* Sentinel */
-};
-
-
-/*
- * sockaddr_Type
- */
-static PyTypeObject sockaddr_Type =
-{
-    PyObject_HEAD_INIT(NULL)
-    0,                              /*ob_size*/
-    "py_pjsua.Sockaddr",        /*tp_name*/
-    sizeof(sockaddr_Object),    /*tp_basicsize*/
-    0,                              /*tp_itemsize*/
-    (destructor)sockaddr_dealloc,/*tp_dealloc*/
-    0,                              /*tp_print*/
-    0,                              /*tp_getattr*/
-    0,                              /*tp_setattr*/
-    0,                              /*tp_compare*/
-    0,                              /*tp_repr*/
-    0,                              /*tp_as_number*/
-    0,                              /*tp_as_sequence*/
-    0,                              /*tp_as_mapping*/
-    0,                              /*tp_hash */
-    0,                              /*tp_call*/
-    0,                              /*tp_str*/
-    0,                              /*tp_getattro*/
-    0,                              /*tp_setattro*/
-    0,                              /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
-    "Sockaddr objects",         /*tp_doc*/
-    0,                              /*tp_traverse*/
-    0,                              /*tp_clear*/
-    0,                              /*tp_richcompare*/
-    0,                              /* tp_weaklistoffset */
-    0,                              /* tp_iter */
-    0,                              /* tp_iternext */
-    0,                              /* tp_methods */
-    sockaddr_members,           /* tp_members */
-	0,                              /* tp_getset */
-    0,                              /* tp_base */
-    0,                              /* tp_dict */
-    0,                              /* tp_descr_get */
-    0,                              /* tp_descr_set */
-    0,                              /* tp_dictoffset */
-    0,                              /* tp_init */
-    0,                              /* tp_alloc */
-    sockaddr_new,             /* tp_new */
 };
 
@@ -2905,5 +2621,4 @@
     unsigned flag;
     unsigned addr_len;
-    sockaddr_Object * local_addr;
     host_port_Object * local_name;
     unsigned usage_count;
@@ -2919,5 +2634,4 @@
     Py_XDECREF(self->type_name); 
     Py_XDECREF(self->info);
-    Py_XDECREF(self->local_addr);
     Py_XDECREF(self->local_name);
     self->ob_type->tp_free((PyObject*)self);
@@ -2949,11 +2663,4 @@
             return NULL;
         }
-        self->local_addr = 
-            (sockaddr_Object *)sockaddr_new(&sockaddr_Type,NULL,NULL);
-        if (self->local_addr == NULL)
-    	{
-            Py_DECREF(self);
-            return NULL;
-        }
         self->local_name = 
             (host_port_Object *)host_port_new(&host_port_Type,NULL,NULL);
@@ -2999,9 +2706,4 @@
         "addr_len", T_INT, offsetof(transport_info_Object, addr_len), 0,
         "Local address length."
-    },
-    {
-        "local_addr", T_OBJECT_EX,
-        offsetof(transport_info_Object, local_addr), 0,
-        "Local/bound address."
     },
     {
@@ -3110,31 +2812,4 @@
 
 /*
- * py_pjsua_stun_config_default
- * !modified @ 051206
- */
-static PyObject *py_pjsua_stun_config_default(PyObject *pSelf, PyObject *pArgs)
-{
-    stun_config_Object *obj;
-    pjsua_stun_config cfg;
-
-    if (!PyArg_ParseTuple(pArgs, ""))
-    {
-        return NULL;
-    }
-	
-    pjsua_stun_config_default(&cfg);
-    obj = (stun_config_Object *)stun_config_new(&stun_config_Type, NULL, NULL);
-    obj->stun_port1 = cfg.stun_port1;
-    obj->stun_port2 = cfg.stun_port2;
-    Py_XDECREF(obj->stun_srv1);
-    obj->stun_srv1 = 
-        PyString_FromStringAndSize(cfg.stun_srv1.ptr, cfg.stun_srv1.slen);
-    Py_XDECREF(obj->stun_srv2);
-    obj->stun_srv2 = 
-        PyString_FromStringAndSize(cfg.stun_srv2.ptr, cfg.stun_srv2.slen);
-    return (PyObject *)obj;
-}
-
-/*
  * py_pjsua_transport_config_default
  * !modified @ 051206
@@ -3158,61 +2833,5 @@
         PyString_FromStringAndSize(cfg.bound_addr.ptr, cfg.bound_addr.slen);
     obj->port = cfg.port;
-    obj->use_stun = cfg.use_stun;
-    Py_XDECREF(obj->stun_config);
-    obj->stun_config = 
-        (stun_config_Object *)stun_config_new(&stun_config_Type, NULL, NULL);
-    obj->stun_config->stun_port1 = cfg.stun_config.stun_port1;
-    obj->stun_config->stun_port2 = cfg.stun_config.stun_port2;
-    Py_XDECREF(obj->stun_config->stun_srv1);
-    obj->stun_config->stun_srv1 = 
-        PyString_FromStringAndSize(cfg.stun_config.stun_srv1.ptr, 
-    cfg.stun_config.stun_srv1.slen);
-    Py_XDECREF(obj->stun_config->stun_srv2);
-    obj->stun_config->stun_srv2 = 
-        PyString_FromStringAndSize(cfg.stun_config.stun_srv2.ptr, 
-    cfg.stun_config.stun_srv2.slen);
     return (PyObject *)obj;
-}
-
-/*
- * py_pjsua_normalize_stun_config
- */
-static PyObject *py_pjsua_normalize_stun_config
-(PyObject *pSelf, PyObject *pArgs)
-{
-    PyObject * tmpObj;
-    stun_config_Object *obj;
-    pjsua_stun_config cfg;
-
-    if (!PyArg_ParseTuple(pArgs, "O", &tmpObj))
-    {
-        return NULL;
-    }
-
-    if (tmpObj == Py_None) {
-	Py_INCREF(Py_None);
-	return Py_None;
-    }
-
-    obj = (stun_config_Object *) tmpObj;
-    cfg.stun_port1 = obj->stun_port1;
-    cfg.stun_port2 = obj->stun_port2;
-    cfg.stun_srv1.ptr = PyString_AsString(obj->stun_srv1);
-    cfg.stun_srv1.slen = strlen(PyString_AsString(obj->stun_srv1));
-    cfg.stun_srv2.ptr = PyString_AsString(obj->stun_srv2);
-    cfg.stun_srv2.slen = strlen(PyString_AsString(obj->stun_srv2));
-
-    pjsua_normalize_stun_config(&cfg);
-    obj->stun_port1 = cfg.stun_port1;
-    obj->stun_port2 = cfg.stun_port2;
-    Py_XDECREF(obj->stun_srv1);
-    obj->stun_srv1 = 
-        PyString_FromStringAndSize(cfg.stun_srv1.ptr, cfg.stun_srv1.slen);
-    Py_XDECREF(obj->stun_srv2);
-    obj->stun_srv2 = 
-        PyString_FromStringAndSize(cfg.stun_srv2.ptr, cfg.stun_srv2.slen);
-
-    Py_INCREF(Py_None);
-    return Py_None;
 }
 
@@ -3242,15 +2861,4 @@
         cfg.bound_addr.slen = strlen(PyString_AsString(obj->bound_addr));
         cfg.port = obj->port;
-        cfg.use_stun = obj->use_stun;
-        cfg.stun_config.stun_port1 = obj->stun_config->stun_port1;
-        cfg.stun_config.stun_port2 = obj->stun_config->stun_port2;
-        cfg.stun_config.stun_srv1.ptr = 
-            PyString_AsString(obj->stun_config->stun_srv1);
-        cfg.stun_config.stun_srv1.slen = 
-            strlen(PyString_AsString(obj->stun_config->stun_srv1));
-        cfg.stun_config.stun_srv2.ptr = 
-            PyString_AsString(obj->stun_config->stun_srv2);
-        cfg.stun_config.stun_srv2.slen = 
-            strlen(PyString_AsString(obj->stun_config->stun_srv2));
         status = pjsua_transport_create(type, &cfg, &id);
     } else {
@@ -3344,12 +2952,4 @@
         obj->id = info.id;
         obj->info = PyString_FromStringAndSize(info.info.ptr, info.info.slen);
-        obj->local_addr->sa_data = 
-			PyString_FromStringAndSize(info.local_addr.sa_data, 14);
-#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
-        obj->local_addr->sa_zero_len = info.local_addr.sa_zero_len;
-        obj->local_addr->sa_family = info.local_addr.sa_family;
-#else
-        obj->local_addr->sa_family = info.local_addr.sa_family;
-#endif
         return Py_BuildValue("O", obj);
     } else {
@@ -3394,13 +2994,7 @@
 }
 
-static char pjsua_stun_config_default_doc[] =
-    "py_pjsua.STUN_Config py_pjsua.stun_config_default () "
-    "Call this function to initialize STUN config with default values.";
 static char pjsua_transport_config_default_doc[] =
     "py_pjsua.Transport_Config py_pjsua.transport_config_default () "
     "Call this function to initialize UDP config with default values.";
-static char pjsua_normalize_stun_config_doc[] =
-    "void py_pjsua.normalize_stun_config (py_pjsua.STUN_Config cfg) "
-    "Normalize STUN config. ";
 static char pjsua_transport_create_doc[] =
     "int, int py_pjsua.transport_create (int type, "
@@ -8120,16 +7714,7 @@
     },
     {
-        "stun_config_default", py_pjsua_stun_config_default, METH_VARARGS,
-        pjsua_stun_config_default_doc
-    },
-    {
         "transport_config_default", py_pjsua_transport_config_default, 
         METH_VARARGS,pjsua_transport_config_default_doc
     },
-    {
-        "normalize_stun_config", py_pjsua_normalize_stun_config, METH_VARARGS,
-        pjsua_normalize_stun_config_doc
-    },
-    
     {
         "transport_create", py_pjsua_transport_create, METH_VARARGS,
@@ -8517,9 +8102,5 @@
     /* LIB TRANSPORT */
 
-    if (PyType_Ready(&stun_config_Type) < 0)
-        return;
     if (PyType_Ready(&transport_config_Type) < 0)
-        return;
-    if (PyType_Ready(&sockaddr_Type) < 0)
         return;
     if (PyType_Ready(&host_port_Type) < 0)
@@ -8638,11 +8219,7 @@
     /* LIB TRANSPORT */
 
-    Py_INCREF(&stun_config_Type);
-    PyModule_AddObject(m, "STUN_Config", (PyObject *)&stun_config_Type);
     Py_INCREF(&transport_config_Type);
     PyModule_AddObject
         (m, "Transport_Config", (PyObject *)&transport_config_Type);
-    Py_INCREF(&sockaddr_Type);
-    PyModule_AddObject(m, "Sockaddr", (PyObject *)&sockaddr_Type);
     Py_INCREF(&host_port_Type);
     PyModule_AddObject(m, "Host_Port", (PyObject *)&host_port_Type);
