Commit Graph

27910 Commits

Author SHA1 Message Date
Matt Jordan
232d4fe24f manager: Add <see-also> tags to relate Bridge related events,actions, and apps
Change-Id: I67e6b79fa3102e494b5fe6cc7510472249080e85
2016-08-13 22:03:56 -05:00
Matt Jordan
63c0b2f7c9 manager: Add <see-also> tags to relate AoC events and actions
Change-Id: Iea89a36222712148c1775c05ed0ad1049d67a70e
2016-08-13 20:26:50 -05:00
Matt Jordan
0422667d6c manager: Add <see-also> tags to relate UserEvent actions/apps/events
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4
2016-08-13 20:26:50 -05:00
Matt Jordan
f9e734974b res_agi: Improve documentation
* Groups of AGI commands that have similar functionality now reference
  each other, and all reference the AGI application for ease of wiki
  reference.

* The documentation for the AGI application has been improved, in
  particular noting the various AGI types and how they are invoked.

* A warning message has been added to DeadAGI, noting that it is
  deprecated.

Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d
2016-08-13 20:26:50 -05:00
Matt Jordan
781bb410d0 manager: Add <see-also> links between related events
This patch adds some see-also references between related AMI events. It
focuses primarily on those events that are guaranteed to come in pairs,
such as DTMFBegin/DTMFEnd, as well as those that occur during the life
cycle of an Asterisk channel, such as Newchannel/Hangup.

Change-Id: Iaab600477052018d0f8c03d0c624c0856e9ff1f3
2016-08-13 20:26:38 -05:00
Matt Jordan
cfd6852d39 func_channel: Reorganize documentation
* Following the example of the PJSIP channel driver, the channel
  technology specific documentation has been moved to the respective
  channel drivers that provide that functionality. This has the benefit
  of locating the documentation of items with those modules that provide
  it.

* Examples of using the CHANNEL function for both standard items as well
  as for PJSIP have been added.

* The 'max_forwards' standard item has been documented.

Change-Id: Ifaa79a232c8ac99cf8da6ef6cc7815d398b1b79b
2016-08-12 11:15:38 -05:00
zuul
1a3cc84371 Merge "channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH" into 13 2016-08-11 11:15:00 -05:00
zuul
134db75e67 Merge "alembic/sqlalchemy: auto increment only allowed on a single column" into 13 2016-08-10 21:15:15 -05:00
zuul
dbc78c9fab Merge "pjsip: Fix deadlock with suspend taskprocessor on masquerade" into 13 2016-08-10 19:19:08 -05:00
Alexei Gradinari
1589452fdc pjsip: Fix deadlock with suspend taskprocessor on masquerade
If both channels which should be masqueraded
are in the same serializer:
1st channel will be locked waiting condition 'complete'
2nd channel will be locked waiting condition 'suspended'

On heavy load system a chance that both channels will be in
the same serializer 'pjsip/distibutor' is very high.

To reproduce compile res_pjsip/pjsip_distributor.c with
DISTRIBUTOR_POOL_SIZE=1

Steps to reproduce:
1. Party A calls Party B (bridged call 'AB')
2. Party B places Party A on hold
3. Party B calls Voicemail app (non-bridged call 'BV')
4. Party B attended transfers Party A to voicemail using REFER.
5. When asterisk masquerades calls 'AB' and 'BV',
   a deadlock is happened.

This patch adds a suspension indicator to the taskprocessor.
When a session suspends/unsuspends the serializer
it sets the indicator to the appropriate state.
The session checks the suspension indicator before
suspend the serializer.

ASTERISK-26145 #close

Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b
2016-08-10 16:01:23 -04:00
Joshua Colp
c864ebab52 Merge "res_rtp_asterisk: Cache local RTCP address." into 13 2016-08-10 14:00:38 -05:00
Kevin Harwell
f6ec94cca6 alembic/sqlalchemy: auto increment only allowed on a single column
The extensions table defined two columns (id and priority) as primary key
autoincrement columns. However only one is allowed when defining the primary
key.

This patch removes the autoincrement attribute from the priority column since
it does not need to be as such and really should not have been on there in the
first place.

This patch also removes 'context', 'exten', and 'priority' from the primary key
index and creates a new combined unique contraint index on them.

ASTERISK-26183 #close

Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
2016-08-10 13:50:13 -05:00
Matt Jordan
5f815f9dba channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH
This patch adds a new PJSIP specific dialplan function,
PJSIP_SEND_SESSION_REFRESH. When invoked on a PJSIP channel, the media
session will be refreshed via either an UPDATE or re-INVITE request.
When used in conjunction with the PJSIP_MEDIA_OFFER dialplan function,
the formats in use on a PJSIP channel can be re-negotiated and changed
dynamically after call setup.

ASTERISK-26277 #close

Change-Id: Ib98fe09ba889aafe26d58d32f0fd1323f8fd9b1b
2016-08-10 11:20:11 -05:00
Mark Michelson
a119bab6a6 res_rtp_asterisk: Cache local RTCP address.
When an RTCP packet is sent or received, res_rtp_asterisk generates a
Stasis event that contains the RTCP report as well as the local and
remote addresses that the report pertains to.

The addresses are determined using ast_find_ourip(). For the local
address, this will typically result in a lookup of the hostname of the
server, and then a DNS lookup of that hostname. If you do not have the
host in /etc/hosts, then this results in a full DNS lookup, which can
potentially block for some time.

This is especially problematic when performing RTCP reads, since those
are done on the same thread responsible for reading and writing media.

This patch addresses the issue by performing a lookup of the local
address when RTCP is allocated. We then use this cached local address
for the Stasis events when necessary.

ASTERISK-26280 #close
Reported by Mark Michelson

Change-Id: I3dd61882c2e57036f09f0c390cf38f7c87e9b556
2016-08-09 16:19:34 -05:00
zuul
5a5b949333 Merge "res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack" into 13 2016-08-09 16:19:13 -05:00
Joshua Colp
926c1c72bd Merge "res_pjsip_outbound_publish: Use a serializer shutdown group for unload." into 13 2016-08-09 14:44:24 -05:00
Alexei Gradinari
a06a1af0eb res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack
The PJSIP taskprocessors could be overflowed on startup
if there are many (thousands) realtime endpoints
configured with unsolicited mwi.
The PJSIP stack could be totally unresponsive for a few minutes
after boot completed.

This patch creates a separate PJSIP serializers pool for mwi
and makes unsolicited mwi use serializers from this pool.
This patch also adds 2 new global options to tune taskprocessor
alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'.

This patch also adds new global option 'mwi_disable_initial_unsolicited'
to disable sending unsolicited mwi to all endpoints on startup.
If disabled then unsolicited mwi will start processing
on next endpoint's contact update.

ASTERISK-26230 #close

Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a
2016-08-08 13:53:32 -04:00
Joshua Colp
bf21359292 Merge "app_voicemail: Add taskprocessor alert level options." into 13 2016-08-08 12:32:52 -05:00
Joshua Colp
485fd27f7c res_pjsip_outbound_publish: Use a serializer shutdown group for unload.
This change replaces the custom unload process for the outbound
publish module with the common serializer shutdown group.

ASTERISK-25217 #close

Change-Id: I280a0384d860c486202d87d2d674394cca77ffb6
2016-08-04 15:16:33 +00:00
Corey Farrell
805f105f88 Add missing checks during startup.
This ensures startup is canceled due to allocation failures from the
following initializations.
* channel.c: ast_channels_init
* config_options.c: aco_init

ASTERISK-26265 #close

Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611
2016-08-03 16:39:46 -04:00
Alexei Gradinari
ea71bd6e3e app_voicemail: Add taskprocessor alert level options.
On heavy loaded system with IMAP or DB storage,
'app_voicemail' taskprocessor queue could reach 500 scheduled tasks.
It could happen when the IMAP or DB server dies or is unreachable.
It could happen on startup when there are many (thousands)
realtime endpoints configured with unsolicited mwi.
If the taskprocessor queue reaches the high water level
then the alert is triggered and pjsip stops processing new requests
until the queue reaches the low water level to clear the alert.

This patch adds 2 new 'general' configuration options
to tune taskprocessor alert levels:
'tps_queue_high' - Taskprocessor high water alert trigger level.
'tps_queue_low' - Taskprocessor low water clear alert level

ASTERISK-26229 #close

Change-Id: I766294fbffedf64053c0d9ac0bedd3109f043ee8
2016-08-03 14:56:45 -05:00
Joshua Colp
9dc8cfabd5 astconfigparser: Really handle case where line is simply a comment.
The regular expression would match causing the code that handled
the line if it was merely a comment to never get executed.

Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819
2016-08-03 14:47:04 +00:00
zuul
9db6cdba1a Merge "asterisk.c: Add auto generation and persistence of UUID" into 13 2016-08-02 19:05:42 -05:00
zuul
bc43220fc6 Merge "Remove SILK payload mappings from Asterisk core." into 13 2016-08-02 18:32:11 -05:00
Joshua Colp
2a0f42c494 Merge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports." into 13 2016-08-02 15:59:51 -05:00
George Joseph
ad3e65433c asterisk.c: Add auto generation and persistence of UUID
Upcoming features will require the generation and persistence
of a UUID.

Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d
2016-08-02 14:20:10 -06:00
Joshua Colp
85f9642420 Merge "menuselect: Add an opaque "member_data" string to the acceptable xml" into 13 2016-08-02 14:17:22 -05:00
Joshua Colp
f1b0286aa4 Merge "rest-api: Code out of sync with the model" into 13 2016-08-02 13:36:18 -05:00
Kevin Harwell
efc4034d72 rest-api: Code out of sync with the model
Change-Id: Idccaa26fd4a423d47d013ee592b8fa6a0349c006
2016-08-02 13:02:24 -05:00
Joshua Colp
9d59de79c9 Merge "sorcery: Use more compatible regex for local expressions." into 13 2016-08-02 12:21:12 -05:00
Mark Michelson
f6821fbaec Remove SILK payload mappings from Asterisk core.
SILK is a bit of a hog when it comes to using up our limited number of
dynamic payload types in the RTP engine. By freeing up four slots, it
allows for other codecs to potentially take the place.

Now, codec_silk.so will dynamically use the payload slots in the RTP
engine when it loads.

A better fix would be make RTP dynamic payload types actually
dynamic. However, at this stage of Asterisk 14 development, this is a
risky move that would be imprudent.

Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612
(cherry picked from commit d50895c7b0)
2016-08-02 10:50:34 -05:00
Joshua Colp
829b4ba8b3 Merge "pjproject: fixed a few bugs" into 13 2016-08-02 09:34:39 -05:00
Joshua Colp
102d28c11a sorcery: Use more compatible regex for local expressions.
This changes the use of an empty regex for both res_sorcery_config
and res_sorcery_memory to "." instead. This is a more compatible
regular expression which also works on FreeBSD.

ASTERISK-26206 #close

Change-Id: Ia9166dd176f1597555ba22b6931180d0626c1388
2016-08-02 10:25:16 +00:00
Alexander Traud
b78d10a2df res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports.
ASTERISK-26256 #close

Change-Id: I3fd68df561f81fdb8c6c497d465b50c12422f058
2016-08-02 03:15:54 -05:00
George Joseph
1f95c011c7 menuselect: Add an opaque "member_data" string to the acceptable xml
Change-Id: Id5ac43b95c8d7395f3be37f983632169db3d1afe
2016-08-01 15:13:17 -06:00
zuul
104b17eea9 Merge "Replace strdupa with more portable ast_strdupa" into 13 2016-08-01 15:36:50 -05:00
zuul
1e64f4a295 Merge "menuselect: Various menuselect enhancements" into 13 2016-08-01 15:26:10 -05:00
zuul
b8fb794e53 Merge "astconfigparser: Handle case where line is simply a comment." into 13 2016-08-01 15:05:04 -05:00
David M. Lee
df42f64d62 Replace strdupa with more portable ast_strdupa
The strdupa function is a GNU extension, and not widely portable. We
have an ast_strdupa function used within Asterisk which is preferred.
I pulled the definition up from menuselect.c into the menuselect.h
header file so it can be shared across menuselect.

Change-Id: I9593c97f78386b47dc1e83201e80cb2f62b36c2e
2016-08-01 10:53:19 -06:00
George Joseph
56a07fbab9 menuselect: Various menuselect enhancements
* Add 'external' as a support level.
* Add ability for module directories to add entries to the menu
  by adding members to the <module_prefix>/<module_prefix>.xml file.
* Expand the description field to 3 lines in the ncurses implementation.
* Allow the description field to wrap in the newt implementation.
* Add description field to the gtk implementation.

Change-Id: I7f9600a1984a42ce0696db574c1051bc9ad7c808
(cherry picked from commit 90f445729d)
2016-08-01 11:46:36 -05:00
zuul
948a9b615f Merge "pbx.c: Fix handling of '-' in extension name and callerid" into 13 2016-08-01 10:25:19 -05:00
zuul
f2a93dc9f2 Merge "pjproject_bundled: Update for pjproject 2.5.5" into 13 2016-07-29 11:30:42 -05:00
zuul
c2aed1c6e0 Merge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 13 2016-07-29 06:27:20 -05:00
Joshua Colp
7f9369c1b6 astconfigparser: Handle case where line is simply a comment.
Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5
2016-07-29 06:48:32 -03:00
Joshua Colp
cc5660406c Merge "dsp.c: Add fax and DTMF detection unit tests." into 13 2016-07-28 19:40:42 -05:00
Joshua Colp
cc825e54b0 Merge "dsp.c: Added descriptive comments to Goertzel calculations." into 13 2016-07-28 19:40:37 -05:00
Joshua Colp
323042d99d Merge "dsp.c: Fix incorrect format reference typo." into 13 2016-07-28 19:40:33 -05:00
zuul
d5e380b8fb Merge "dsp.c: Correct DTMF twist dsp.conf documentation." into 13 2016-07-28 19:34:53 -05:00
Joshua Colp
78de6eabbc Merge "astconfigparser.py: Update with realtime fixes." into 13 2016-07-28 19:18:00 -05:00
Corey Farrell
57e9c66819 pbx.c: Fix handling of '-' in extension name and callerid
This adds a two strings to ast_exten.  name to go with exten and
cidmatch_display to go with cidmatch.  The new fields contain input used
to add the extension in the first place.  The existing fields now
contain stripped input that excludes insignificant spaces and dashes.
These stripped fields should always be used for comparisons.  The
unstripped fields should normally be used for display, but displaying
stripped values will not cause runtime errors.

Note the actual string is only stored twice if it contains dashes.  If
no dashes are found then both 'char *' fields point to the same memory.
So this change has a minimum effect on memory usage.

The existing functions ast_get_extension_name and
ast_get_extension_cidmatch return unstripped values as they did before
this change.  Other similar bugs likely still exist where unstripped
extensions are saved outside pbx.c then passed back in.

ASTERISK-26233 #close

Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f
2016-07-28 20:00:23 -04:00