this function is used to determine if a pause is needed on a new
injected DTMF's start ts to ensure a gap between the events. However,
if an inject request comes in after the end of the previous event
but before it would have been offset due to pause, no pause is added
This change returns the ts value from dtmf_state if the queue is
empty as that will always be the ts of the last DTMF transmitted
Change-Id: I4f3cf5115d1a8e26c0ca1bc9570c46e29391e0d0
(cherry picked from commit bdb1022677)
Make sure we increase the output RTP sequence
number for each generated packet in the case
of packets that need to be duplicated or sent
repeatedly (DTMF end event)
Change-Id: Ia16ffefc0791d01575248ac5d8025eb30ccaec67
(cherry picked from commit 41a9894cce)
when DTMF is being transmitted using codec_output_rtp, the scheduled
time to send the packet is calculated using the timestamp difference
from the last transmitted applied on top of the realtime time the
last packet was sent. However, the timestamp is only updated on the
first event packet so a delay needs to be passed in to codec_output_rtp
to ensure the subsequent packets are scheduled based on the event
duration of the event packets
Change-Id: I5a2f6cf67b5f570f6099d201592d9a6fc01d60a5
(cherry picked from commit 6aa10931ad)
Use a dedicated enum return code for functions that are used in code
paths that can lead to 3 different outcomes (ok/error/consume) instead
of a plain int. Extend this tristate return code to also include
__rtp_decode().
Change-Id: I22e1b0bf72216613188cb88315edb1f8feb18d07
In the file implementations follow the rules:
1. Firstly goes the correlated header file, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. Thirdly, go custom header files, so in double quotes,
then one empty row.
4. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
5. If there are pre-processor definitions, they are added.
6. And eventually at least one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on the sequence,
and also possibly on some inline objects definitions, but if possible
to follow the rules, it's being done.
Change-Id: Ie512a970e230fe202398656d1942e8874bb14cd9
gcc <12 propagates the const-ness of the given value to the newly
declared variable with __auto_type, leading to silly "can't assign to
const variable" errors. Work around this with an ugly macro.
Change-Id: Ic952c094c24bd802379fc10ad19d559613b2c1d0
Allow codec_tracker_update to reference an existing codec_store. Then
when a supplemental codec type needs to be generated, make it look up
the type in the existing codec_store and re-use the existing payload
type if present instead of creating a new one. This allows payload type
numbers to remain unchanged during a re-invite.
Change-Id: I9e5edd897515a5e3eb5033aa6bbf21c8667d6133
During an offer, we update the codecs from the given list not only on
the side of the offerer, but also on the answerer's side, in order to
perform the codec answer routine during the answer phase. While doing
this, we empty out the existing list of codecs (on both sides) and
repopulate it fresh from the given list.
This can cause problems during a reverse re-invite, when the list of
codecs on the answerer's side already contained the codecs that had been
offered before. When setting up the new re-invite offer, we want to
retain codecs (and their payload types and format parameters) that were
already in place, instead of recreating a new list from scratch.
Improve this by adding a `merge_cs` option to the populating functions,
which points back to the stream_params codec_store. Codecs that would
have been removed from the codec_store during the repopulation are then
moved back into the stream_params codec_store instead. This then allows
the functions adding new codecs to the list (offer/transcode) to
reference these codecs that were previously in place, and so they can be
added back with the same options as they had existed before, instead of
recreating them from scratch.
Change-Id: I53e7ab10e9144a308a5c36be5ebfddd73c212f06
In case of repeated answers without additional offer in between, we
shouldn't reset the codec tracker status at the end of the codec answer
routine, so that we end up with the same state during the next answer.
Change-Id: I54f6136cc5684473553b4862c13ea9f4a3dcfe99
In the `dialogue_unconfirm()` (previously `dialogue_unkernelize()`)
use media subscriptions to find subscribers/subscriptions
and correlated to them medias to unconfirm them.
This change is bound to the switch from monologue
subscriptions to media subscriptions.
Additionally: Refactor unkernelize/unconfirm in `call.c`
To provide a sense of the functions clearer,
the namings of the following function singatures
have been changed:
- `dialogue_unkernelize()` -> `dialogue_unconfirm()`
- `__monologue_unkernelize()` -> `__monologue_unconfirm()`
Change-Id: If8cc2515eb26dcc4ffed02a420514f98d43cc5c6
If we're updating the handlers for one particular source -> sink flow,
only stop/reset the handlers matching this flow.
Change-Id: I1d046f47f8d26cac47c5d0f4318498eacb6c5677
Start using media subscriptions instead of call subscriptions
in the `codec_update_all_handlers()`, because older concept
gets deprecated.
Change-Id: I1cbd5379855e557099894f4b9a508a65ca78214c
previously, dtmf_inject wouldn't add the events as the dtmf_payload_type
was set to -1 as part of the delay buffer handling. However, as we
know we want this DTMF, this change updates the function to check for
and use the real_dtmf_payload_type value
Then, in codec_add_dtmf_event, we can check the injected bool and
if set, use the real_dtmf_payload_type again to decide whether to
push the event onto the queue
closes#1722
Change-Id: I34e35f92e014f4aed9e045737df7400155b86602