Ignore:
Timestamp:
Apr 3, 2013 10:04:18 AM (12 years ago)
Author:
nanang
Message:

Fix #1811: Set SDP direction attribute to "sendonly" in answering call unhold request after double holds to maintain the local hold status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r4457 r4458  
    37543754static pj_status_t modify_sdp_of_call_hold(pjsua_call *call, 
    37553755                                           pj_pool_t *pool, 
    3756                                            pjmedia_sdp_session *sdp) 
     3756                                           pjmedia_sdp_session *sdp, 
     3757                                           pj_bool_t as_answerer) 
    37573758{ 
    37583759    unsigned mi; 
     
    38053806            pjmedia_sdp_media_remove_all_attr(m, "inactive"); 
    38063807 
    3807             if (call->media[mi].dir & PJMEDIA_DIR_ENCODING) { 
     3808            /* When as answerer, just simply set dir to "sendonly", note that 
     3809             * if the offer uses "sendonly" or "inactive", the SDP negotiator 
     3810             * will change our answer dir to "inactive". 
     3811             */ 
     3812            if (as_answerer || (call->media[mi].dir & PJMEDIA_DIR_ENCODING)) { 
    38083813                /* Add sendonly attribute */ 
    38093814                attr = pjmedia_sdp_attr_create(pool, "sendonly", NULL); 
     
    38393844    } 
    38403845 
    3841     status = modify_sdp_of_call_hold(call, pool, sdp); 
     3846    status = modify_sdp_of_call_hold(call, pool, sdp, PJ_FALSE); 
    38423847    if (status != PJ_SUCCESS) 
    38433848        return status; 
     
    39293934    /* Check if call is on-hold */ 
    39303935    if (call->local_hold) { 
    3931         modify_sdp_of_call_hold(call, call->inv->pool_prov, answer); 
     3936        modify_sdp_of_call_hold(call, call->inv->pool_prov, answer, PJ_TRUE); 
    39323937    } 
    39333938 
Note: See TracChangeset for help on using the changeset viewer.