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-apps/src/pjsua/pjsua_app.c

    r2176 r2191  
    22112211    ring_stop(call_id); 
    22122212 
    2213     if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE) { 
     2213    /* Connect ports appropriately when media status is ACTIVE or REMOTE HOLD, 
     2214     * otherwise we should NOT connect the ports. 
     2215     */ 
     2216    if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE || 
     2217        call_info.media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD) 
     2218    { 
    22142219        pj_bool_t connect_sound = PJ_TRUE; 
    22152220 
     
    22792284            } 
    22802285        } 
    2281  
     2286    } 
     2287 
     2288    /* Handle media status */ 
     2289    switch (call_info.media_status) { 
     2290    case PJSUA_CALL_MEDIA_ACTIVE: 
    22822291        PJ_LOG(3,(THIS_FILE, "Media for call %d is active", call_id)); 
    2283  
    2284     } else if (call_info.media_status == PJSUA_CALL_MEDIA_LOCAL_HOLD) { 
     2292        break; 
     2293 
     2294    case PJSUA_CALL_MEDIA_LOCAL_HOLD: 
    22852295        PJ_LOG(3,(THIS_FILE, "Media for call %d is suspended (hold) by local", 
    22862296                  call_id)); 
    2287     } else if (call_info.media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD) { 
     2297        break; 
     2298 
     2299    case PJSUA_CALL_MEDIA_REMOTE_HOLD: 
    22882300        PJ_LOG(3,(THIS_FILE,  
    22892301                  "Media for call %d is suspended (hold) by remote", 
    22902302                  call_id)); 
    2291     } else if (call_info.media_status == PJSUA_CALL_MEDIA_ERROR) { 
    2292         pj_str_t reason = pj_str("ICE negotiation failed"); 
    2293  
    2294         PJ_LOG(1,(THIS_FILE, 
     2303        break; 
     2304 
     2305    case PJSUA_CALL_MEDIA_ERROR: 
     2306        PJ_LOG(3,(THIS_FILE, 
    22952307                  "Media has reported error, disconnecting call")); 
    2296  
    2297         pjsua_call_hangup(call_id, 500, &reason, NULL); 
    2298  
    2299     } else { 
     2308        { 
     2309            pj_str_t reason = pj_str("ICE negotiation failed"); 
     2310            pjsua_call_hangup(call_id, 500, &reason, NULL); 
     2311        } 
     2312        break; 
     2313 
     2314    case PJSUA_CALL_MEDIA_NONE: 
    23002315        PJ_LOG(3,(THIS_FILE,  
    23012316                  "Media for call %d is inactive", 
    23022317                  call_id)); 
     2318        break; 
     2319 
     2320    default: 
     2321        pj_assert(!"Unhandled media status"); 
     2322        break; 
    23032323    } 
    23042324} 
Note: See TracChangeset for help on using the changeset viewer.