- Timestamp:
- Nov 27, 2008 12:42:07 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r2370 r2371 2394 2394 * Redirection handler. 2395 2395 */ 2396 static void call_on_redirected(pjsua_call_id call_id, const pjsip_uri *target, 2397 pjsip_redirect_op *cmd, const pjsip_event *e) 2398 { 2399 *cmd = app_config.redir_op; 2400 2396 static pjsip_redirect_op call_on_redirected(pjsua_call_id call_id, 2397 const pjsip_uri *target, 2398 const pjsip_event *e) 2399 { 2401 2400 PJ_UNUSED_ARG(e); 2402 2401 2403 if ( *cmd== PJSIP_REDIRECT_PENDING) {2402 if (app_config.redir_op == PJSIP_REDIRECT_PENDING) { 2404 2403 char uristr[PJSIP_MAX_URL_SIZE]; 2405 2404 int len; … … 2416 2415 call_id, len, uristr)); 2417 2416 } 2417 2418 return app_config.redir_op; 2418 2419 } 2419 2420 -
pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
r2370 r2371 231 231 * @param inv The invite session. 232 232 * @param target The current target to be tried. 233 * @param cmd Action to be performed for the target. Set this 233 * @param e The event that caused this callback to be called. 234 * This could be the receipt of 3xx response, or 235 * 4xx/5xx response received for the INVITE sent to 236 * subsequent targets, or NULL if this callback is 237 * called from within #pjsip_inv_process_redirect() 238 * context. 239 * 240 * @return Action to be performed for the target. Set this 234 241 * parameter to one of the value below: 235 242 * - PJSIP_REDIRECT_ACCEPT: immediately accept the 236 * redirection (default value). When set, the243 * redirection to this target. When set, the 237 244 * session will immediately resend INVITE request 238 * to the target .245 * to the target after this callback returns. 239 246 * - PJSIP_REDIRECT_REJECT: immediately reject this 240 247 * target. The session will continue retrying with … … 252 259 * to either accept or reject the redirection upon 253 260 * getting user decision. 254 * @param e The event that caused this callback to be called. 255 * This could be the receipt of 3xx response, or 256 * 4xx/5xx response received for the INVITE sent to 257 * subsequent targets, or NULL if this callback is 258 * called from within #pjsip_inv_process_redirect() 259 * context. 260 */ 261 void (*on_redirected)(pjsip_inv_session *inv, const pjsip_uri *target, 262 pjsip_redirect_op *cmd, const pjsip_event *e); 261 */ 262 pjsip_redirect_op (*on_redirected)(pjsip_inv_session *inv, 263 const pjsip_uri *target, 264 const pjsip_event *e); 263 265 264 266 } pjsip_inv_callback; -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r2370 r2371 1080 1080 * @param call_id The call ID. 1081 1081 * @param target The current target to be tried. 1082 * @param cmd Action to be performed for the target. Set this 1082 * @param e The event that caused this callback to be called. 1083 * This could be the receipt of 3xx response, or 1084 * 4xx/5xx response received for the INVITE sent to 1085 * subsequent targets, or NULL if this callback is 1086 * called from within #pjsua_call_process_redirect() 1087 * context. 1088 * 1089 * @return Action to be performed for the target. Set this 1083 1090 * parameter to one of the value below: 1084 1091 * - PJSIP_REDIRECT_ACCEPT: immediately accept the … … 1101 1108 * to either accept or reject the redirection upon 1102 1109 * getting user decision. 1103 * @param e The event that caused this callback to be called. 1104 * This could be the receipt of 3xx response, or 1105 * 4xx/5xx response received for the INVITE sent to 1106 * subsequent targets, or NULL if this callback is 1107 * called from within #pjsua_call_process_redirect() 1108 * context. 1109 */ 1110 void (*on_call_redirected)(pjsua_call_id call_id, const pjsip_uri *target, 1111 pjsip_redirect_op *cmd, const pjsip_event *e); 1110 */ 1111 pjsip_redirect_op (*on_call_redirected)(pjsua_call_id call_id, 1112 const pjsip_uri *target, 1113 const pjsip_event *e); 1112 1114 1113 1115 } pjsua_callback; -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r2370 r2371 1938 1938 const pj_str_t *reason, pjsip_event *e) 1939 1939 { 1940 pjsip_redirect_op op = PJSIP_REDIRECT_ACCEPT;1940 pjsip_redirect_op op; 1941 1941 pjsip_target *target; 1942 1942 … … 1981 1981 pjsip_target_set_set_current(&inv->dlg->target_set, target); 1982 1982 1983 (*mod_inv.cb.on_redirected)(inv, target->uri, &op, e);1983 op = (*mod_inv.cb.on_redirected)(inv, target->uri, e); 1984 1984 1985 1985 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2370 r2371 69 69 * Redirection handler. 70 70 */ 71 static void pjsua_call_on_redirected(pjsip_inv_session *inv, 72 const pjsip_uri *target, 73 pjsip_redirect_op *cmd, 74 const pjsip_event *e); 71 static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, 72 const pjsip_uri *target, 73 const pjsip_event *e); 75 74 76 75 … … 3815 3814 3816 3815 /* Redirection handler */ 3817 static void pjsua_call_on_redirected(pjsip_inv_session *inv, 3818 const pjsip_uri *target, 3819 pjsip_redirect_op *cmd, 3820 const pjsip_event *e) 3816 static pjsip_redirect_op pjsua_call_on_redirected(pjsip_inv_session *inv, 3817 const pjsip_uri *target, 3818 const pjsip_event *e) 3821 3819 { 3822 3820 pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3821 pjsip_redirect_op op; 3823 3822 3824 3823 PJSUA_LOCK(); 3825 3824 3826 3825 if (pjsua_var.ua_cfg.cb.on_call_redirected) { 3827 (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index, target, cmd, e); 3826 op = (*pjsua_var.ua_cfg.cb.on_call_redirected)(call->index, 3827 target, e); 3828 3828 } else { 3829 3829 PJ_LOG(4,(THIS_FILE, "Unhandled redirection for call %d " … … 3831 3831 "call.", 3832 3832 call->index)); 3833 *cmd= PJSIP_REDIRECT_STOP;3833 op = PJSIP_REDIRECT_STOP; 3834 3834 } 3835 3835 3836 3836 PJSUA_UNLOCK(); 3837 } 3838 3837 3838 return op; 3839 } 3840
Note: See TracChangeset
for help on using the changeset viewer.