]> git.ipfire.org Git - thirdparty/asterisk.git/commit
bundled_pjproject: Add more support for multipart bodies
authorGeorge Joseph <gjoseph@digium.com>
Tue, 14 Dec 2021 17:39:16 +0000 (10:39 -0700)
committerGeorge Joseph <gjoseph@digium.com>
Wed, 22 Dec 2021 14:46:58 +0000 (09:46 -0500)
commit09b70525e07c63cdafb267102728cc9fdfb0f119
tree60a812204d275cb326237d146da609f727d763da
parent669b50983face92b59c7579f4ef5dfd1096e895a
bundled_pjproject:  Add more support for multipart bodies

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
third-party/pjproject/patches/0130-sip_inv-Additional-multipart-support-2919-2920.patch [new file with mode: 0644]