Changes between Version 14 and Version 15 of IPAddressChange


Ignore:
Timestamp:
Dec 6, 2016 7:39:17 AM (7 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IPAddressChange

    v14 v15  
    8383 
    8484 '''Description:''' :: 
    85  The dialog's Contact URI is set initially when the dialog is created, from the account's Contact URI. While at the PJSIP level the {{{pjsip_inv_reinvite()}}} allows changing of Contact URI via the {{{new_contact}}} argument, currently this feature is not used by PJSUA-LIB, i.e. the {{{pjsua_call_reinvite()}}} does not allow the application to change the Contact URI. 
    86  
    87  As a workaround, application may #include {{{<pjsua-lib/pjsua_internal.h>}}} and perform the reinvite manually, as the snippet below shows: 
    88  {{{ 
    89 pjsip_tx_data *tdata; 
    90 pj_str_t new_contact; 
    91 pjsip_inv_sessin *inv = pjsua_var.calls[call_id].inv; 
    92  
    93 new_contact = pjsua_var.acc[account_id].contact; 
    94 status = pjsip_inv_reinvite(inv, &new_contact, NULL, &tdata); 
    95 if (status==PJ_SUCCESS) 
    96     pjsip_inv_send_msg(inv, tdata); 
    97  }}} 
    98  
    99  Note that the usual caveats of including <pjsua_internal.h> apply (i.e. this is not public API and things may change in future releases). 
    100  
    101  '''Update''': since 1.10 or 2.0, application using PJSUA can update dialog Contact URI by specifying {{{PJSUA_CALL_UPDATE_CONTACT}}} flag in option parameter of {{{pjsua_call_reinvite()}}}, the corresponding ticket is #1209. 
    102  
     85 To update the dialog's Contact URI, application can use the flag {{{PJSUA_CALL_UPDATE_CONTACT}}} when calling the API {{{pjsua_call_reinvite()}}}. 
    10386 
    10487 '''Task 2:''' :: 
     
    11497 - Note: 
    11598     * by default we bind transports to INADDRANY/0.0.0.0, so when sending outgoing (UDP) packets, we rely on the OS to select the correct interface for us, based on what interfaces are currently online and the OS's internal routing table. In other words, we just call {{{sendto()}}} and let the OS "do the right thing". In case of IP address change, we are also relying on the OS to switch the interface from one interface to the new one for our UDP transmissions. 
     99 
     100 Starting from release 2.6, in ticket #1982, we add a feature which will allow a call to reinitialize its media. To do this, you can specify the call flag {{{PJSUA_CALL_REINIT_MEDIA}}} when calling the API {{{pjsua_call_reinvite()}}} (if you want to update the contact as well (see Task 1 above), use both flags {{{PJSUA_CALL_REINIT_MEDIA}}} and {{{PJSUA_CALL_UPDATE_CONTACT}}}). 
    116101 
    117102[[BR]]