Changeset 2750 for pjproject/trunk
- Timestamp:
- Jun 4, 2009 10:16:47 PM (15 years ago)
- Location:
- pjproject/trunk/pjsip/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_xfer.c
r2394 r2750 29 29 #include <pj/string.h> 30 30 31 /* Subscription expiration */ 32 #ifndef PJSIP_XFER_EXPIRES 33 # define PJSIP_XFER_EXPIRES 600 34 #endif 35 31 36 32 37 /* … … 155 160 return status; 156 161 157 status = pjsip_evsub_register_pkg( &mod_xfer, &STR_REFER, 300, 1, &accept); 162 status = pjsip_evsub_register_pkg(&mod_xfer, &STR_REFER, 163 PJSIP_XFER_EXPIRES, 1, &accept); 158 164 if (status != PJ_SUCCESS) 159 165 return status; … … 587 593 pjsip_tx_data *tdata; 588 594 589 status = pjsip_ xfer_initiate(sub, NULL, &tdata);595 status = pjsip_evsub_initiate(sub, NULL, PJSIP_XFER_EXPIRES, &tdata); 590 596 if (status == PJ_SUCCESS) 591 597 pjsip_xfer_send_request(sub, tdata); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2724 r2750 2902 2902 case PJSIP_INV_STATE_CONNECTING: 2903 2903 st_code = e->body.tsx_state.tsx->status_code; 2904 ev_state = PJSIP_EVSUB_STATE_ACTIVE; 2904 if (call->inv->state == PJSIP_INV_STATE_CONNECTING) 2905 ev_state = PJSIP_EVSUB_STATE_TERMINATED; 2906 else 2907 ev_state = PJSIP_EVSUB_STATE_ACTIVE; 2905 2908 break; 2906 2909 2910 #if 0 2911 /* We don't need this, as we've terminated the subscription in 2912 * CONNECTING state. 2913 */ 2907 2914 case PJSIP_INV_STATE_CONFIRMED: 2908 2915 /* When state is confirmed, send the final 200/OK and terminate … … 2912 2919 ev_state = PJSIP_EVSUB_STATE_TERMINATED; 2913 2920 break; 2921 #endif 2914 2922 2915 2923 case PJSIP_INV_STATE_DISCONNECTED: … … 3456 3464 if (!cont) { 3457 3465 pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL); 3466 } 3467 3468 /* If the call transfer has completed but the subscription is 3469 * not terminated, terminate it now. 3470 */ 3471 if (status_line.code/100 == 2 && !is_last) { 3472 pjsip_tx_data *tdata; 3473 3474 status = pjsip_evsub_initiate(sub, &pjsip_subscribe_method, 3475 0, &tdata); 3476 if (status == PJ_SUCCESS) 3477 status = pjsip_evsub_send_request(sub, tdata); 3458 3478 } 3459 3479 } … … 3735 3755 } 3736 3756 3757 if (call->inv == NULL) { 3758 /* Shouldn't happen. It happens only when we don't terminate the 3759 * server subscription caused by REFER after the call has been 3760 * transfered (and this call has been disconnected), and we 3761 * receive another REFER for this call. 3762 */ 3763 PJSUA_UNLOCK(); 3764 return; 3765 } 3766 3737 3767 /* Notify application callback first */ 3738 3768 if (pjsua_var.ua_cfg.cb.on_call_tsx_state) {
Note: See TracChangeset
for help on using the changeset viewer.