Ignore:
Timestamp:
Jun 4, 2009 10:16:47 PM (15 years ago)
Author:
bennylp
Message:

Ticket #860:

  • will send SUBSCRIBE to refresh REFER subscription (not REFER!), only when required (such as when call transfer is running for longer than REFER subscription expiration, hence need to be refreshed)
  • replaced hardcoded REFER subscription duration (600s) with a macro, PJSIP_XFER_EXPIRES.
  • when NOTIFY with "200 OK" sipfrag body is received and subscription state is not terminated, send SUBSCRIBE with Expires=0 to terminate the REFER subscription
  • for transferee, terminate the subscription in CONNECTING state and not in CONFIRMED state. Terminating the subscription in CONFIRMED state causes redundant NOTIFYs with "200 OK" sipfrag body to be sent, one with active subscription and another with terminated state.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_xfer.c

    r2394 r2750  
    2929#include <pj/string.h> 
    3030 
     31/* Subscription expiration */ 
     32#ifndef PJSIP_XFER_EXPIRES 
     33#   define PJSIP_XFER_EXPIRES       600 
     34#endif 
     35 
    3136 
    3237/* 
     
    155160        return status; 
    156161 
    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); 
    158164    if (status != PJ_SUCCESS) 
    159165        return status; 
     
    587593        pjsip_tx_data *tdata; 
    588594 
    589         status = pjsip_xfer_initiate(sub, NULL, &tdata); 
     595        status = pjsip_evsub_initiate(sub, NULL, PJSIP_XFER_EXPIRES, &tdata); 
    590596        if (status == PJ_SUCCESS) 
    591597            pjsip_xfer_send_request(sub, tdata); 
Note: See TracChangeset for help on using the changeset viewer.