Changeset 293 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Mar 6, 2006 1:35:47 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r284 r293 284 284 285 285 status = pjsip_inv_initial_answer(inv, rdata, 286 (pjsua.auto_answer ? 200 : 100), 286 (pjsua.auto_answer ? pjsua.auto_answer 287 : 100), 287 288 NULL, NULL, &response); 288 289 if (status != PJ_SUCCESS) { 289 290 290 pjsua_perror(THIS_FILE, "Unable to create 100 response", status); 291 292 pjsip_dlg_respond(dlg, rdata, 500, NULL, NULL, NULL); 293 pjsip_inv_terminate(inv, 500, PJ_FALSE); 291 int st_code; 292 293 pjsua_perror(THIS_FILE, "Unable to send answer to incoming INVITE", 294 status); 295 296 /* If failed to send 2xx response, there's a good chance that it is 297 * because SDP negotiation has failed. 298 */ 299 if (pjsua.auto_answer/100 == 2) 300 st_code = PJSIP_SC_UNSUPPORTED_MEDIA_TYPE; 301 else 302 st_code = 500; 303 304 pjsip_dlg_respond(dlg, rdata, st_code, NULL, NULL, NULL); 305 pjsip_inv_terminate(inv, st_code, PJ_FALSE); 306 return PJ_TRUE; 294 307 295 308 } else { … … 763 776 pjsua_perror(THIS_FILE, "SDP negotiation has failed", status); 764 777 765 /* Disconnect call if this is not a re-INVITE */ 766 if (inv->state != PJSIP_INV_STATE_CONFIRMED) { 778 /* Disconnect call if we're not in the middle of initializing an 779 * UAS dialog and if this is not a re-INVITE 780 */ 781 if (inv->state != PJSIP_INV_STATE_NULL && 782 inv->state != PJSIP_INV_STATE_CONFIRMED) 783 { 767 784 call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE); 768 785 }
Note: See TracChangeset
for help on using the changeset viewer.