]> 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 13:27:19 +0000 (06:27 -0700)
commitf2cfce147b45893e8dd4101c807a0513a9659165
treeea5f00c9432832a8da821bd75a19084c23a13600
parent144e4772e4d38b58acf6ed26093d3aee1d92fbd3
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]