Ignore:
Timestamp:
Oct 25, 2009 9:02:07 AM (14 years ago)
Author:
bennylp
Message:

Initial commit for ticket #950: QoS support:

  • implementation:
    • PJLIB (sock_qos*.*)
  • added QoS support in:
    • SIP UDP transport,
    • SIP TCP transport,
    • media UDP transport (done in pjsua-lib),
    • pjnath ICE stream transport,
    • pjnath STUN socket,
    • pjnath TURN client
  • added QoS options in pjsua-lib:
    • QoS fields in pjsua_transport_config
  • added "--set-qos" parameter in pjsua

Notes:

  • QoS in TLS transport is not yet implemented, waiting for #957
  • build ok on VS6, VS2005 (multiple targets), Carbide, and Mingw
  • no run-time testing yet
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r2956 r2966  
    6060    pj_bool_t               no_refersub; 
    6161    pj_bool_t               ipv6; 
     62    pj_bool_t               enable_qos; 
    6263    pj_bool_t               no_tcp; 
    6364    pj_bool_t               no_udp; 
     
    208209    puts  ("  --ipv6              Use IPv6 instead for SIP and media."); 
    209210#endif 
     211    puts  ("  --set-qos           Enable QoS tagging for SIP and media."); 
    210212    puts  ("  --local-port=port   Set TCP/UDP port. This implicitly enables both "); 
    211213    puts  ("                      TCP and UDP transports on the specified port, unless"); 
     
    501503           OPT_CAPTURE_DEV, OPT_PLAYBACK_DEV, 
    502504           OPT_CAPTURE_LAT, OPT_PLAYBACK_LAT, OPT_NO_TONES, OPT_JB_MAX_SIZE, 
    503            OPT_STDOUT_REFRESH, OPT_STDOUT_REFRESH_TEXT, OPT_IPV6, 
     505           OPT_STDOUT_REFRESH, OPT_STDOUT_REFRESH_TEXT, OPT_IPV6, OPT_QOS, 
    504506#ifdef _IONBF 
    505507           OPT_STDOUT_NO_BUF, 
     
    617619        { "ipv6",        0, 0, OPT_IPV6}, 
    618620#endif 
     621        { "set-qos",     0, 0, OPT_QOS}, 
    619622        { "use-timer",  0, 0, OPT_TIMER}, 
    620623        { "timer-se",   1, 0, OPT_TIMER_SE}, 
     
    13281331            break; 
    13291332#endif 
    1330  
     1333        case OPT_QOS: 
     1334            cfg->enable_qos = PJ_TRUE; 
     1335            /* Set RTP traffic type to Voice */ 
     1336            cfg->rtp_cfg.qos_type = PJ_QOS_TYPE_VOICE; 
     1337            /* Directly apply DSCP value to SIP traffic. Say lets 
     1338             * set it to CS3 (DSCP 011000). Note that this will not  
     1339             * work on all platforms. 
     1340             */ 
     1341            cfg->udp_cfg.qos_params.flags = PJ_QOS_PARAM_HAS_DSCP; 
     1342            cfg->udp_cfg.qos_params.dscp_val = 0x18; 
     1343            break; 
    13311344        default: 
    13321345            PJ_LOG(1,(THIS_FILE,  
     
    16071620    if (config->ipv6) { 
    16081621        pj_strcat2(&cfg, "--ipv6\n"); 
     1622    } 
     1623    if (config->enable_qos) { 
     1624        pj_strcat2(&cfg, "--set-qos\n"); 
    16091625    } 
    16101626 
Note: See TracChangeset for help on using the changeset viewer.