Changeset 3903 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Dec 8, 2011 8:18:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r3901 r3903 965 965 * if it wants to. 966 966 */ 967 if (replaced_dlg != NULL && pjsua_var.ua_cfg.cb.on_call_replace_request) { 967 if (replaced_dlg != NULL && 968 (pjsua_var.ua_cfg.cb.on_call_replace_request || 969 pjsua_var.ua_cfg.cb.on_call_replace_request2)) 970 { 968 971 pjsua_call *replaced_call; 969 972 int st_code = 200; … … 973 976 replaced_call = (pjsua_call*) replaced_dlg->mod_data[pjsua_var.mod.id]; 974 977 978 /* Copy call setting from the replaced call */ 979 call->opt = replaced_call->opt; 980 975 981 /* Notify application */ 976 pjsua_var.ua_cfg.cb.on_call_replace_request(replaced_call->index, 977 rdata, &st_code, &st_text); 982 if (pjsua_var.ua_cfg.cb.on_call_replace_request) { 983 pjsua_var.ua_cfg.cb.on_call_replace_request(replaced_call->index, 984 rdata, 985 &st_code, &st_text); 986 } 987 988 if (pjsua_var.ua_cfg.cb.on_call_replace_request2) { 989 pjsua_var.ua_cfg.cb.on_call_replace_request2(replaced_call->index, 990 rdata, 991 &st_code, &st_text, 992 &call->opt); 993 } 978 994 979 995 /* Must specify final response */ … … 3875 3891 pjsip_status_code code; 3876 3892 pjsip_evsub *sub; 3893 pjsua_call_setting call_opt; 3877 3894 3878 3895 pj_log_push_indent(); … … 3911 3928 /* Notify callback */ 3912 3929 code = PJSIP_SC_ACCEPTED; 3913 if (pjsua_var.ua_cfg.cb.on_call_transfer_request) 3930 if (pjsua_var.ua_cfg.cb.on_call_transfer_request) { 3914 3931 (*pjsua_var.ua_cfg.cb.on_call_transfer_request)(existing_call->index, 3915 3932 &refer_to->hvalue, 3916 3933 &code); 3934 } 3935 3936 call_opt = existing_call->opt; 3937 if (pjsua_var.ua_cfg.cb.on_call_transfer_request2) { 3938 (*pjsua_var.ua_cfg.cb.on_call_transfer_request2)(existing_call->index, 3939 &refer_to->hvalue, 3940 &code, 3941 &call_opt); 3942 } 3917 3943 3918 3944 if (code < 200) … … 4041 4067 /* Now make the outgoing call. */ 4042 4068 tmp = pj_str(uri); 4043 status = pjsua_call_make_call(existing_call->acc_id, &tmp, 0,4069 status = pjsua_call_make_call(existing_call->acc_id, &tmp, &call_opt, 4044 4070 existing_call->user_data, &msg_data, 4045 4071 &new_call);
Note: See TracChangeset
for help on using the changeset viewer.