- Timestamp:
- Sep 22, 2006 4:55:42 PM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/config.h
r689 r734 345 345 * flag is set. 346 346 * 347 * Default: 1500347 * Default: 2000 348 348 */ 349 349 #ifndef PJ_LOG_MAX_SIZE 350 # define PJ_LOG_MAX_SIZE 1500350 # define PJ_LOG_MAX_SIZE 2000 351 351 #endif 352 352 -
pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c
r582 r734 895 895 * Reject the offer by setting the port to zero in the answer. 896 896 */ 897 pjmedia_sdp_attr *a; 898 897 899 /* For simplicity in the construction of the answer, we'll 898 900 * just clone the media from the offer. Anyway receiver will … … 903 905 am->desc.port = 0; 904 906 905 /* Match direction */ 906 update_media_direction(pool, om, am); 907 /* Remove direction attribute, and replace with inactive */ 908 remove_all_media_directions(am); 909 910 a = pjmedia_sdp_attr_create(pool, "inactive", NULL); 911 pjmedia_sdp_media_add_attr(am, a); 907 912 908 913 } else { -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r733 r734 582 582 static pj_status_t acquire_call(const char *title, 583 583 pjsua_call_id call_id, 584 pjsua_call **p_call) 584 pjsua_call **p_call, 585 pjsip_dialog **p_dlg) 585 586 { 586 587 enum { MAX_RETRY=50 }; … … 634 635 635 636 *p_call = call; 637 *p_dlg = call->inv->dlg; 636 638 637 639 return PJ_SUCCESS; … … 646 648 pjsua_call *call; 647 649 pjsua_conf_port_id port_id; 650 pjsip_dialog *dlg; 648 651 pj_status_t status; 649 652 … … 651 654 PJ_EINVAL); 652 655 653 status = acquire_call("pjsua_call_get_conf_port()", call_id, &call );656 status = acquire_call("pjsua_call_get_conf_port()", call_id, &call, &dlg); 654 657 if (status != PJ_SUCCESS) 655 658 return PJSUA_INVALID_ID; … … 657 660 port_id = call->conf_slot; 658 661 659 pjsip_dlg_dec_lock( call->inv->dlg);662 pjsip_dlg_dec_lock(dlg); 660 663 661 664 return port_id; … … 671 674 { 672 675 pjsua_call *call; 676 pjsip_dialog *dlg; 673 677 pj_status_t status; 674 678 … … 678 682 pj_bzero(info, sizeof(*info)); 679 683 680 status = acquire_call("pjsua_call_get_info()", call_id, &call );684 status = acquire_call("pjsua_call_get_info()", call_id, &call, &dlg); 681 685 if (status != PJ_SUCCESS) { 682 686 return status; … … 777 781 } 778 782 779 pjsip_dlg_dec_lock( call->inv->dlg);783 pjsip_dlg_dec_lock(dlg); 780 784 781 785 return PJ_SUCCESS; … … 817 821 { 818 822 pjsua_call *call; 823 pjsip_dialog *dlg; 819 824 pjsip_tx_data *tdata; 820 825 pj_status_t status; … … 823 828 PJ_EINVAL); 824 829 825 status = acquire_call("pjsua_call_answer()", call_id, &call );830 status = acquire_call("pjsua_call_answer()", call_id, &call, &dlg); 826 831 if (status != PJ_SUCCESS) 827 832 return status; … … 835 840 pjsua_perror(THIS_FILE, "Error creating response", 836 841 status); 837 pjsip_dlg_dec_lock( call->inv->dlg);842 pjsip_dlg_dec_lock(dlg); 838 843 return status; 839 844 } … … 848 853 status); 849 854 850 pjsip_dlg_dec_lock( call->inv->dlg);855 pjsip_dlg_dec_lock(dlg); 851 856 852 857 return status; … … 864 869 { 865 870 pjsua_call *call; 871 pjsip_dialog *dlg; 866 872 pj_status_t status; 867 873 pjsip_tx_data *tdata; … … 876 882 PJ_EINVAL); 877 883 878 status = acquire_call("pjsua_call_hangup()", call_id, &call );884 status = acquire_call("pjsua_call_hangup()", call_id, &call, &dlg); 879 885 if (status != PJ_SUCCESS) 880 886 return status; … … 894 900 "Failed to create end session message", 895 901 status); 896 pjsip_dlg_dec_lock( call->inv->dlg);902 pjsip_dlg_dec_lock(dlg); 897 903 return status; 898 904 } … … 903 909 */ 904 910 if (tdata == NULL) { 905 pjsip_dlg_dec_lock( call->inv->dlg);911 pjsip_dlg_dec_lock(dlg); 906 912 return PJ_SUCCESS; 907 913 } … … 916 922 "Failed to send end session message", 917 923 status); 918 pjsip_dlg_dec_lock( call->inv->dlg);924 pjsip_dlg_dec_lock(dlg); 919 925 return status; 920 926 } 921 927 922 pjsip_dlg_dec_lock( call->inv->dlg);928 pjsip_dlg_dec_lock(dlg); 923 929 924 930 return PJ_SUCCESS; … … 934 940 pjmedia_sdp_session *sdp; 935 941 pjsua_call *call; 942 pjsip_dialog *dlg; 936 943 pjsip_tx_data *tdata; 937 944 pj_status_t status; … … 940 947 PJ_EINVAL); 941 948 942 status = acquire_call("pjsua_call_set_hold()", call_id, &call );949 status = acquire_call("pjsua_call_set_hold()", call_id, &call, &dlg); 943 950 if (status != PJ_SUCCESS) 944 951 return status; … … 947 954 if (call->inv->state != PJSIP_INV_STATE_CONFIRMED) { 948 955 PJ_LOG(3,(THIS_FILE, "Can not hold call that is not confirmed")); 949 pjsip_dlg_dec_lock( call->inv->dlg);956 pjsip_dlg_dec_lock(dlg); 950 957 return PJSIP_ESESSIONSTATE; 951 958 } … … 953 960 status = create_inactive_sdp(call, &sdp); 954 961 if (status != PJ_SUCCESS) { 955 pjsip_dlg_dec_lock( call->inv->dlg);962 pjsip_dlg_dec_lock(dlg); 956 963 return status; 957 964 } … … 961 968 if (status != PJ_SUCCESS) { 962 969 pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status); 963 pjsip_dlg_dec_lock( call->inv->dlg);970 pjsip_dlg_dec_lock(dlg); 964 971 return status; 965 972 } … … 972 979 if (status != PJ_SUCCESS) { 973 980 pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status); 974 pjsip_dlg_dec_lock( call->inv->dlg);981 pjsip_dlg_dec_lock(dlg); 975 982 return status; 976 983 } 977 984 978 pjsip_dlg_dec_lock( call->inv->dlg);985 pjsip_dlg_dec_lock(dlg); 979 986 980 987 return PJ_SUCCESS; … … 992 999 pjsip_tx_data *tdata; 993 1000 pjsua_call *call; 1001 pjsip_dialog *dlg; 994 1002 pj_status_t status; 995 1003 … … 998 1006 PJ_EINVAL); 999 1007 1000 status = acquire_call("pjsua_call_reinvite()", call_id, &call );1008 status = acquire_call("pjsua_call_reinvite()", call_id, &call, &dlg); 1001 1009 if (status != PJ_SUCCESS) 1002 1010 return status; … … 1004 1012 if (call->inv->state != PJSIP_INV_STATE_CONFIRMED) { 1005 1013 PJ_LOG(3,(THIS_FILE, "Can not re-INVITE call that is not confirmed")); 1006 pjsip_dlg_dec_lock( call->inv->dlg);1014 pjsip_dlg_dec_lock(dlg); 1007 1015 return PJSIP_ESESSIONSTATE; 1008 1016 } … … 1016 1024 pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", 1017 1025 status); 1018 pjsip_dlg_dec_lock( call->inv->dlg);1026 pjsip_dlg_dec_lock(dlg); 1019 1027 return status; 1020 1028 } … … 1024 1032 if (status != PJ_SUCCESS) { 1025 1033 pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status); 1026 pjsip_dlg_dec_lock( call->inv->dlg);1034 pjsip_dlg_dec_lock(dlg); 1027 1035 return status; 1028 1036 } … … 1035 1043 if (status != PJ_SUCCESS) { 1036 1044 pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status); 1037 pjsip_dlg_dec_lock( call->inv->dlg);1045 pjsip_dlg_dec_lock(dlg); 1038 1046 return status; 1039 1047 } 1040 1048 1041 pjsip_dlg_dec_lock( call->inv->dlg);1049 pjsip_dlg_dec_lock(dlg); 1042 1050 1043 1051 return PJ_SUCCESS; … … 1055 1063 pjsip_tx_data *tdata; 1056 1064 pjsua_call *call; 1065 pjsip_dialog *dlg; 1057 1066 struct pjsip_evsub_user xfer_cb; 1058 1067 pj_status_t status; … … 1062 1071 PJ_EINVAL); 1063 1072 1064 status = acquire_call("pjsua_call_xfer()", call_id, &call );1073 status = acquire_call("pjsua_call_xfer()", call_id, &call, &dlg); 1065 1074 if (status != PJ_SUCCESS) 1066 1075 return status; … … 1074 1083 if (status != PJ_SUCCESS) { 1075 1084 pjsua_perror(THIS_FILE, "Unable to create xfer", status); 1076 pjsip_dlg_dec_lock( call->inv->dlg);1085 pjsip_dlg_dec_lock(dlg); 1077 1086 return status; 1078 1087 } … … 1084 1093 if (status != PJ_SUCCESS) { 1085 1094 pjsua_perror(THIS_FILE, "Unable to create REFER request", status); 1086 pjsip_dlg_dec_lock( call->inv->dlg);1095 pjsip_dlg_dec_lock(dlg); 1087 1096 return status; 1088 1097 } … … 1095 1104 if (status != PJ_SUCCESS) { 1096 1105 pjsua_perror(THIS_FILE, "Unable to send REFER request", status); 1097 pjsip_dlg_dec_lock( call->inv->dlg);1106 pjsip_dlg_dec_lock(dlg); 1098 1107 return status; 1099 1108 } … … 1104 1113 */ 1105 1114 1106 pjsip_dlg_dec_lock( call->inv->dlg);1115 pjsip_dlg_dec_lock(dlg); 1107 1116 1108 1117 return PJ_SUCCESS; … … 1118 1127 { 1119 1128 pjsua_call *call; 1129 pjsip_dialog *dlg; 1120 1130 pj_status_t status; 1121 1131 … … 1123 1133 PJ_EINVAL); 1124 1134 1125 status = acquire_call("pjsua_call_dial_dtmf()", call_id, &call );1135 status = acquire_call("pjsua_call_dial_dtmf()", call_id, &call, &dlg); 1126 1136 if (status != PJ_SUCCESS) 1127 1137 return status; … … 1129 1139 if (!call->session) { 1130 1140 PJ_LOG(3,(THIS_FILE, "Media is not established yet!")); 1131 pjsip_dlg_dec_lock( call->inv->dlg);1141 pjsip_dlg_dec_lock(dlg); 1132 1142 return PJ_EINVALIDOP; 1133 1143 } … … 1135 1145 status = pjmedia_session_dial_dtmf( call->session, 0, digits); 1136 1146 1137 pjsip_dlg_dec_lock( call->inv->dlg);1147 pjsip_dlg_dec_lock(dlg); 1138 1148 1139 1149 return status; … … 1151 1161 { 1152 1162 pjsua_call *call; 1163 pjsip_dialog *dlg; 1153 1164 const pj_str_t mime_text_plain = pj_str("text/plain"); 1154 1165 pjsip_media_type ctype; … … 1161 1172 PJ_EINVAL); 1162 1173 1163 status = acquire_call("pjsua_call_send_im ", call_id, &call);1174 status = acquire_call("pjsua_call_send_im()", call_id, &call, &dlg); 1164 1175 if (status != PJ_SUCCESS) 1165 1176 return status; … … 1215 1226 1216 1227 on_return: 1217 pjsip_dlg_dec_lock( call->inv->dlg);1228 pjsip_dlg_dec_lock(dlg); 1218 1229 return status; 1219 1230 } … … 1228 1239 { 1229 1240 pjsua_call *call; 1241 pjsip_dialog *dlg; 1230 1242 pjsip_tx_data *tdata; 1231 1243 pj_status_t status; … … 1234 1246 PJ_EINVAL); 1235 1247 1236 status = acquire_call("pjsua_call_send_typing_ind", call_id, &call );1248 status = acquire_call("pjsua_call_send_typing_ind", call_id, &call, &dlg); 1237 1249 if (status != PJ_SUCCESS) 1238 1250 return status; … … 1261 1273 1262 1274 on_return: 1263 pjsip_dlg_dec_lock( call->inv->dlg);1275 pjsip_dlg_dec_lock(dlg); 1264 1276 return status; 1265 1277 } … … 1535 1547 { 1536 1548 pjsua_call *call; 1549 pjsip_dialog *dlg; 1537 1550 pj_time_val duration, res_delay, con_delay; 1538 1551 char tmp[128]; … … 1544 1557 PJ_EINVAL); 1545 1558 1546 status = acquire_call("pjsua_call_dump()", call_id, &call );1559 status = acquire_call("pjsua_call_dump()", call_id, &call, &dlg); 1547 1560 if (status != PJ_SUCCESS) 1548 1561 return status; … … 1602 1615 dump_media_session(indent, p, end-p, call->session); 1603 1616 1604 pjsip_dlg_dec_lock( call->inv->dlg);1617 pjsip_dlg_dec_lock(dlg); 1605 1618 1606 1619 return PJ_SUCCESS; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
r685 r734 979 979 } 980 980 981 /* Set route-set */982 if (!pj_list_empty(&acc->route_set)) {983 pjsip_dlg_set_route_set(dlg, &acc->route_set);984 }985 986 /* Set credentials */987 if (acc->cred_cnt) {988 pjsip_auth_clt_set_credentials( &dlg->auth_sess,989 acc->cred_cnt, acc->cred);990 }991 992 981 status = pjsip_pres_create_uac( dlg, &pres_callback, 993 982 PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub); … … 1000 989 } 1001 990 991 /* Set route-set */ 992 if (!pj_list_empty(&acc->route_set)) { 993 pjsip_dlg_set_route_set(dlg, &acc->route_set); 994 } 995 996 /* Set credentials */ 997 if (acc->cred_cnt) { 998 pjsip_auth_clt_set_credentials( &dlg->auth_sess, 999 acc->cred_cnt, acc->cred); 1000 } 1001 1002 1002 pjsip_evsub_set_mod_data(buddy->sub, pjsua_var.mod.id, buddy); 1003 1003
Note: See TracChangeset
for help on using the changeset viewer.