Make sure sdp_attributes is only used for _received_ SDP attributes, and
not ones that we want to send out. The only places where self-generated
attributes are being used is the T.38 gateway.
Change-Id: I1f035cd42a35fa250ea477700a1a88ad59efcc38
Use a settable callback function to do attribute printing. This makes it
possible to use different sources for SDP attribute output in different
situations.
Change-Id: I30be7772dd73d9ca8cb9483de53eb60734e12950
While processing SDPs, we only need to look up manipulation
instructions, which means we can just return NULL if none were given,
instead of always creating the object.
Change-Id: If187c1289eb385b23b86b3aa326634efaf0ce5ad
Create a separate smaller struct that contains only the relevant pieces
of the attribute string. Embed this into the larger `sdp_attribute`
struct, which also contains all the parsed-out information, which is
needed only during initial processing.
Functional no-op.
Change-Id: I5a70f8b7c9922c312aa03782f85e7db40f054092
Fix up tests to match reordered attributes.
Remove 10-year-old a=ssrc parsing code completely as it's unused.
Change-Id: I78064b1b2f27a442fe8bf4b448c7174c5458d3b1
For tagged attributes using a `a=name:tag value` format, extend pattern
matching so that just `name` matches as well as `name:tag`. Only support
this for removal (not substitution) as these attributes generally can
appear multiple times, and doing a static substitution on all of them is
kinda pointless.
Change-Id: I07c7f6e9075e862902bffe679d5de8618162eb8f
As we don't directly append to an existing GString any more anyway,
simplify the function signature by just returning a new GString if the
format string is known.
Change-Id: I9f8e6fbd93ea063eecb519cd57366effd4022f75
For attributes that have a value, consider both the full attribute
string `a=name:value` and just the attribute name itself `a=name` when
checking for removal and substitution instructions.
Change-Id: Ia648a4db8c80a5c23abf44f75b45e29acdf1b91d
With attributes names separated from their values, we can implicitly add
the separator ':' instead of having to include it in the attribute name.
Change-Id: Ie47aa5b76aa3261f4171707f88a203c911536ede
Where the attribute name is known, only pass the name itself as "name"
and pass the rest as "value" for clearer indication of what is what.
Change-Id: I564ce894b1d14b1acfd1f1b351ad2a316688a714
Some source strings are `const char *` and we don't have an alternative
`str` type pointing to a const buffer. Strictly speaking some buffers
aren't even char buffers, yet we use the `str` type to manage them. This
eliminates the need to explicitly cast every usage.
Change-Id: Ifd3cdd3d400fc483e6c488a95e9381938e63cc7f
We're in control of all the source strings, so we can just mandate not to
include the leading a= in the string.
Change-Id: If977e97bacc770de140b7ec69b48be8afaab7a0a
Some of these are actually wrong at this point, and will be fixed up in
later commits when the outputs are correct
Change-Id: I12d264a73f44e5356912b34bd22d7075067df190
Only the legacy protocols (which hardly anyone uses) don't pass a
`flags` object to the offer/answer functions. Make them also pass a
dummy `flags` object so that all the non-null checks become redundant
and can be removed.
Change-Id: Id2ec76ba307ad80958168a3a42e5679687765e22
Support a replacement pattern of %{...} to look up arbitrary keys from
the given metadata and use the respective values.
Change-Id: I2cc6c791629ed494b32e3352a555298c3b9cb4fc
Parse out the :| separate list of metadata keys when the metadata is
loaded, and stored it in parsed format, instead of doing when running
the DB update and discarding the result.
Functional no-op.
Change-Id: I96d706d63eb9337ba572a7f17363cbda553745f6
Handle the `output-destination` flag in the same way as the `metadata`
flag, eliminating the need to do it explicitly everywhere it's relevant.
Add a few alternative spellings of `output-destination`.
Rename the member from flags to `recording_file` to make it more clear
what it is.
Add save/restore capabilities of that field to the Redis code.
Unify printing of monologue LABEL into the same function that handles
the metadata.
Update documentation to better explain this option, and use the new
clearer name.
Change-Id: I4496341013b0ccab5b1dec026cf3a1a0ea879018
Use a generic function to update call/monologue fields from a given
string, and print an update to the recording metafile.
Functional no-op.
Change-Id: I23dbfff0646145809c37ee9270bce6983b136dcc
Move the code generating the recording metafile prefix out of the
"externally" visible code and logically deeper into recording.c.
Move the field from the recording struct into the call struct so that it
can be directly restored from Redis, and eliminate and mostly unused
function argument in the process.
Functional no-op.
Change-Id: I31eb3cd5864dd8138fabad0bcbd08ef18571f1a9
Switch the start/stop/etc recording methods to parse out the full
message dictionary into a sdp_ng_flags like all other methods, and then
pass the sdp_ng_flags object to update_metadata_*() for a unified
recording setup function.
Functional no-op.
Change-Id: Iad1004981808c45973bfd9bc2dc6c461acc602cc