Ignore:
Timestamp:
Aug 4, 2008 3:01:38 PM (16 years ago)
Author:
nanang
Message:

Ticket #563: Updated SDP offer/answer related to call hold scenario to conform to RFC 3264 section 8.4 (before: 'a=inactive' and 'c=0.0.0.0', now: 'a=sendonly' and muted ports).

File:
1 edited

Legend:

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

    r2135 r2191  
    12321232        pj_memcpy(&sess_info.stream_info[0], si, sizeof(pjmedia_stream_info)); 
    12331233 
    1234     /* Check if media is put on-hold */ 
     1234    /* Check if no media is active */ 
    12351235    if (sess_info.stream_cnt == 0 || si->dir == PJMEDIA_DIR_NONE) 
    12361236    { 
    1237  
    1238         /* Determine who puts the call on-hold */ 
    1239         if (prev_media_st == PJSUA_CALL_MEDIA_ACTIVE) { 
    1240             if (pjmedia_sdp_neg_was_answer_remote(call->inv->neg)) { 
    1241                 /* It was local who offer hold */ 
    1242                 call->media_st = PJSUA_CALL_MEDIA_LOCAL_HOLD; 
    1243             } else { 
    1244                 call->media_st = PJSUA_CALL_MEDIA_REMOTE_HOLD; 
    1245             } 
    1246         } 
    1247  
     1237        /* Call media state */ 
     1238        call->media_st = PJSUA_CALL_MEDIA_NONE; 
     1239 
     1240        /* Call media direction */ 
    12481241        call->media_dir = PJMEDIA_DIR_NONE; 
    12491242 
     
    13681361        } 
    13691362 
    1370         /* Call's media state is active */ 
    1371         call->media_st = PJSUA_CALL_MEDIA_ACTIVE; 
     1363        /* Call media direction */ 
    13721364        call->media_dir = si->dir; 
     1365 
     1366        /* Call media state */ 
     1367        if (call->local_hold) 
     1368            call->media_st = PJSUA_CALL_MEDIA_LOCAL_HOLD; 
     1369        else if (call->media_dir == PJMEDIA_DIR_DECODING) 
     1370            call->media_st = PJSUA_CALL_MEDIA_REMOTE_HOLD; 
     1371        else 
     1372            call->media_st = PJSUA_CALL_MEDIA_ACTIVE; 
    13731373    } 
    13741374 
Note: See TracChangeset for help on using the changeset viewer.