Skip to content
Snippets Groups Projects
  • George Joseph's avatar
    0cf4e325
    bundled_pjproject: Add more support for multipart bodies · 0cf4e325
    George Joseph authored
    Adding upstream patch for pull request...
    https://github.com/pjsip/pjproject/pull/2920
    ---------------------------------------------------------------
    
    sip_inv:  Additional multipart support (#2919)
    
    sip_inv.c:inv_check_sdp_in_incoming_msg() deals with multipart
    message bodies in rdata correctly. In the case where early media is
    involved though, the existing sdp has to be retrieved from the last
    tdata sent in this transaction. This, however, always assumes that
    the sdp sent is in a non-multipart body. While there's a function
    to retrieve the sdp from multipart and non-multpart rdata bodies,
    no similar function for tdata exists.  So...
    
    * The existing pjsip_rdata_get_sdp_info2 was refactored to
      find the sdp in any body, multipart or non-multipart, and
      from either an rdata or tdata.  The new function is
      pjsip_get_sdp_info.  This new function detects whether the
      pjsip_msg->body->data is the text representation of the sdp
      from an rdata or an existing pjmedia_sdp_session object
      from a tdata, or whether pjsip_msg->body is a multipart
      body containing either of the two sdp formats.
    
    * The exsting pjsip_rdata_get_sdp_info and pjsip_rdata_get_sdp_info2
      functions are now wrappers that get the body and Content-Type
      header from the rdata and call pjsip_get_sdp_info.
    
    * Two new wrappers named pjsip_tdata_get_sdp_info and
      pjsip_tdata_get_sdp_info2 have been created that get the body
      from the tdata and call pjsip_get_sdp_info.
    
    * inv_offer_answer_test.c was updated to test multipart scenarios.
    
    ASTERISK-29804
    
    Change-Id: I483c7c3d413280c9e247a96ad581278347f9c71b
    0cf4e325
    History
    bundled_pjproject: Add more support for multipart bodies
    George Joseph authored
    Adding upstream patch for pull request...
    https://github.com/pjsip/pjproject/pull/2920
    ---------------------------------------------------------------
    
    sip_inv:  Additional multipart support (#2919)
    
    sip_inv.c:inv_check_sdp_in_incoming_msg() deals with multipart
    message bodies in rdata correctly. In the case where early media is
    involved though, the existing sdp has to be retrieved from the last
    tdata sent in this transaction. This, however, always assumes that
    the sdp sent is in a non-multipart body. While there's a function
    to retrieve the sdp from multipart and non-multpart rdata bodies,
    no similar function for tdata exists.  So...
    
    * The existing pjsip_rdata_get_sdp_info2 was refactored to
      find the sdp in any body, multipart or non-multipart, and
      from either an rdata or tdata.  The new function is
      pjsip_get_sdp_info.  This new function detects whether the
      pjsip_msg->body->data is the text representation of the sdp
      from an rdata or an existing pjmedia_sdp_session object
      from a tdata, or whether pjsip_msg->body is a multipart
      body containing either of the two sdp formats.
    
    * The exsting pjsip_rdata_get_sdp_info and pjsip_rdata_get_sdp_info2
      functions are now wrappers that get the body and Content-Type
      header from the rdata and call pjsip_get_sdp_info.
    
    * Two new wrappers named pjsip_tdata_get_sdp_info and
      pjsip_tdata_get_sdp_info2 have been created that get the body
      from the tdata and call pjsip_get_sdp_info.
    
    * inv_offer_answer_test.c was updated to test multipart scenarios.
    
    ASTERISK-29804
    
    Change-Id: I483c7c3d413280c9e247a96ad581278347f9c71b