Index: /pjproject/trunk/pjsip-apps/src/python/_pjsua.h
===================================================================
--- /pjproject/trunk/pjsip-apps/src/python/_pjsua.h	(revision 4580)
+++ /pjproject/trunk/pjsip-apps/src/python/_pjsua.h	(revision 4581)
@@ -1328,4 +1328,10 @@
     PyObject   *public_addr;
     PyObject   *bound_addr;
+    pj_qos_type  qos_type;
+    pj_uint8_t  qos_params_flags;
+    pj_uint8_t  qos_params_dscp_val;
+    pj_uint8_t  qos_params_so_prio;
+    pj_qos_wmm_prio  qos_params_wmm_prio;
+
 } PyObj_pjsua_transport_config;
 
@@ -1338,5 +1344,5 @@
 {
     Py_XDECREF(self->public_addr);    
-    Py_XDECREF(self->bound_addr);    
+    Py_XDECREF(self->bound_addr);
     self->ob_type->tp_free((PyObject*)self);
 }
@@ -1350,5 +1356,9 @@
     cfg->bound_addr	= PyString_ToPJ(obj->bound_addr);
     cfg->port		= obj->port;
-
+    cfg->qos_type	= obj->qos_type;
+    cfg->qos_params.flags	= obj->qos_params_flags;
+    cfg->qos_params.dscp_val	= obj->qos_params_dscp_val;
+    cfg->qos_params.so_prio	= obj->qos_params_so_prio;
+    cfg->qos_params.wmm_prio	= obj->qos_params_wmm_prio;
 }
 
@@ -1362,5 +1372,11 @@
     obj->bound_addr = PyString_FromPJ(&cfg->bound_addr);
 
-    obj->port = cfg->port;
+    obj->port		= cfg->port;
+    obj->qos_type	= cfg->qos_type;
+    obj->qos_params_flags	= cfg->qos_params.flags;
+    obj->qos_params_dscp_val	= cfg->qos_params.dscp_val;
+    obj->qos_params_so_prio	= cfg->qos_params.so_prio;
+    obj->qos_params_wmm_prio	= cfg->qos_params.wmm_prio;
+
 }
 
@@ -1382,5 +1398,5 @@
     if (self != NULL) {
         self->public_addr = PyString_FromString("");
-	self->bound_addr = PyString_FromString("");
+        self->bound_addr = PyString_FromString("");
     }
 
@@ -1420,4 +1436,54 @@
         "used for that purpose)."		
     },    
+    {
+        "qos_type", T_INT,
+        offsetof(PyObj_pjsua_transport_config, qos_type), 0,
+        "High level traffic classification."
+        "Enumerator:"
+        "  0: PJ_QOS_TYPE_BEST_EFFORT"
+        "       Best effort traffic (default value). Any QoS function calls with "
+        "       specifying this value are effectively no-op"
+        "  1: PJ_QOS_TYPE_BACKGROUND"
+        "       Background traffic."
+        "  2: PJ_QOS_TYPE_VIDEO"
+        "       Video traffic."
+        "  3: PJ_QOS_TYPE_VOICE"
+        "       Voice traffic."
+        "  4: PJ_QOS_TYPE_CONTROL"
+        "       Control traffic."
+    },
+    {
+        "qos_params_flags", T_INT,
+        offsetof(PyObj_pjsua_transport_config, qos_params_flags), 0,
+        "Determines which values to set, bitmask of pj_qos_flag."
+        "   PJ_QOS_PARAM_HAS_DSCP = 1"
+        "   PJ_QOS_PARAM_HAS_SO_PRIO = 2"
+        "   PJ_QOS_PARAM_HAS_WMM = 4"
+    },
+    {
+        "qos_params_dscp_val", T_INT,
+        offsetof(PyObj_pjsua_transport_config, qos_params_dscp_val), 0,
+        "The 6 bits DSCP value to set."
+        "Example: 46=EF, 26=AF31, 24=CS3..."
+    },
+    {
+        "qos_params_so_prio", T_INT,
+        offsetof(PyObj_pjsua_transport_config, qos_params_so_prio), 0,
+        "Socket SO_PRIORITY value."
+    },
+    {
+        "qos_params_wmm_prio", T_INT,
+        offsetof(PyObj_pjsua_transport_config, qos_params_wmm_prio), 0,
+        "Standard WMM priorities."
+        "Enumerator:"
+        "  0: PJ_QOS_WMM_PRIO_BULK_EFFORT"
+        "       Bulk effort priority"
+        "  1: PJ_QOS_WMM_PRIO_BULK"
+        "       Bulk priority."
+        "  2: PJ_QOS_WMM_PRIO_VIDEO"
+        "       Video priority"
+        "  3: PJ_QOS_WMM_PRIO_VOICE"
+        "       Voice priority."
+    },
     {NULL}  /* Sentinel */
 };
@@ -1676,4 +1742,5 @@
     unsigned	     use_srtp;
     unsigned	     srtp_secure_signaling;
+    PyObject	    *rtp_transport_cfg;
 } PyObj_pjsua_acc_config;
 
@@ -1695,4 +1762,5 @@
     Py_XDECREF(self->contact_uri_params);
     Py_XDECREF(self->ka_data);
+    Py_XDECREF(self->rtp_transport_cfg);
     self->ob_type->tp_free((PyObject*)self);
 }
@@ -1728,5 +1796,5 @@
     for (i=0; i<cfg->cred_count; ++i) {
 	PyObj_pjsip_cred_info * ci;
-	
+
 	ci = (PyObj_pjsip_cred_info *)
 	     PyObj_pjsip_cred_info_new(&PyTyp_pjsip_cred_info,NULL,NULL);
@@ -1756,4 +1824,10 @@
     obj->use_srtp = cfg->use_srtp;
     obj->srtp_secure_signaling = cfg->srtp_secure_signaling;
+
+    Py_XDECREF(obj->rtp_transport_cfg);
+    PyObj_pjsua_transport_config *tconf;
+    tconf = (PyObj_pjsua_transport_config*) PyObj_pjsua_transport_config_new(&PyTyp_pjsua_transport_config,NULL, NULL);
+    PyObj_pjsua_transport_config_import(tconf, &cfg->rtp_cfg);
+    obj->rtp_transport_cfg = (PyObject *) tconf;
 }
 
@@ -1785,6 +1859,6 @@
 	cfg->cred_count = PJ_ARRAY_SIZE(cfg->cred_info);
     for (i = 0; i < cfg->cred_count; i++) {
-        PyObj_pjsip_cred_info *ci;
-	ci = (PyObj_pjsip_cred_info*) 
+	PyObj_pjsip_cred_info *ci;
+	ci = (PyObj_pjsip_cred_info*)
 	     PyList_GetItem((PyObject *)obj->cred_info, i);
 	PyObj_pjsip_cred_info_export(&cfg->cred_info[i], ci);
@@ -1806,4 +1880,8 @@
     cfg->use_srtp = obj->use_srtp;
     cfg->srtp_secure_signaling = obj->srtp_secure_signaling;
+
+    PyObj_pjsua_transport_config *tconf;
+	tconf = (PyObj_pjsua_transport_config*)	obj->rtp_transport_cfg;
+	PyObj_pjsua_transport_config_export(&cfg->rtp_cfg, tconf);
 }
 
@@ -1997,4 +2075,9 @@
 	offsetof(PyObj_pjsua_acc_config, srtp_secure_signaling), 0,
 	"Specify if SRTP requires secure signaling to be used."
+    },
+    {
+	"rtp_transport_cfg", T_OBJECT_EX,
+	offsetof(PyObj_pjsua_acc_config, rtp_transport_cfg), 0,
+	"Transport configuration for RTP."
     },
 
Index: /pjproject/trunk/pjsip-apps/src/python/pjsua.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/python/pjsua.py	(revision 4580)
+++ /pjproject/trunk/pjsip-apps/src/python/pjsua.py	(revision 4581)
@@ -475,8 +475,41 @@
                    the public address from STUN or from the selected
                    local interface. Format is "host:port".
+    qos_type    -- High level traffic classification.
+                   Enumerator:
+                     0: PJ_QOS_TYPE_BEST_EFFORT
+                          Best effort traffic (default value). Any QoS function calls with 
+                          specifying this value are effectively no-op
+                     1: PJ_QOS_TYPE_BACKGROUND
+                          Background traffic.
+                     2: PJ_QOS_TYPE_VIDEO
+                          Video traffic.
+                     3: PJ_QOS_TYPE_VOICE
+                          Voice traffic.
+                     4: PJ_QOS_TYPE_CONTROL
+                          Control traffic.
+    qos_params_flags    -- Determines which values to set, bitmask of pj_qos_flag.
+                             PJ_QOS_PARAM_HAS_DSCP = 1
+                             PJ_QOS_PARAM_HAS_SO_PRIO = 2
+                             PJ_QOS_PARAM_HAS_WMM = 4
+    qos_params_dscp_val -- The 6 bits DSCP value to set.
+    qos_params_so_prio  -- Socket SO_PRIORITY value.
+    qos_params_wmm_prio -- Standard WMM priorities.
+                            Enumerator:
+                              0: PJ_QOS_WMM_PRIO_BULK_EFFORT: Bulk effort priority
+                              1: PJ_QOS_WMM_PRIO_BULK: Bulk priority.
+                              2: PJ_QOS_WMM_PRIO_VIDEO: Video priority
+                              3: PJ_QOS_WMM_PRIO_VOICE: Voice priority.
     """
     port = 0
     bound_addr = ""
     public_addr = ""
+    
+    qos_type = 0
+    qos_params_flags = 0
+    qos_params_dscp_val = 0
+    qos_params_so_prio = 0
+    qos_params_wmm_prio = 0
+    
+    
 
     def __init__(self, port=0, 
@@ -486,4 +519,14 @@
         self.public_addr = public_addr
 
+    def _cvt_from_pjsua(self, cfg):
+        self.port = cfg.port
+        self.bound_addr = cfg.bound_addr
+        self.public_addr = cfg.public_addr
+        self.qos_type = cfg.qos_type
+        self.qos_params_flags = cfg.qos_params_flags
+        self.qos_params_dscp_val = cfg.qos_params_dscp_val
+        self.qos_params_so_prio = cfg.qos_params_so_prio
+        self.qos_params_wmm_prio = cfg.qos_params_wmm_prio
+
     def _cvt_to_pjsua(self):
         cfg = _pjsua.transport_config_default()
@@ -491,4 +534,10 @@
         cfg.bound_addr = self.bound_addr
         cfg.public_addr = self.public_addr
+        cfg.qos_type = self.qos_type
+        cfg.qos_params_flags = self.qos_params_flags
+        cfg.qos_params_dscp_val = self.qos_params_dscp_val
+        cfg.qos_params_so_prio = self.qos_params_so_prio
+        cfg.qos_params_wmm_prio = self.qos_params_wmm_prio
+
         return cfg
 
@@ -705,4 +754,6 @@
                                transport such as TLS is required, 2=end-to-
                                end secure transport is required (i.e. "sips").
+    rtp_transport_cfg       -- the rtp-transport-configuration that is usede, when
+                               a rtp-connection is being established.
     """
     priority = 0
@@ -724,4 +775,5 @@
     use_srtp = 0
     srtp_secure_signaling = 1
+    rtp_transport_cfg = None
 
     def __init__(self, domain="", username="", password="", 
@@ -749,7 +801,8 @@
             self.build_config(domain, username, password,
                               display, registrar, proxy)
+        self.rtp_transport_cfg = _pjsua.transport_config_default()
 
     def build_config(self, domain, username, password, display="",
-                     registrar="", proxy=""):
+                     registrar="", proxy="", rtp_transport_cfg = None):
         """
         Construct account config. If domain argument is specified, 
@@ -785,4 +838,9 @@
         if username != "":
             self.auth_cred.append(AuthCred("*", username, password))
+        
+        if (rtp_transport_cfg is not None):
+            self.rtp_transport_cfg = rtp_transport_cfg
+        else:
+            self.rtp_transport_cfg = _pjsua.Transport_Config()
     
     def _cvt_from_pjsua(self, cfg):
@@ -808,4 +866,6 @@
         self.use_srtp = cfg.use_srtp
         self.srtp_secure_signaling = cfg.srtp_secure_signaling
+        if (self.rtp_transport_cfg is not None):
+            self.rtp_transport_cfg._cvt_from_pjsua(cfg.rtp_transport_cfg)
 
     def _cvt_to_pjsua(self):
@@ -828,4 +888,5 @@
             c.data = cred.passwd
             cfg.cred_info.append(c)
+            
         cfg.auth_initial_send = self.auth_initial_send
         cfg.auth_initial_algorithm = self.auth_initial_algorithm
@@ -836,4 +897,7 @@
         cfg.use_srtp = self.use_srtp
         cfg.srtp_secure_signaling = self.srtp_secure_signaling
+
+        cfg.rtp_transport_cfg = self.rtp_transport_cfg._cvt_to_pjsua()
+        
         return cfg
  
