Changes between Version 2 and Version 3 of IPAddressChange


Ignore:
Timestamp:
Mar 9, 2011 10:57:22 PM (9 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IPAddressChange

    v2 v3  
    88 
    99'''Table of Contents''' 
    10 [[PageOutline(1-4,,inline)]] 
     10[[PageOutline(2-4,,inline)]] 
    1111 
    1212This article describes some issues and their corresponding solutions related to access point disconnection, reconnection, IP address change, and how to handle these events in your PJSIP applications. The general issues related to the discussion will be explained, along with some specific issues to Symbian applications. 
     
    8383 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. 
    8484 
    85  So this is an open issue. 
     85 As a workaround, application may #include {{{<pjsua-lib/pjsua_internal.h>}}} and perform the reinvite manually, as the snippet below shows: 
     86 {{{ 
     87pjsip_tx_data *tdata; 
     88pj_str_t new_contact; 
     89pjsip_inv_sessin *inv = pjsua_var.calls[call_id].inv; 
     90 
     91new_contact = pjsua_var.acc[account_id].contact; 
     92status = pjsip_inv_reinvite(inv, &new_contact, NULL, &tdata); 
     93if (status==PJ_SUCCESS) 
     94    pjsip_inv_send_msg(inv, tdata); 
     95 }}} 
     96 
     97 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). 
     98 
    8699 
    87100 '''Task:''' :: 
     
    93106   - the media was previously inactive, since if media has been active (hence ICE session is active), the SDP will contain only the used candidates and not all the list of candidates. 
    94107 
    95  Alternatively, '''we may not need to inform the new RTP/RTCP address at all'''. If the remote media endpoint has the capability to switch its RTP/RTCP transmission to the source address of the RTP/RTCP packets (note: PJMEDIA has this capability), then it should automatically switch its destination address to our new address. 
    96  
     108 Alternatively, '''we may not need to inform the new RTP/RTCP address at all'''. If the remote media endpoint has the capability to switch its RTP/RTCP transmission to the source address of the RTP/RTCP packets (note: PJMEDIA has this capability), then it should automatically switch its destination address to our new address, provided that the source address of our RTP/RTCP packets (as viewed by the remote peer) have indeed changed. 
    97109 
    98110