Commit Graph

17 Commits

Author SHA1 Message Date
PeterHolik 9943bc5f1f chan_rtp.c: MulticastRTP missing refcount without codec option
Fixes: #529
(cherry picked from commit 416d9dfb85)
2024-03-07 14:17:22 +00:00
PeterHolik 07715c4c27 chan_rtp.c: Change MulticastRTP nameing to avoid memory leak
Fixes: asterisk#536
(cherry picked from commit 83d6f0f48b)
2024-03-07 14:17:22 +00:00
Maximilian Fridrich 38598701da chan_rtp: Implement RTP glue for UnicastRTP channels
Resolves: #298

UserNote: The dial string option 'g' was added to the UnicastRTP channel
which enables RTP glue and therefore native RTP bridges with those
channels.

(cherry picked from commit 98ffcfebda)
2024-01-12 18:29:18 +00:00
George Joseph f723b465e5 chan_rtp: Make usage of ast_rtp_instance_get_local_address clearer
unicast_rtp_request() was setting the channel variables like this:

pbx_builtin_setvar_helper(chan, "UNICASTRTP_LOCAL_ADDRESS",
    ast_sockaddr_stringify_addr(&local_address));
ast_rtp_instance_get_local_address(instance, &local_address);
pbx_builtin_setvar_helper(chan, "UNICASTRTP_LOCAL_PORT",
    ast_sockaddr_stringify_port(&local_address));

...which made it appear that UNICASTRTP_LOCAL_ADDRESS was being
set before local_address was set.  In fact, the address part of
local_address was set earlier in the function, just not the port.
This was confusing however so ast_rtp_instance_get_local_address()
is now being called before setting UNICASTRTP_LOCAL_ADDRESS.

ASTERISK-30281

Change-Id: I872ac49477100f4eb33891d46efc6ca21ec81aa4
2022-11-02 08:55:51 -05:00
Josh Soref d46ba42910 channels: Spelling fixes
Correct typos of the following word families:

appease
permanently
overriding
residue
silliness
extension
channels
globally
reference
japanese
group
coordinate
registry
information
inconvenience
attempts
cadence
payloads
presence
provisioning
mimics
behavior
width
natively
syslabel
not owning
unquelch
mostly
constants
interesting
active
unequipped
brodmann
commanding
backlogged
without
bitstream
firmware
maintain
exclusive
practically
structs
appearance
range
retransmission
indication
provisional
associating
always
whether
cyrillic
distinctive
components
reinitialized
initialized
capability
switches
occurring
happened
outbound

ASTERISK-29714

Change-Id: Ife52ee89cd2170b684fa651ca72b1cb911a57339
2021-11-16 05:35:29 -06:00
George Joseph 19045db392 chan_rtp: Accept hostname as well as ip address as destination
The UnicastRTP channel driver provided by chan_rtp now accepts
"<hostname>:<port>" as an alternative to "<ip_address>:<port>"
in the destination. The first AAAA (preferred) or A record resolved
will be used as the destination. The lookup is synchronous so beware
of possible dialplan delays if you specify a hostname.

Change-Id: Ie6f95b983a8792bf0dacc64c7953a41032dba677
2019-08-22 07:39:50 -05:00
Corey Farrell 9cfdb81e91 loader: Add dependency fields to module structures.
* Declare 'requires' and 'enhances' text fields on module info structure.
* Rename 'nonoptreq' to 'optional_modules'.
* Update doxygen comments.

Still need to investigate dependencies among modules I cannot compile.

Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
2018-01-15 13:25:51 -05:00
Corey Farrell 606ae3484a Add missing menuselect dependencies.
This adds menuselect dependencies for modules that use symbols of other
modules.

ASTERISK-27390

Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
2017-11-02 02:57:52 -04:00
Sean Bright eec0396395 chan_rtp: Use μ-law by default instead of signed linear
Multicast/Unicast RTP do not use SDP so we need to use a format that
cleanly maps to one of the static RTP payload types. Without this
change, an Originate to a Multicast or Unicast channel without a format
specified would produce no audio on the receiving device.

ASTERISK-21399 #close
Reported by: Tzafrir Cohen

Change-Id: I97e332b566e85da04b0004b9b0daae746cfca0e3
2017-09-13 09:40:56 -05:00
Richard Mudgett 67b47191e9 chan_rtp.c: Fix uninitialized memory crash.
unicast_rtp_request() could pass an uninitialized 'us' parameter to
ast_ouraddrfor().  If ast_ouraddrfor() returns an error then the 'us'
parameter may not get initialized.  Thus when the code tries to save the
'us' parameter to the local address we could try to copy a ridiculous
sized memory buffer and segfault.

* Made pass an initialized 'us' parameter to ast_ouraddrfor() and abort
the UnicastRTP channel request if it fails.

ASTERISK-26672

Change-Id: I1ef7a7c09f4da4f15dcb6de660d2bcac5f2a95c0
2016-12-22 12:25:15 -06:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.

Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename

This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled.  This variable was only used in lock.c so it
is now initialized in that file only.

ASTERISK-26480 #close

Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-10-27 09:53:55 -04:00
Moises Silva 2b03017022 chan_rtp: Set a sane default rtp engine for unicast.
ASTERISK-26439

Change-Id: I7f5ee2eeba8906e9ecb3293dbe3a747770bb5011
2016-10-17 08:14:22 -05:00
Richard Mudgett dca052e531 chan_rtp.c: Simplify options to UnicastRTP channel creation.
Change the awkward and not as flexible UnicastRTP options format
From:
Dial(UnicastRTP/127.0.0.1[/[<engine>][/[<codec>]]])
To:
Dial(UnicastRTP/127.0.0.1[/[<options>]])

Where <options> can be standard Asterisk flag options:
c(<codec>) - Specify which codec/format to use such as 'ulaw'.
e(<engine>) - Specify which RTP engine to use such as 'asterisk'.

More option flags can be easily added later such as the codec's RTP
payload type to use when the codec does not have a static payload type
defined.

Change-Id: I0c297aaf09e2ee515536cb7437bb8042ff8ff3c9
2016-06-06 17:05:43 -05:00
Mark Michelson bb0f4a6310 multicast RTP: Add dialing options
This adds a new parameter to the end of a multicast RTP dialing string.
This parameter defines the following options:

* i: Set the interface from which multicast RTP is sent
* l: Set whether multicast packets are looped back to the sender
* t: Set the TTL for multicast packets
* c: Set the codec to use for RTP

ASTERISK-26068 #close
Reported by Mark Michelson

Change-Id: I033b706b533f0aa635c342eb738e0bcefa07e219
2016-05-27 11:00:09 -05:00
Richard Mudgett 2a77af9ed0 chan_rtp.c: Cleanup ast_request() parameter parsing.
* Fixed NULL crash potential if parameters are missing.

* Reordered some operations so further diagnostic messages can be
more helpful.

Change-Id: Ibbdc67a2496508cbfbfef0cf19c35177ae2fbd70
2016-05-20 19:28:05 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
Joshua Colp 02295456ef chan_rtp: Add unicast RTP support.
This module supports sending both unicast and multicast RTP
to a specified target. Multicast functionality is the same as
chan_multicast_rtp was. In the case of unicast a specific
IP address and port can be specified, along with optional RTP
engine and format in the form of:

UnicastRTP/<ip address>:<port>/<engine>/<format>

This can be useful for sending a copy of a media stream to
another application for processing.

Review: https://reviewboard.asterisk.org/r/3981/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-12 17:42:15 +00:00