To support scenarios with mismatched media sections between two sides of
a call that aren't based on explicit SDP manipulations, attempt to
lookup the peer media based on an existing subscription also for offers.
Add extra checks (media type, media ID, monologue pointer) to make sure
that the obtained media object is actually the correct one.
Use a fallback on the existing index-based lookup in case no matching
media can be found.
As a side effect, the numbering and ordering of media objects created
during offer/answer is now reversed as the function is called in a
different order. Adapt tests as needed.
Change-Id: Ia5351f7d4fed03098c6be6bea3d4c74f52b8a76b
Two version of the origin replace exist from now on:
- `origin-replace` - replaces only the origin address
- `origin-replace-full` - replaces all the values,
so name, id, version and IP family with address.
Values for replacing are taken from the rtpengine instance,
so local values provided by the daemon.
Additionally: documentation updated accordingly.
Additionally: revert changes in pub-sub test.
Change-Id: I4d068944726d1ab82683ca5aa641a954890aefcf
Instead of using separate data members to
bring data with the `call_monologue` structure,
just use the whole `sdp_origin` object type (structure)
as a pointer and keep it aling with real SDP origin
of according monologue's side.
Refactor the code accordingly for `sdp_create()`
users (firstly only here).
Additionally introduce functions to alloc/de-alloc
`sdp_orig` object:
- `sdp_orig_dup()` returns a pointer to copied object
- `sdp_orig_free()` deallocates it
Change-Id: Iff6a777e4867e78c73ca79c73fdb73ff8e9f22eb
Move the `call_subscribe_request_ng()` fully to a usage
of the `sdp_create()` only.
Carry the origin IP and net family via flags
to the monologue, so can be reused later when creating SDP.
Always use given SDP session origin IP address and family
for the SDP being prepared, unless sdp origin replacement
is required via given flags (in this case just used
an advertised IP of rtpengine).
Additionally: fix unit tests for subscribe cases accordingly
to the policy.
Change-Id: Ib7697876ce45e01597edd27764d4147d12f738c8
Always ensure to set the actual sdp session name when
creating SDP using `sdp_create()`.
A new dedicated func `sdp_out_add_session_name()` introduced
for that.
Additionally: fix auto-daemon-tests-websocket and
auto-daemon-tests-pubsub accordingly.
Change-Id: Ie62573149ef9ae226dc8c955dcb2cfaaa4d3ae87
Consider call_media SDP attributes as ones that were received instead of
the ones to be sent out. Use media subscriptions to look up the source
media and print that one's attributes when creating an outgoing SDP.
Change-Id: Ibdf3a77a6f8a61654e0fc7c14aae16dfc6eabf14
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
The global list of monologues is populated in reverse order from the
list of medias. Iterate the list backwards so that the resulting medias
are in ascending order.
Change-Id: Icadca7a6cecb636ca6e021c0286b44e5cd3cdc84
We're also in controlling role for subscribe answers.
Make sure we don't clobber the source media's ICE options when adding a
subcriptions.
Change-Id: I5361462aefdbbe6411841332b69a8dc4b0e1e013
commit a2e5cfb8e5
Author: Razvan Crainea <razvan@opensips.org>
Date: Thu Jan 13 16:16:19 2022 +0200
Add tests for subscribe requests on paused media
commit fa58596a9f
Author: Razvan Crainea <razvan@opensips.org>
Date: Wed Jan 12 22:01:27 2022 +0200
Swap media direction check for `subscribe request`
as @rfuchs mentioned in his review, the SEND/RECV media flags are set
according to rtpengine's perspective, not the media flow's one.
commit e1e9a157c0
Author: Razvan Crainea <razvan@opensips.org>
Date: Wed Jan 12 19:27:42 2022 +0200
Fix `subscribe request` SDP media direction
When building the SDP for a `subscribe request` command, take into
consideration the media direction of the source stream - if stream is
`recvonly`, then we do not have anything to send, thus the direction
should be advertised as `inactive`, rather than `sendonly`.
Change-Id: I2d78bbec8ad584774f3c90f0ce5cca42f57f7b0f