Changeset 3219


Ignore:
Timestamp:
Jun 23, 2010 12:38:28 PM (10 years ago)
Author:
bennylp
Message:

Fixed #1079 (Media transport should be kept alive during double-hold scenario). Details:

  • now the stream will be destroyed but the media transport will be kept alive during doublehold scenario
  • small fix in SRTP to also negotiate crypto even when the media is marked as inactive, otherwise it's possible that an "optional" endpoint would create RTP/AVP offer and send it to "mandatory" endpoint, which would be rejected and cause the media port to be set to zero
Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r3191 r3219  
    11661166 
    11671167    /* If the media is inactive, do nothing. */ 
     1168    /* No, we still need to process SRTP offer/answer even if the media is 
     1169     * marked as inactive, because the transport is still alive in this 
     1170     * case (e.g. for keep-alive). See: 
     1171     *   http://trac.pjsip.org/repos/ticket/1079 
     1172     */ 
     1173    /* 
    11681174    if (pjmedia_sdp_media_find_attr(m_loc, &ID_INACTIVE, NULL) ||  
    11691175        (m_rem && pjmedia_sdp_media_find_attr(m_rem, &ID_INACTIVE, NULL))) 
    11701176        goto BYPASS_SRTP; 
     1177    */ 
    11711178 
    11721179    /* Check remote media transport & set local media transport  
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r3206 r3219  
    21852185        } 
    21862186 
    2187         if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING) 
     2187        if (call->media_dir == PJMEDIA_DIR_NONE) { 
     2188            /* To handle when the stream that is currently being paused 
     2189             * (http://trac.pjsip.org/repos/ticket/1079) 
     2190             */ 
     2191            dir = "inactive"; 
     2192        } else if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING) 
    21882193            dir = "sendonly"; 
    21892194        else if (info.stream_info[i].dir == PJMEDIA_DIR_DECODING) 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r3215 r3219  
    15581558        call->media_dir = PJMEDIA_DIR_NONE; 
    15591559 
     1560        /* Don't stop transport because we need to transmit keep-alives, and 
     1561         * also to prevent restarting ICE negotiation. See 
     1562         *  http://trac.pjsip.org/repos/ticket/1094 
     1563         */ 
     1564#if 0 
    15601565        /* Shutdown transport's session */ 
    15611566        pjmedia_transport_media_stop(call->med_tp); 
     
    15691574            call->med_tp = call->med_orig; 
    15701575        } 
     1576#endif 
    15711577 
    15721578    } else { 
Note: See TracChangeset for help on using the changeset viewer.