Ignore:
Timestamp:
Mar 19, 2013 3:51:10 AM (9 years ago)
Author:
nanang
Message:

Re #1644: Added run-time setting 'pjsip_cfg()->follow_early_media_fork' and compile-time setting 'PJSIP_FOLLOW_EARLY_MEDIA_FORK', the default value is PJ_TRUE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r4425 r4441  
    17361736    if (tsx_inv_data->sdp_done) { 
    17371737        pj_str_t res_tag; 
     1738        int st_code; 
    17381739 
    17391740        res_tag = rdata->msg_info.to->tag; 
    1740  
    1741         /* Allow final response after SDP has been negotiated in early 
    1742          * media, IF this response is a final response with different 
     1741        st_code = rdata->msg_info.msg->line.status.code; 
     1742 
     1743        /* Allow final/early response after SDP has been negotiated in early 
     1744         * media, IF this response is a final/early response with different 
    17431745         * tag. 
    17441746         */ 
    17451747        if (tsx->role == PJSIP_ROLE_UAC && 
    1746             rdata->msg_info.msg->line.status.code/100 == 2 && 
     1748            (st_code/100 == 2 || 
     1749             (st_code==183 && pjsip_cfg()->endpt.follow_early_media_fork)) && 
    17471750            tsx_inv_data->done_early && 
    17481751            pj_stricmp(&tsx_inv_data->done_tag, &res_tag)) 
     
    17501753            const pjmedia_sdp_session *reoffer_sdp = NULL; 
    17511754 
    1752             PJ_LOG(4,(inv->obj_name, "Received forked final response " 
     1755            PJ_LOG(4,(inv->obj_name, "Received forked %s response " 
    17531756                      "after SDP negotiation has been done in early " 
    1754                       "media. Renegotiating SDP..")); 
     1757                      "media. Renegotiating SDP..", 
     1758                      (st_code==183? "early" : "final" ))); 
    17551759 
    17561760            /* Retrieve original SDP offer from INVITE request */ 
     
    17641768            if (status != PJ_SUCCESS) { 
    17651769                PJ_LOG(1,(inv->obj_name, "Error updating local offer for " 
    1766                           "forked 2xx response (err=%d)", status)); 
     1770                          "forked 2xx/183 response (err=%d)", status)); 
    17671771                return status; 
    17681772            } 
Note: See TracChangeset for help on using the changeset viewer.