Changeset 738 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Sep 25, 2006 1:40:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r737 r738 395 395 PJSUA_LOCK(); 396 396 397 /* Verify that we can handle the request. */398 status = pjsip_inv_verify_request(rdata, &options, NULL, NULL,399 pjsua_var.endpt, &response);400 if (status != PJ_SUCCESS) {401 402 /*403 * No we can't handle the incoming INVITE request.404 */405 406 if (response) {407 pjsip_response_addr res_addr;408 409 pjsip_get_response_addr(response->pool, rdata, &res_addr);410 pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response,411 NULL, NULL);412 413 } else {414 415 /* Respond with 500 (Internal Server Error) */416 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,417 NULL, NULL);418 }419 420 PJSUA_UNLOCK();421 return PJ_TRUE;422 }423 424 425 /*426 * Yes we can handle the incoming INVITE request.427 */428 429 397 /* Find free call slot. */ 430 398 for (call_id=0; call_id<(int)pjsua_var.ua_cfg.max_calls; ++call_id) { … … 461 429 return PJ_TRUE; 462 430 } 431 432 433 /* Verify that we can handle the request. */ 434 status = pjsip_inv_verify_request(rdata, &options, answer, NULL, 435 pjsua_var.endpt, &response); 436 if (status != PJ_SUCCESS) { 437 438 /* 439 * No we can't handle the incoming INVITE request. 440 */ 441 442 if (response) { 443 pjsip_response_addr res_addr; 444 445 pjsip_get_response_addr(response->pool, rdata, &res_addr); 446 pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response, 447 NULL, NULL); 448 449 } else { 450 451 /* Respond with 500 (Internal Server Error) */ 452 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 453 NULL, NULL); 454 } 455 456 PJSUA_UNLOCK(); 457 return PJ_TRUE; 458 } 459 463 460 464 461 /* … … 1838 1835 pjsua_perror(THIS_FILE, "SDP negotiation has failed", status); 1839 1836 1837 /* Stop/destroy media, if any */ 1838 call_destroy_media(call->index); 1839 1840 1840 /* Disconnect call if we're not in the middle of initializing an 1841 1841 * UAS dialog and if this is not a re-INVITE
Note: See TracChangeset
for help on using the changeset viewer.