Ignore:
Timestamp:
Apr 1, 2007 10:58:47 PM (17 years ago)
Author:
bennylp
Message:

Ticket #204: Implement SIP proxy functionalities (including some samples)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/pjproject-0.5-stable/pjsip/include/pjsip/sip_util.h

    r1077 r1121  
    473473 
    474474/** 
     475 * @} 
     476 */ 
     477 
     478/** 
     479 * @defgroup PJSIP_PROXY_CORE Core Proxy Layer 
     480 * @ingroup PJSIP 
     481 * @brief Core proxy operations 
     482 * @{ 
     483 */ 
     484 
     485/** 
    475486 * Create new request message to be forwarded upstream to new destination URI  
    476487 * in uri. The new request is a full/deep clone of the request received in  
     
    479490 * the Via header. If it is NULL, then a unique branch parameter will be used. 
    480491 * 
     492 * Note: this function DOES NOT perform Route information preprocessing as 
     493 *        described in RFC 3261 Section 16.4. Application must take care of 
     494 *        removing/updating the Route headers according of the rules as 
     495 *        described in that section. 
     496 * 
    481497 * @param endpt     The endpoint instance. 
    482498 * @param rdata     The incoming request message. 
    483499 * @param uri       The URI where the request will be forwarded to. 
    484  * @param branch    Optional branch parameter. 
     500 * @param branch    Optional branch parameter. Application may specify its 
     501 *                  own branch, for example if it wishes to perform loop 
     502 *                  detection. If the branch parameter is not specified, 
     503 *                  this function will generate its own by calling  
     504 *                  #pjsip_calculate_branch_id() function. 
    485505 * @param options   Optional option flags when duplicating the message. 
    486506 * @param tdata     The result. 
     
    488508 * @return          PJ_SUCCESS on success. 
    489509 */ 
    490 PJ_DECL(pj_status_t) pjsip_endpt_create_request_fwd( pjsip_endpoint *endpt, 
    491                                                      pjsip_rx_data *rdata,  
    492                                                      const pjsip_uri *uri, 
    493                                                      const pj_str_t *branch, 
    494                                                      unsigned options, 
    495                                                      pjsip_tx_data **tdata); 
     510PJ_DECL(pj_status_t) pjsip_endpt_create_request_fwd(pjsip_endpoint *endpt, 
     511                                                    pjsip_rx_data *rdata,  
     512                                                    const pjsip_uri *uri, 
     513                                                    const pj_str_t *branch, 
     514                                                    unsigned options, 
     515                                                    pjsip_tx_data **tdata); 
     516 
     517 
    496518 
    497519/** 
     
    516538 
    517539 
     540 
    518541/** 
    519542 * Create a globally unique branch parameter based on the information in  
    520  * the incoming request message. This function guarantees that subsequent  
    521  * retransmissions of the same request will generate the same branch id. 
    522  * This function can also be used in the loop detection process.  
    523  * If the same request arrives back in the proxy with the same URL, it will 
    524  * calculate into the same branch id. 
     543 * the incoming request message, for the purpose of creating a new request 
     544 * for forwarding. This is the default implementation used by  
     545 * #pjsip_endpt_create_request_fwd() function if the branch parameter is 
     546 * not specified. 
     547 * 
     548 * The default implementation here will just create an MD5 hash of the 
     549 * top-most Via. 
     550 * 
    525551 * Note that the returned string was allocated from rdata's pool. 
    526552 * 
Note: See TracChangeset for help on using the changeset viewer.