- Timestamp:
- Sep 22, 2006 12:48:18 PM (18 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/config.c
r713 r733 22 22 23 23 static const char *id = "config.c"; 24 const char *PJ_VERSION = "0.5.7. 7";24 const char *PJ_VERSION = "0.5.7.8"; 25 25 26 26 PJ_DEF(void) pj_dump_config(void) -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r729 r733 2105 2105 } else { 2106 2106 int call = current_call; 2107 pjsua_msg_data msg_data; 2108 pjsip_generic_string_hdr refer_sub; 2109 pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 }; 2110 pj_str_t STR_FALSE = { "false", 5 }; 2107 2111 2108 2112 ui_input_url("Transfer to URL", buf, sizeof(buf), &result); … … 2114 2118 continue; 2115 2119 } 2120 2121 /* Add Refer-Sub: false in outgoing REFER request */ 2122 pjsua_msg_data_init(&msg_data); 2123 pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB, 2124 &STR_FALSE); 2125 pj_list_push_back(&msg_data.hdr_list, &refer_sub); 2116 2126 2117 2127 if (result.nb_result != NO_NB) { … … 2121 2131 pjsua_buddy_info binfo; 2122 2132 pjsua_buddy_get_info(result.nb_result-1, &binfo); 2123 pjsua_call_xfer( current_call, &binfo.uri, NULL);2133 pjsua_call_xfer( current_call, &binfo.uri, &msg_data); 2124 2134 } 2125 2135 … … 2127 2137 pj_str_t tmp; 2128 2138 tmp = pj_str(result.uri_result); 2129 pjsua_call_xfer( current_call, &tmp, NULL);2139 pjsua_call_xfer( current_call, &tmp, &msg_data); 2130 2140 } 2131 2141 } -
pjproject/trunk/pjsip/docs/PJSUA-TESTING.txt
r653 r733 17 17 - DTMF send/receive 18 18 - IM and typing 19 - Call transfer (with and without norefersub) 20 - Call Hold 21 - Re-Invite 22 - DTMF 23 - RTCP 19 24 - TCP (if there's UDP route, then Contact will be UDP) 20 25 -
pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
r712 r733 880 880 pjsip_dlg_inc_lock(sub->dlg); 881 881 882 /* I think it's pretty safe to disable this check. 883 882 884 if (sub->pending_tsx) { 883 885 pj_assert(!"Unable to terminate when there's pending tsx"); … … 885 887 return PJ_EINVALIDOP; 886 888 } 889 */ 887 890 888 891 sub->call_cb = notify; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r729 r733 68 68 pjmedia_sdp_session **p_answer); 69 69 70 /* 71 * Callback called by event framework when the xfer subscription state 72 * has changed. 73 */ 74 static void xfer_on_evsub_state( pjsip_evsub *sub, pjsip_event *event); 70 75 71 76 /* … … 581 586 enum { MAX_RETRY=50 }; 582 587 unsigned retry; 583 pjsua_call *call ;584 pj_bool_t has_pjsua_lock ;585 pj_status_t status ;588 pjsua_call *call = NULL; 589 pj_bool_t has_pjsua_lock = PJ_FALSE; 590 pj_status_t status = PJ_SUCCESS; 586 591 587 592 for (retry=0; retry<MAX_RETRY; ++retry) { … … 648 653 status = acquire_call("pjsua_call_get_conf_port()", call_id, &call); 649 654 if (status != PJ_SUCCESS) 650 return -1;655 return PJSUA_INVALID_ID; 651 656 652 657 port_id = call->conf_slot; … … 1050 1055 pjsip_tx_data *tdata; 1051 1056 pjsua_call *call; 1057 struct pjsip_evsub_user xfer_cb; 1052 1058 pj_status_t status; 1053 1059 … … 1056 1062 PJ_EINVAL); 1057 1063 1058 pjsip_dlg_dec_lock(call->inv->dlg);1059 1064 status = acquire_call("pjsua_call_xfer()", call_id, &call); 1060 1065 if (status != PJ_SUCCESS) … … 1062 1067 1063 1068 1064 /* Create xfer client subscription. 1065 * We're not interested in knowing the transfer result, so we1066 * put NULL as the callback.1067 */ 1068 status = pjsip_xfer_create_uac(call->inv->dlg, NULL, &sub);1069 /* Create xfer client subscription. */ 1070 pj_bzero(&xfer_cb, sizeof(xfer_cb)); 1071 xfer_cb.on_evsub_state = &xfer_on_evsub_state; 1072 1073 status = pjsip_xfer_create_uac(call->inv->dlg, &xfer_cb, &sub); 1069 1074 if (status != PJ_SUCCESS) { 1070 1075 pjsua_perror(THIS_FILE, "Unable to create xfer", status); … … 1121 1126 if (status != PJ_SUCCESS) 1122 1127 return status; 1123 1124 call = &pjsua_var.calls[call_id];1125 1128 1126 1129 if (!call->session) { … … 2131 2134 2132 2135 /* 2133 * W e're only interested when subscription is terminated, to2134 * clear the xfer_sub member ofthe inv_data.2136 * When subscription is terminated, clear the xfer_sub member of 2137 * the inv_data. 2135 2138 */ 2136 2139 if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) { … … 2144 2147 call->xfer_sub = NULL; 2145 2148 2146 PJ_LOG(3,(THIS_FILE, "Xfer subscription terminated")); 2149 PJ_LOG(4,(THIS_FILE, "Xfer subscription terminated")); 2150 2151 } 2152 /* 2153 * When subscription is accepted (got 200/OK to REFER), check if 2154 * subscription suppressed. 2155 */ 2156 else if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_ACCEPTED) { 2157 2158 pjsip_rx_data *rdata; 2159 pjsip_generic_string_hdr *refer_sub; 2160 const pj_str_t REFER_SUB = { "Refer-Sub", 9 }; 2161 2162 /* Must be receipt of response message */ 2163 pj_assert(event->type == PJSIP_EVENT_TSX_STATE && 2164 event->body.tsx_state.type == PJSIP_EVENT_RX_MSG); 2165 rdata = event->body.tsx_state.src.rdata; 2166 2167 /* Find Refer-Sub header */ 2168 refer_sub = (pjsip_generic_string_hdr*) 2169 pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, 2170 &REFER_SUB, NULL); 2171 2172 /* Check if subscription is suppressed */ 2173 if (refer_sub && pj_stricmp2(&refer_sub->hvalue, "false")==0) { 2174 /* Yes, subscription is suppressed. 2175 * Terminate our subscription now. 2176 */ 2177 PJ_LOG(4,(THIS_FILE, "Xfer subscription suppressed, terminating " 2178 "event subcription...")); 2179 pjsip_evsub_terminate(sub, PJ_TRUE); 2180 } 2147 2181 } 2148 2182 } -
pjproject/trunk/pjsip/src/test-pjsip/test.h
r619 r733 37 37 38 38 39 #define INCLUDE_MESSAGING_GROUP 140 #define INCLUDE_TRANSPORT_GROUP 141 #define INCLUDE_TSX_GROUP 039 #define INCLUDE_MESSAGING_GROUP 0 40 #define INCLUDE_TRANSPORT_GROUP 0 41 #define INCLUDE_TSX_GROUP 1 42 42 43 43 /*
Note: See TracChangeset
for help on using the changeset viewer.