- Timestamp:
- Jan 17, 2008 5:29:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/users/nanang/pjsip/src/pjsua-lib/pjsua_call.c
r1693 r1698 335 335 offer = NULL; 336 336 #else 337 status = pjsua_media_channel_create_sdp(call->index, dlg->pool, &offer);337 status = pjsua_media_channel_create_sdp(call->index, dlg->pool, NULL, &offer); 338 338 if (status != PJ_SUCCESS) { 339 339 pjsua_perror(THIS_FILE, "pjmedia unable to create SDP", status); … … 482 482 pjsua_call *call; 483 483 int call_id = -1; 484 pjmedia_sdp_session * answer;484 pjmedia_sdp_session *offer, *answer; 485 485 pj_status_t status; 486 486 … … 590 590 } 591 591 592 /* Parse SDP from incoming request */ 593 if (rdata->msg_info.msg->body) { 594 status = pjmedia_sdp_parse(rdata->tp_info.pool, 595 rdata->msg_info.msg->body->data, 596 rdata->msg_info.msg->body->len, &offer); 597 if (status != PJ_SUCCESS) { 598 pjsua_perror(THIS_FILE, "Error parsing SDP in incoming INVITE", status); 599 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 400, NULL, 600 NULL, NULL); 601 pjsua_media_channel_deinit(call->index); 602 PJSUA_UNLOCK(); 603 return PJ_TRUE; 604 } 605 } else { 606 offer = NULL; 607 } 592 608 593 609 /* Get media capability from media endpoint: */ 594 status = pjsua_media_channel_create_sdp(call->index, rdata->tp_info.pool, &answer); 610 status = pjsua_media_channel_create_sdp(call->index, rdata->tp_info.pool, 611 offer, &answer); 595 612 if (status != PJ_SUCCESS) { 596 613 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, … … 613 630 options |= PJSIP_INV_REQUIRE_100REL; 614 631 615 status = pjsip_inv_verify_request (rdata, &options, answer, NULL,616 pjsua_var.endpt, &response);632 status = pjsip_inv_verify_request2(rdata, &options, offer, answer, NULL, 633 pjsua_var.endpt, &response); 617 634 if (status != PJ_SUCCESS) { 618 635 … … 1314 1331 PJ_UNUSED_ARG(unhold); 1315 1332 PJ_TODO(create_active_inactive_sdp_based_on_unhold_arg); 1316 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, &sdp); 1333 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 1334 NULL, &sdp); 1317 1335 if (status != PJ_SUCCESS) { 1318 1336 pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", … … 1380 1398 1381 1399 /* Create SDP */ 1382 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, &sdp); 1400 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 1401 NULL, &sdp); 1383 1402 if (status != PJ_SUCCESS) { 1384 1403 pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", … … 2321 2340 { 2322 2341 pjsua_call *call; 2323 constpjmedia_sdp_session *local_sdp;2342 pjmedia_sdp_session *local_sdp; 2324 2343 const pjmedia_sdp_session *remote_sdp; 2325 2344 … … 2502 2521 } 2503 2522 2504 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, &answer); 2523 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 2524 offer, &answer); 2505 2525 } 2506 2526 … … 2554 2574 } 2555 2575 2556 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, offer); 2576 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 2577 NULL, offer); 2557 2578 } 2558 2579
Note: See TracChangeset
for help on using the changeset viewer.