Ignore:
Timestamp:
Sep 28, 2012 8:56:08 AM (12 years ago)
Author:
nanang
Message:

Re #1587:

  • Don't answer call replace request with 200 if the replaced call hasn't reach confirmed state and has UAS role.
  • Only apply accept_replace_in_early_state when call is in early state.
File:
1 edited

Legend:

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

    r4267 r4268  
    306306     * Exist) response to the new INVITE. 
    307307     */ 
    308     if (inv->state <= PJSIP_INV_STATE_EARLY && inv->role != PJSIP_ROLE_UAC && 
    309         pjsip_cfg()->endpt.accept_replace_in_early_state == PJ_FALSE) 
     308    if (inv->state <= PJSIP_INV_STATE_EARLY && inv->role != PJSIP_ROLE_UAC) 
    310309    { 
    311         code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST; 
    312         warn_text = "Found early INVITE session but not initiated by this UA"; 
    313         goto on_return; 
     310        /* Really return 481 only if call haven't reached early state or 
     311         * accept-replace-in-early-state (ticket #1587) is not allowed. 
     312         */ 
     313        if (inv->state != PJSIP_INV_STATE_EARLY || 
     314            pjsip_cfg()->endpt.accept_replace_in_early_state == PJ_FALSE) 
     315        { 
     316            code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST; 
     317            warn_text = "Found early INVITE session but not initiated by " 
     318                        "this UA"; 
     319            goto on_return; 
     320        } 
    314321    } 
    315322 
Note: See TracChangeset for help on using the changeset viewer.