Changes between Version 9 and Version 10 of SIP_Redirection


Ignore:
Timestamp:
Nov 27, 2008 1:02:28 PM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SIP_Redirection

    v9 v10  
    55The redirection in this article is about processing SIP redirect (3xx) response in outgoing calls, and not about sending redirection/3xx response. Sending 3xx response in PJSUA-LIB is easy; just use {{{pjsua_call_hangup()}}} and give the new targets in Contact header in {{{msg_data}}} parameter. 
    66 
     7[[BR]] 
     8 
    79'''Table of Contents''' 
    810[[PageOutline(2-3,,inline)]] 
    911 
     12[[BR]] 
    1013 
    1114== Objectives == 
     
    1720 - the subsequent INVITE requests sent after the 3xx response must have the same To, From, and Call-ID as used by the original INVITE. While RFC 3261 only put this at RECOMMENDED strength (see section 8.1.3.4), in practice there are many servers out there that relies on this property. 
    1821 
    19  
    20 == Alternative Way to Handle Redirect Response == 
    21  
    22 As alternative to the mechanism described in this article, application can also handle redirection call with the following approach: 
    23  - extract the URI in the Contact header(s) in the SIP redirect/3xx response 
    24  - for each URI, create a new invite session/call and send INVITE to this target, trying the targets sequentially and sorting the preference based on the q-value of the Contact. 
    25  
    26 However this this approach, each call will have a different Call-ID, From, and To headers, hence the applicability probably is more limited. 
    27  
     22[[BR]] 
    2823 
    2924== Implementation Details == 
     
    129124 - when {{{--accept-redirect}}} is set to 2 (ask), user can enter 'Ra', 'Rr', or 'Rd' to accept, reject, or stop/disconnect the redirection. 
    130125 
     126[[BR]] 
    131127 
    132128== Changes to Application == 
     
    135131 
    136132It's good to remind here that while these callbacks traditionally only emits {{{PJSIP_EVENT_TSX_STATE}}} event, technically it can emit other types of events. Now especially with the pending redirection feature, a {{{PJSIP_EVENT_USER}}} event may be passed to these callbacks. Hence application should check for the event type before accessing the event structure. 
     133 
     134[[BR]] 
    137135 
    138136 
     
    150148 
    151149While this is caused by application not following the requirement to call {{{pjsip_inv_process_redirect()}}}, nevertheless the library should be robust enough to handle this, so this will be fixed. 
     150 
     151[[BR]] 
     152 
     153== Alternative Way to Handle Redirect Response == 
     154 
     155As alternative to the mechanism described in this article, application can also handle redirection call with the following approach: 
     156 - extract the URI in the Contact header(s) in the SIP redirect/3xx response 
     157 - for each URI, create a new invite session/call and send INVITE to this target, trying the targets sequentially and sorting the preference based on the q-value of the Contact. 
     158 
     159However this this approach, each call will have a different Call-ID, From, and To headers, hence the applicability probably is more limited. 
     160 
     161