Ignore:
Timestamp:
Mar 2, 2015 9:43:20 AM (10 years ago)
Author:
ming
Message:

Fixed #1817: Automatically send BYE when sending CANCEL for INVITE is unsuccessful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r4976 r4986  
    22802280        goto on_return; 
    22812281 
     2282    call->hanging_up = PJ_TRUE; 
     2283 
    22822284    /* If media transport creation is not yet completed, we will hangup 
    22832285     * the call in the media transport creation callback instead. 
     
    23132315                     "Failed to create end session message", 
    23142316                     status); 
     2317        call->hanging_up = PJ_FALSE; 
    23152318        goto on_return; 
    23162319    } 
     
    23322335                     "Failed to send end session message", 
    23332336                     status); 
     2337        call->hanging_up = PJ_FALSE; 
    23342338        goto on_return; 
    23352339    } 
     
    38133817    call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    38143818 
     3819    if (call->hanging_up) 
     3820        goto on_return; 
     3821 
    38153822    if (status != PJ_SUCCESS) { 
    38163823 
     
    47354742                tsx->status_code!=422)) 
    47364743    { 
    4737         if (tsx->status_code/100 != 2) { 
     4744        if (tsx->status_code/100 == 2) { 
     4745            /* If we have sent CANCEL and the original INVITE returns a 2xx, 
     4746             * we then send BYE. 
     4747             */ 
     4748            if (call->hanging_up) { 
     4749                PJ_LOG(3,(THIS_FILE, "Unsuccessful in cancelling the original " 
     4750                          "INVITE for call %d due to %d response, sending BYE " 
     4751                          "instead", call->index, tsx->status_code)); 
     4752                call_disconnect(call->inv, PJSIP_SC_OK); 
     4753            } 
     4754        } else { 
    47384755            /* Monitor the status of call hold/unhold request */ 
    47394756            if (tsx->last_tx == (pjsip_tx_data*)call->hold_msg) { 
Note: See TracChangeset for help on using the changeset viewer.