Changeset 2191 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Aug 4, 2008 3:01:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2176 r2191 2211 2211 ring_stop(call_id); 2212 2212 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 { 2214 2219 pj_bool_t connect_sound = PJ_TRUE; 2215 2220 … … 2279 2284 } 2280 2285 } 2281 2286 } 2287 2288 /* Handle media status */ 2289 switch (call_info.media_status) { 2290 case PJSUA_CALL_MEDIA_ACTIVE: 2282 2291 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: 2285 2295 PJ_LOG(3,(THIS_FILE, "Media for call %d is suspended (hold) by local", 2286 2296 call_id)); 2287 } else if (call_info.media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD) { 2297 break; 2298 2299 case PJSUA_CALL_MEDIA_REMOTE_HOLD: 2288 2300 PJ_LOG(3,(THIS_FILE, 2289 2301 "Media for call %d is suspended (hold) by remote", 2290 2302 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, 2295 2307 "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: 2300 2315 PJ_LOG(3,(THIS_FILE, 2301 2316 "Media for call %d is inactive", 2302 2317 call_id)); 2318 break; 2319 2320 default: 2321 pj_assert(!"Unhandled media status"); 2322 break; 2303 2323 } 2304 2324 }
Note: See TracChangeset
for help on using the changeset viewer.