Separate out the two distinct use cases of requesting a specific port,
and requesting (one or more) random ports.
Change-Id: Ifbe7725d8638d49f620c9f4b9445342d180c8770
0x40000000 was already used by SHARED_FLAG_END_OF_CANDIDATES. Move
MEDIA_FLAG_REORDER_FORCED to unused slot 0x00800000 instead.
Change-Id: I0aa33854f814757869c7a98ba209d9aeb94d3d91
Directly return the just-created subscription from the respective
function. Saves a hash table lookup.
Change-Id: I42d9c75ebae2cc92619e78badb8ac594397b614b
Grab source monologue and source media only once, and pass the object
down to the various functions, instead of doing the retrieval several
times in multiple places.
Change-Id: I88d019dbf9493fa0037161390fdb9efda58f5441
We know whether we're printing for monologues or for medias, so there's
no need to have a generic function signature.
Change-Id: I356747686adb34c19ba2ba4c77c2d0a77b85a364
When MoH is triggered with `sendrecv` flag (so that
the recipient, the one who is put on hold, sees
the sendrecv state instead of sendonly/inactive),
we have to correctly process the answer coming back
to the MoH originator.
The originator of MoH must see:
- recvonly to his sendonly
- inactive to his inactive
Hence OA model is kept correct for the originator's leg.
Additionally: accordingly correct MoH tests.
Change-Id: Ida5f074d302c419c1e57e4fd624a55bfddae5587
Add a possibility to add opts when actually
creating new media player.
This can be useful for cases with MoH implementation.
Change-Id: Ie7f9d290cd5e46063dd4095d57a521396b58bcfb
If the receiver of a previously passthrough T.30 stream gets switched to
a generated PCM stream from a T.38 gateway, continue the sequencing of
the previous SSRC. Technically this is not necessary as the generated
PCM stream gets a new SSRC, but at least Asterisk seems to ignore this
and expect sequencing to continue, and will ignore PCM if the sequence
jump is too large.
Change-Id: Ia4656770db11f5fa1a1e9bf5bd71a0398deb1e00
Add a simple function that acts as an encryption callback to just update
the ext_seq (index) of the egress SSRC context. The kernel module
already does this, but the daemon only did it when SRTP was involved.
This now tracks egress packet indexes in all cases.
Change-Id: I9460744de55ead4b05aceb322fd8482442ff2b41
Avoid repeated calls to the memory allocated for port pool list
management by picking out the list elements without freeing them,
storing them in the stream_fd object, and then returning them to the
list when the port is released.
Change-Id: I67cd5039e62e4d2965e85d7ba7f0454f08f40494
Switch from specialised handling of config sections (used to load
signalling templates) to a more general approach using a callback
mechanism. This allows us to add more information to the config file
while keeping the details of the underlying GKeyFile hidden. Use a typed
hash table for type safety.
Change-Id: I71ddfda0202b47df363bcc5acf1725078774f8f1
A call that gets created but then doesn't get initialised would have its
Redis DB left at zero. At destruction it would then try to switch to DB
zero. Fix this by using an appropriate initial value.
Closes#1905
Change-Id: I852e48c5a06b732b37d2ccd5c478de4760aacd4e