Changeset 1742 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Jan 24, 2008 7:20:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1735 r1742 402 402 /* Init media channel */ 403 403 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC, 404 get_secure_level(dest_uri) );404 get_secure_level(dest_uri), NULL); 405 405 if (status != PJ_SUCCESS) { 406 406 pjsua_perror(THIS_FILE, "Error initializing media channel", status); … … 412 412 offer = NULL; 413 413 #else 414 status = pjsua_media_channel_create_sdp(call->index, dlg->pool, NULL, &offer); 414 status = pjsua_media_channel_create_sdp(call->index, dlg->pool, NULL, 415 &offer, NULL); 415 416 if (status != PJ_SUCCESS) { 416 417 pjsua_perror(THIS_FILE, "pjmedia unable to create SDP", status); … … 559 560 pjsua_call *call; 560 561 int call_id = -1; 561 int secure_level ;562 int secure_level, sip_err_code; 562 563 pjmedia_sdp_session *offer, *answer; 563 564 pj_status_t status; … … 692 693 /* Init media channel */ 693 694 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAS, 694 secure_level); 695 if (status != PJ_SUCCESS) { 696 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 695 secure_level, &sip_err_code); 696 if (status != PJ_SUCCESS) { 697 pjsua_perror(THIS_FILE, "Error initializing media channel", status); 698 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 699 sip_err_code, NULL, 697 700 NULL, NULL); 698 701 PJSUA_UNLOCK(); … … 719 722 /* Get media capability from media endpoint: */ 720 723 status = pjsua_media_channel_create_sdp(call->index, rdata->tp_info.pool, 721 offer, &answer); 722 if (status != PJ_SUCCESS) { 723 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, 724 offer, &answer, &sip_err_code); 725 if (status != PJ_SUCCESS) { 726 pjsua_perror(THIS_FILE, "Error creating SDP answer", status); 727 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 728 sip_err_code, NULL, 724 729 NULL, NULL); 725 730 pjsua_media_channel_deinit(call->index); … … 1425 1430 /* Init media channel */ 1426 1431 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC, 1427 get_secure_level(&dlg->remote.info_str)); 1432 get_secure_level(&dlg->remote.info_str), 1433 NULL); 1428 1434 if (status != PJ_SUCCESS) { 1429 1435 pjsua_perror(THIS_FILE, "Error initializing media channel", status); … … 1436 1442 PJ_TODO(create_active_inactive_sdp_based_on_unhold_arg); 1437 1443 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 1438 NULL, &sdp );1444 NULL, &sdp, NULL); 1439 1445 if (status != PJ_SUCCESS) { 1440 1446 pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", … … 1495 1501 /* Init media channel */ 1496 1502 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC, 1497 get_secure_level(&dlg->remote.info_str)); 1503 get_secure_level(&dlg->remote.info_str), 1504 NULL); 1498 1505 if (status != PJ_SUCCESS) { 1499 1506 pjsua_perror(THIS_FILE, "Error initializing media channel", status); … … 1504 1511 /* Create SDP */ 1505 1512 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 1506 NULL, &sdp );1513 NULL, &sdp, NULL); 1507 1514 if (status != PJ_SUCCESS) { 1508 1515 pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", … … 2624 2631 secure_level = get_secure_level(&call->inv->dlg->remote.info_str); 2625 2632 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAS, 2626 secure_level );2633 secure_level, NULL); 2627 2634 if (status != PJ_SUCCESS) { 2628 2635 pjsua_perror(THIS_FILE, "Error initializing media channel", status); … … 2632 2639 2633 2640 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 2634 offer, &answer );2641 offer, &answer, NULL); 2635 2642 } 2636 2643 … … 2680 2687 secure_level = get_secure_level(&call->inv->dlg->remote.info_str); 2681 2688 status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC, 2682 secure_level );2689 secure_level, NULL); 2683 2690 if (status != PJ_SUCCESS) { 2684 2691 pjsua_perror(THIS_FILE, "Error initializing media channel", status); … … 2688 2695 2689 2696 status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, 2690 NULL, offer );2697 NULL, offer, NULL); 2691 2698 } 2692 2699
Note: See TracChangeset
for help on using the changeset viewer.