Ignore:
Timestamp:
Jun 21, 2010 1:28:55 PM (14 years ago)
Author:
bennylp
Message:

Fixes #1047 (Don't send UPDATE if remote doesn't support it (thanks Bogdan Krakowski for the report)) and fixes #1097 (Support sending UPDATE without SDP). Details:

  • Session timer fixes:
    • will look at remote capability in Allow header
    • if UPDATE is supported, will send UPDATE without SDP first. If this fails, will send UPDATE with SDP
    • otherwise will send re-INVITE
  • PJSUA-LIB will look at dialog's remote capability to determine whether re-INVITE or UPDATE should be sent to change default addresses after ICE negotiation.
  • pjsip_inv_update() now allows NULL offer, in which case the UPDATE will be sent without SDP.
File:
1 edited

Legend:

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

    r3212 r3215  
    856856                                &pjsua_var.calls[id].med_rtp_addr)) 
    857857            { 
     858                pj_bool_t use_update; 
     859                const pj_str_t STR_UPDATE = { "UPDATE", 6 }; 
     860                pjsip_dialog_cap_status support_update; 
     861                pjsip_dialog *dlg; 
     862 
     863                dlg = pjsua_var.calls[id].inv->dlg; 
     864                support_update = pjsip_dlg_remote_has_cap(dlg, PJSIP_H_ALLOW, 
     865                                                          NULL, &STR_UPDATE); 
     866                use_update = (support_update == PJSIP_DIALOG_CAP_SUPPORTED); 
     867 
    858868                PJ_LOG(4,(THIS_FILE,  
    859869                          "ICE default transport address has changed for " 
    860                           "call %d, sending UPDATE", id)); 
    861                 pjsua_call_update(id, 0, NULL); 
     870                          "call %d, sending %s", id, 
     871                          (use_update ? "UPDATE" : "re-INVITE"))); 
     872 
     873                if (use_update) 
     874                    pjsua_call_update(id, 0, NULL); 
     875                else 
     876                    pjsua_call_reinvite(id, 0, NULL); 
    862877            } 
    863878        } 
Note: See TracChangeset for help on using the changeset viewer.