Ignore:
Timestamp:
May 29, 2009 1:04:03 PM (15 years ago)
Author:
bennylp
Message:

Integration of Sipit24 branch, many tickets involved:

  • #793: AMR encoder should regard 'mode-set' param specified by remote decoder.
  • #831: Automatically switch to TCP transport when sending large request
  • #832: Support for outbound proxy setting without using Route header
  • #849: Modify conference audio switch behavior in connecting ports.
  • #850: Remove 'Require=replaces' param in 'Refer-To' header (in call transfer with replaces).
  • #851: Support for regular nomination in ICE
  • #852: --ip-addr support for IPv6 for media transport in pjsua
  • #854: Adding SOFTWARE attribute in all outgoing requests may cause compatibility problem with older STUN server (thanks Alexei Kuznetsov for the report)
  • #855: Bug in digit map frequencies for DTMF digits (thanks FCCH for the report)
  • #856: Put back the ICE candidate priority values according to the default values in the draft-mmusic-ice
  • #857: Support for ICE keep-alive with Binding indication
  • #858: Do not authenticate STUN 438 response
  • #859: AMR-WB format param in the SDP is not negotiated correctly.
  • #867: Return error instead of asserting when PJSUA-LIB fails to open log file
File:
1 edited

Legend:

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

    r2650 r2724  
    265265    puts  ("Media Transport Options:"); 
    266266    puts  ("  --use-ice           Enable ICE (default:no)"); 
    267     puts  ("  --ice-no-host       Disable ICE host candidates (default: no)"); 
     267    puts  ("  --ice-regular       Use ICE regular nomination (default: aggressive)"); 
     268    puts  ("  --ice-max-hosts=N   Set maximum number of ICE host candidates"); 
    268269    puts  ("  --ice-no-rtcp       Disable RTCP component in ICE (default: no)"); 
    269270    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)"); 
     
    477478           OPT_AUTO_ANSWER, OPT_AUTO_PLAY, OPT_AUTO_PLAY_HANGUP, OPT_AUTO_LOOP, 
    478479           OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_SND_CLOCK_RATE, OPT_STEREO, 
    479            OPT_USE_ICE, OPT_USE_SRTP, OPT_SRTP_SECURE, 
    480            OPT_USE_TURN, OPT_ICE_NO_HOST, OPT_ICE_NO_RTCP, OPT_TURN_SRV,  
     480           OPT_USE_ICE, OPT_ICE_REGULAR, OPT_USE_SRTP, OPT_SRTP_SECURE, 
     481           OPT_USE_TURN, OPT_ICE_MAX_HOSTS, OPT_ICE_NO_RTCP, OPT_TURN_SRV,  
    481482           OPT_TURN_TCP, OPT_TURN_USER, OPT_TURN_PASSWD, 
    482483           OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC,  
     
    554555 
    555556        { "use-ice",    0, 0, OPT_USE_ICE}, 
     557        { "ice-regular",0, 0, OPT_ICE_REGULAR}, 
    556558        { "use-turn",   0, 0, OPT_USE_TURN}, 
    557         { "ice-no-host",0, 0, OPT_ICE_NO_HOST}, 
     559        { "ice-max-hosts",1, 0, OPT_ICE_MAX_HOSTS}, 
    558560        { "ice-no-rtcp",0, 0, OPT_ICE_NO_RTCP}, 
    559561        { "turn-srv",   1, 0, OPT_TURN_SRV}, 
     
    993995            break; 
    994996 
     997        case OPT_ICE_REGULAR: 
     998            cfg->media_cfg.ice_opt.aggressive = PJ_FALSE; 
     999            break; 
     1000 
    9951001        case OPT_USE_TURN: 
    9961002            cfg->media_cfg.enable_turn = PJ_TRUE; 
    9971003            break; 
    9981004 
    999         case OPT_ICE_NO_HOST: 
    1000             cfg->media_cfg.ice_no_host_cands = PJ_TRUE; 
     1005        case OPT_ICE_MAX_HOSTS: 
     1006            cfg->media_cfg.ice_max_host_cands = my_atoi(pj_optarg); 
    10011007            break; 
    10021008 
     
    16451651        pj_strcat2(&cfg, "--use-ice\n"); 
    16461652 
     1653    if (config->media_cfg.ice_opt.aggressive == PJ_FALSE) 
     1654        pj_strcat2(&cfg, "--ice-regular\n"); 
     1655 
    16471656    if (config->media_cfg.enable_turn) 
    16481657        pj_strcat2(&cfg, "--use-turn\n"); 
    16491658 
    1650     if (config->media_cfg.ice_no_host_cands) 
    1651         pj_strcat2(&cfg, "--ice-no-host\n"); 
     1659    if (config->media_cfg.ice_max_host_cands >= 0) { 
     1660        pj_ansi_sprintf(line, "--ice_max_host_cands %d\n", 
     1661                        config->media_cfg.ice_max_host_cands); 
     1662        pj_strcat2(&cfg, line); 
     1663    } 
    16521664 
    16531665    if (config->media_cfg.ice_no_rtcp) 
     
    18861898    } 
    18871899 
    1888     if (config->cfg.force_lr) { 
     1900    if (!config->cfg.force_lr) { 
    18891901        pj_strcat2(&cfg, "--no-force-lr\n"); 
    18901902    } 
     
    36883700                } 
    36893701 
    3690                 pjsua_call_xfer_replaces(call, dst_call, 0, &msg_data); 
     3702                pjsua_call_xfer_replaces(call, dst_call,  
     3703                                         PJSUA_XFER_NO_REQUIRE_REPLACES,  
     3704                                         &msg_data); 
    36913705            } 
    36923706            break; 
     
    47194733    for (i=0; i<app_config.cfg.max_calls; ++i) { 
    47204734        enum { MAX_RETRY = 10 }; 
     4735        pj_sock_t sock[2]; 
     4736        pjmedia_sock_info si; 
    47214737        unsigned j; 
    47224738 
     
    47254741 
    47264742        for (j=0; j<MAX_RETRY; ++j) { 
    4727             status = pjmedia_transport_udp_create3(pjsua_get_pjmedia_endpt(),  
    4728                                                    pj_AF_INET6(), 
    4729                                                    NULL,  
    4730                                                    &app_config.rtp_cfg.bound_addr, 
    4731                                                    port,  
    4732                                                    0, &tp[i].transport); 
    4733  
     4743            unsigned k; 
     4744 
     4745            for (k=0; k<2; ++k) { 
     4746                pj_sockaddr bound_addr; 
     4747 
     4748                status = pj_sock_socket(pj_AF_INET6(), pj_SOCK_DGRAM(), 0, &sock[k]); 
     4749                if (status != PJ_SUCCESS) 
     4750                    break; 
     4751 
     4752                status = pj_sockaddr_init(pj_AF_INET6(), &bound_addr, 
     4753                                          &app_config.rtp_cfg.bound_addr,  
     4754                                          (unsigned short)(port+k)); 
     4755                if (status != PJ_SUCCESS) 
     4756                    break; 
     4757 
     4758                status = pj_sock_bind(sock[k], &bound_addr,  
     4759                                      pj_sockaddr_get_len(&bound_addr)); 
     4760                if (status != PJ_SUCCESS) 
     4761                    break; 
     4762            } 
     4763            if (status != PJ_SUCCESS) { 
     4764                if (k==1) 
     4765                    pj_sock_close(sock[0]); 
     4766 
     4767                if (port != 0) 
     4768                    port += 10; 
     4769                else 
     4770                    break; 
     4771 
     4772                continue; 
     4773            } 
     4774 
     4775            pj_bzero(&si, sizeof(si)); 
     4776            si.rtp_sock = sock[0]; 
     4777            si.rtcp_sock = sock[1]; 
     4778         
     4779            pj_sockaddr_init(pj_AF_INET6(), &si.rtp_addr_name,  
     4780                             &app_config.rtp_cfg.public_addr,  
     4781                             (unsigned short)(port)); 
     4782            pj_sockaddr_init(pj_AF_INET6(), &si.rtcp_addr_name,  
     4783                             &app_config.rtp_cfg.public_addr,  
     4784                             (unsigned short)(port+1)); 
     4785 
     4786            status = pjmedia_transport_udp_attach(pjsua_get_pjmedia_endpt(), 
     4787                                                  NULL, 
     4788                                                  &si, 
     4789                                                  0, 
     4790                                                  &tp[i].transport); 
    47344791            if (port != 0) 
    47354792                port += 10; 
Note: See TracChangeset for help on using the changeset viewer.