Commit graph

31163 commits

Author SHA1 Message Date
Joshua Colp
bc4b3c535d Merge "rtp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code." 2018-05-14 06:30:44 -05:00
Joshua Colp
a103221de2 Merge "pjsip: Rewrite OPTIONS support with new eyes." 2018-05-14 04:06:53 -05:00
Alexander Traud
71d1e8d8c8 rtp_engine: Remove the double assigned RTP payload ID of H.263+.
Mantis-3709 (Commit 68ff3c3, Asterisk 1.2) added support for the video format
H.263+. For this, the RTP payload ID 103 got assigned statically. Commit f1aadc8
assigned another payload ID 98 for this format in Asterisk 1.6.

Change-Id: I90e35b158487f8f1f8187da6241b54cd3b74e667
2018-05-11 19:49:12 +02:00
Corey Farrell
4722a653f4 cli: Display correct unit for HTTP timeout in "manager show settings".
HTTP timeout is in seconds, not minutes.

ASTERISK-27852 #close

Change-Id: Ie6640835cb07307555741f9b559c2eb876d9343e
2018-05-11 11:28:49 -06:00
Alexander Traud
263637a38d rtp_engine: Avoid a typo error in Doxygen for ast_rtp_codecs_find_payload_code.
Change-Id: Ica089d4507a27ddfc4ce3a88d697ffbef378de48
2018-05-11 17:37:57 +02:00
Corey Farrell
b5914d90ac Fix GCC 8 build issues.
This fixes build warnings found by GCC 8.  In some cases format
truncation is intentional so the warning is just suppressed.

ASTERISK-27824 #close

Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
2018-05-11 09:48:58 -04:00
Alexander Traud
919b0eb3f2 rtp_engine: Allow Media Formats with add_static_payload(-1) on egress again.
This issue affected only installations with rtp_use_dynamic=yes in asterisk.conf
which is the default since Asterisk 15. Codec 2 and SiLK were built-in examples
of media formats which were affected.

ASTERISK-27850
Reported by: Dinis Brazão, Selene Feigl

Change-Id: I08c1e76433a67e4350141d38cacf3a1cb5086496
2018-05-11 14:10:51 +02:00
Joshua Colp
6773ea9e39 Merge "makeopts.in: Remove unused/undefined AST_MARCH_NATIVE." 2018-05-10 03:44:40 -05:00
Joshua Colp
5437b3932d Merge "sip_to_pjsip: Enable python3 compatibility." 2018-05-09 19:25:55 -05:00
Joshua Colp
1351f42363 Merge "res_hep: Adds hostname resolution support for capture_address" 2018-05-09 19:00:41 -05:00
Jenkins2
179c794879 Merge "app_macro: Prevent infinite loop in find_matching_priority." 2018-05-09 11:32:30 -05:00
Corey Farrell
2e37684913 git: Ignore *.orig.
This prevents accidental commit of files created by patch.

Change-Id: I68380db61f0f9d620046f719ccd978811d0e9964
2018-05-09 08:51:11 -06:00
Alexander Traud
2d81709ab1 sip_to_pjsip: Enable python3 compatibility.
The script remains compatible with Python 2.7 but now also works with
Python 3.3 and newer; to ease the migration from chan_sip to chan_pjsip.

ASTERISK-27811

Change-Id: I59cc6b52a1a89777eebcf25b3023bdf93babf835
2018-05-09 09:38:38 -04:00
Corey Farrell
cea87fe7b8 makeopts.in: Remove unused/undefined AST_MARCH_NATIVE.
Change-Id: I617a96ebb83ec99f5d3176bbbee2d2a272ccb203
2018-05-08 13:29:14 -06:00
Jaco Kroon
9f1e1d153a manager: fix digest auth for ami/http mechanism.
Due to a fixed size buffer the digest authentication could be
incorrectly calculated if a large URI was provided, causing
authentication failure. The buffer is now dynamically allocated to allow
any size URI within the normal limits of the HTTP request size.

ASTERISK-27841

Change-Id: I660609db13b8f9e5f9567f339dd804f4985d41b3
2018-05-08 08:25:20 -06:00
Jenkins2
d83a37f0cc Merge "stream: Make the topology a reference counted object." 2018-05-08 05:42:53 -05:00
Corey Farrell
d855658f23 app_macro: Prevent infinite loop in find_matching_priority.
Use AST_PBX_MAX_STACK to escape if we recurse 128 times.  This will
prevent crash if dialplan contains an include loop.  Log an error when
this occurs, at most one message per call to Macro() so we avoid logger
spam.

ASTERISK-26570 #close

Change-Id: I6c71b76998c31434391b150de055ae9a531e31da
2018-05-07 07:58:12 -06:00
Tzafrir Cohen
f4c360143b cdr_mysql: my_connect_db(): reduce indentation
ASTERISK-27572

Change-Id: I00bd5363ac94c764c56d8626a5945ed7f3934fcb
2018-05-06 16:46:43 +03:00
Tzafrir Cohen
2e44adf1c3 cdr_mysql: split mysql init out of my_load_module
Split out mysql connection parts to a separate my_connect_db().

ASTERISK-27572

Change-Id: If2ee676056067cc693ff08be68ee4944bf35b49f
2018-05-06 16:45:20 +03:00
Matthew Fredrickson
8f55f7c333 res_hep: Adds hostname resolution support for capture_address
Previously, only an IP address would be accepted for the capture_address config
setting in hep.conf.  This change allows capture_address to be a resolvable
hostname or an IP address.

ASTERISK-27796 #close
Reported-By: Sebastian Gutierrez

Change-Id: I33e1a37a8b86e20505dadeda760b861a9ef51f6f
2018-05-04 16:13:55 -05:00
Jenkins2
57ad488451 Merge "res_ari: Remove requirement that body exists when debug is on." 2018-05-04 06:32:38 -05:00
Jenkins2
dcaaae6cd1 Merge "iostreams: Add some documentation for the ast_iostream_* functions" 2018-05-04 06:14:56 -05:00
Joshua Colp
11f5aba43b Merge "chan_dahdi: Configurable dialed digit timeouts" 2018-05-03 12:07:14 -05:00
Jenkins2
85f894a8e0 Merge "pbx_lua: Support displaying lua error message if no debug table exists" 2018-05-03 11:41:35 -05:00
Jenkins2
8e228fc138 Merge "res_pjsip/pjsip_distributor.c: Add missing off-nominal request response." 2018-05-03 11:32:08 -05:00
Joshua Colp
7528b86cad stream: Make the topology a reference counted object.
The stream topology has no lock of its own resulting in
another lock protecting it in some way (for example the
channel lock). If multiple channels are being juggled at
the same time this can be problematic. This change makes
the topology a reference counted object instead which
guarantees it will remain valid even without the channel
lock being held.

Change-Id: I4f4d3dd856a033ed55fe218c3a4fab364afedb03
2018-05-03 16:31:56 +00:00
Jenkins2
0565a6c909 Merge "Add the ability to read the media file type from HTTP header for playback" 2018-05-03 10:50:51 -05:00
Tzafrir Cohen
6301531416 chan_dahdi: Configurable dialed digit timeouts
Analog phones dial overlap dialing and it is chan_dahdi's job to read the
numbers.  It has three timeout constants that this commit converts to
channel-level configuration options:

* firstdigit_timeout: Default time (ms) to detect first digit

* interdigit_timeout: Default time (ms) to detect following digits

* matchdigit_timeout: Default time (ms) to wait in case of ambiguous
match.  This happens when the dialed digits match a number in the current
context but are also the prefix of another number.

Change-Id: Ib728fa900a4f6ae56d1ed810aba61b6593fb7213
2018-05-03 10:34:12 -05:00
Jenkins2
e538fc8e86 Merge "res_rtp_asterisk: Always update SRTP on local SSRC change." 2018-05-03 10:29:38 -05:00
Jenkins2
706b899358 Merge "pjsip: Increase maximum number of usable ciphers & other cleanups" 2018-05-03 07:41:33 -05:00
Joshua Colp
de3ca9bada res_ari: Remove requirement that body exists when debug is on.
The "ari set debug" code for incoming requests incorrectly assumed
that all requests would contain a body. If one did not exist the
request would be incorrectly rejected. The response that was sent
was also incomplete as an incorrect function was used to construct
the response.

The code has now been changed to no longer require a request to have
a body and the response updated to use the correct function.

ASTERISK-27801

Change-Id: I4eef036ad54550a4368118cc348765ecac25e0f8
2018-05-03 05:37:01 -06:00
Sean Bright
069a0b7593 iostreams: Add some documentation for the ast_iostream_* functions
Change-Id: Id71b87637f0a484eb5a1cd26c3d1c7c15c7dcf26
2018-05-02 18:08:30 -06:00
Sean Bright
239074c759 pjsip: Increase maximum number of usable ciphers & other cleanups
* Increase maximum number of ciphers from 100 to 256 (or whatever
  PJ_SSL_SOCK_MAX_CIPHERS is #define'd to)

* Simplify logic in cipher_name_to_id()

* Make signed/unsigned comparison consistent

Re: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897412

Reported by: Ondřej Holas

Change-Id: Iea620f03915a1b873e79743154255c3148a514e7
2018-05-02 07:06:07 -06:00
Richard Mudgett
11b7de82c5 res_pjsip/pjsip_distributor.c: Add missing off-nominal request response.
Change-Id: I389579b39c523d1d1e8ce020ef549a8bb5781c9b
2018-05-01 16:23:33 -06:00
Richard Mudgett
6cab3c836a res_pjsip/pjsip_distributor.c: Pull some assignments out of if tests.
Change-Id: I3d30d638b53a4bbe9bf9aad853c649d583894112
2018-05-01 16:17:20 -06:00
Joshua Colp
afdca5c68c res_rtp_asterisk: Always update SRTP on local SSRC change.
When the local SSRC changes we need to update the SRTP information
so that the proper key is used. This is commonly done as a result
of bridging two channels together. Previously we only updated
the SRTP information if media had already flowed, but in practice
the channel driver may have already performed SRTP negotiation and
set up the previous SSRC. We now always do it on a local SSRC
change.

ASTERISK-27795
ASTERISK-27800

Change-Id: Ia7c8e74c28841388b5244ac0b8fd6c1dc6ee4c10
2018-05-01 10:52:34 -06:00
Gaurav Khurana
0827d5cc53 Add the ability to read the media file type from HTTP header for playback
How it works today:
media_cache tries to parse out the extension of the media file to be played
from the URI provided to Asterisk while caching the file.

What's expected:
Better will be to have Asterisk get extension from other ways too. One of the
common ways is to get the type of content from the CONTENT-TYPE header in the
HTTP response for fetching the media file using the URI provided.

Steps to Reproduce:
Provide a URL of the form: http://host/media/1234 to Asterisk for media
playback. It fails to play and logs show the following error line:

[Sep 15 15:48:05] WARNING [29148] [C-00000092] file.c:
File http://host/media/1234 does not exist in any format

Scenario this issue is blocking:
In the case where the media files are stored in some cloud object store,
following can block the media being played via Asterisk:

Cloud storage generally needs authenticated access to the storage. The way
to do that is by using signed URIs. With the signed URIs there's no way to
preserve the name of the file.
In most cases Cloud storage returns a key to access the object and preserving
file name is also not a thing there

ASTERISK-27286

 Reporter: Gaurav Khurana

Change-Id: I1b14692a49b2c1ac67688f58757184122e92ba89
2018-04-30 16:30:44 -04:00
Jenkins2
f633af89c1 Merge "bridge_softmix: Fix sporadic incorrect video stream mapping." 2018-04-30 12:35:10 -05:00
George Joseph
3bad41257b Merge "BuildSystem: Add DragonFly BSD." 2018-04-30 09:07:30 -05:00
Jenkins2
8e368d0eaf Merge "translate: generic plc not filled in after translation" 2018-04-30 08:33:09 -05:00
George Joseph
5dd6fe478c Merge "app_sendtext: Enhance SendText to support Enhanced Messaging" 2018-04-30 07:34:32 -05:00
Christof Lauber
9c9f314f64 pbx_lua: Support displaying lua error message if no debug table exists
The lua_error_function assumed that lua's debug table and traceback function
are always accessible, which is not the case. This fixes the error message
'Error in the lua error handler' triggred by switch exec() function.
If this happens lua's error message is shown without traceback.

Change-Id: I34ba0a098f1ae06a3af7b4d1b098bd43f42f96c8
2018-04-30 10:31:34 +02:00
Joshua Colp
882e79b77e pjsip: Rewrite OPTIONS support with new eyes.
The OPTIONS support in PJSIP has organically grown, like many things in
Asterisk.  It has been tweaked, changed, and adapted based on situations
run into.  Unfortunately this has taken its toll.  Configuration file
based objects have poor performance and even dynamic ones aren't that
great.

This change scraps the existing code and starts fresh with new eyes.  It
leverages all of the APIs made available such as sorcery observers and
serializers to provide a better implementation.

1.  The state of contacts, AORs, and endpoints relevant to the qualify
process is maintained.  This state can be updated by external forces (such
as a device registering/unregistering) and also the reload process.  This
state also includes the association between endpoints and AORs.

2.  AORs are scheduled and not contacts.  This reduces the amount of work
spent juggling scheduled items.

3.  Manipulation of which AORs are being qualified and the endpoint states
all occur within a serializer to reduce the conflict that can occur with
multiple threads attempting to modify things.

4.  Operations regarding an AOR use a serializer specific to that AOR.

5.  AORs and endpoint state act as state compositors.  They take input
from lower level objects (contacts feed AORs, AORs feed endpoint state)
and determine if a sufficient enough change has occurred to be fed further
up the chain.

6.  Realtime is supported by using observers to know when a contact has
been registered.  If state does not exist for the associated AOR then it
is retrieved and becomes active as appropriate.

The end result of all of this is best shown with a configuration file of
3000 endpoints each with an AOR that has a static contact.  In the old
code it would take over a minute to load and use all 8 of my cores.  This
new code takes 2-3 seconds and barely touches the CPU even while dealing
with all of the OPTIONS requests.

ASTERISK-26806

Change-Id: I6a5ebbfca9001dfe933eaeac4d3babd8d2e6f082
2018-04-27 17:28:16 -05:00
Jenkins2
9c430569d4 Merge "bridge_softmix: Forward TEXT frames" 2018-04-27 10:06:30 -05:00
Joshua Colp
2cef65dc77 Merge "BuildSystem: Enable IMAP storage on FreeBSD and DragonFly BSD." 2018-04-26 19:09:16 -05:00
Jenkins2
8c1400bb57 Merge "chan_ooh323: introduce localras config parameter" 2018-04-26 11:42:06 -05:00
Jenkins2
fa7a551235 Merge "core: Remove unused/incomplete SDP modules." 2018-04-25 15:49:25 -05:00
Jenkins2
c408fbb87a Merge "install_prereq: Add DragonFly BSD." 2018-04-25 14:01:43 -05:00
Richard Mudgett
661fec4b59 core: Remove unused/incomplete SDP modules.
Change-Id: Icc28fbdc46f58e54a21554e6fe8b078f841b1f86
2018-04-25 15:58:24 -03:00
Joshua Colp
1dedc73951 Merge "streams: Add string metadata capability" 2018-04-25 13:45:26 -05:00