Commit Graph

30907 Commits

Author SHA1 Message Date
George Joseph
a981ec141d Merge "res_pjsip: Fix transport_states ref leak" into 13 2019-04-11 15:00:29 -05:00
George Joseph
1a4fbaa52e Merge "chan_pjsip: DTMF Mode auto_info fallback lead to both inband and info" into 13 2019-04-10 12:43:15 -05:00
Alexei Gradinari
cb24eb4cc2 res_pjsip: Fix transport_states ref leak
Add missing ao2_ref(transport_state, -1) while iterate on a transport_states
container.

Change-Id: I40e35b5a339121300c80075c30db47201a6c374e
2019-04-10 08:37:59 -06:00
Joshua Colp
cef62d4ffc Merge "config.c: Fix a crash in extconfig parsing" into 13 2019-04-10 06:40:46 -05:00
Friendly Automation
6531f8b2ea Merge "CI: Add --no-dev-mode option to buildAsterisk.sh" into 13 2019-04-08 10:53:20 -05:00
Friendly Automation
e7de71ee24 Merge "main/json.c: Added app_name, app_data to channel type" into 13 2019-04-08 10:34:56 -05:00
Friendly Automation
7b64432c4e Merge "res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics" into 13 2019-04-08 10:27:07 -05:00
Chris-Savinovich
f9bb53a1dd config.c: Fix a crash in extconfig parsing
When extconfig.conf file is parsed, the code previously searched for
character comma without verifying if error (null or blank).  This caused
a segmentation error.

Change-Id: Id76b452d8f330d11c2742c37232761ad71472a8b
2019-04-05 15:41:50 -06:00
Salah Ahmed
a9a0303544 chan_pjsip: DTMF Mode auto_info fallback lead to both inband and info
When the dtmf_mode on an endpoint is configured as "auto_info"
Asterisk will produce an inband DTMF tone alongside an INFO
message when sending DTMF.

ASTERISK-28371

Change-Id: I1380b82f006e110a1b83fbb50c9873edd13a5d9a
2019-04-05 08:29:12 -03:00
sungtae kim
707897e5f7 main/json.c: Added app_name, app_data to channel type
It was difficult to check the channel's current application and
parameters using ARI for current channels. Added app_name, app_data
items to show the current application information.

ASTERISK-28343

Change-Id: Ia48972b3850e5099deab0faeaaf51223a1f2f38c
2019-04-05 02:28:25 +02:00
Friendly Automation
a5b463cabf Merge "res/res_rtp_asterisk: Enable rxjitter calculation for video" into 13 2019-04-04 08:29:18 -05:00
George Joseph
b3faf7311a CI: Add --no-dev-mode option to buildAsterisk.sh
The new option disables dev mode, TEST_FRAMEWORK and
MALLOC_DEBUG making the build more production-like.

Change-Id: Ieb72497d4d91d5416684aaed702cc3f532099738
2019-04-03 16:55:00 -06:00
Ben Ford
4853fc2218 build: Fix compiler warnings/errors.
The compiler complained about a couple of variables that weren't
initialized but were being used. Initializing them to NULL resolves the
warnings/errors.

ASTERISK-28362 #close

Change-Id: I6243afc5459b416edff6bbf571b0489f6b852e4b
2019-04-03 09:36:28 -06:00
Matthew Fredrickson
1c7bc63cff res/res_rtp_asterisk: Enable rxjitter calculation for video
It looks like we're not properly calculating jitter values on received
video streams.  This patch enables the code that does jitter calculations
for those streams.

Change-Id: Iaac985808829c8f034db8c57318789c4c8c11392
2019-04-02 15:48:27 +00:00
George Joseph
d049155303 Merge "pjproject: Add timer patch from pjproject r5934" into 13 2019-04-02 10:28:15 -05:00
Friendly Automation
664f706771 Merge "alembic: Fix errors during upgrade head." into 13 2019-03-28 14:46:35 -05:00
Ben Ford
4de27f332d alembic: Fix errors during upgrade head.
When trying to upgrade using alembic, a couple different errors kept
popping up that prevented the upgrade. An additional parameter was
needed when changing the schema for mwi_subscribe_replaces_unsolicited
from an integer to an enum. When changing from a string to an enum, the
type needed to be cast for postgresql. The other issue was a parameter
being used during column creation that did not exist.

After fixing the upgrade process, it revealed errors with the downgrade
process. One was a variable not being defined in the downgrade function,
and the other was tables not existing when using MySQL. This was due to
a context check that should have encompassed MySQL, but in the end was
not doing so.

Change-Id: Ib4d70cf3ce5080023a50be496272a777b55d6c8e
2019-03-28 09:17:46 -05:00
George Joseph
0fdfac87f3 Merge "manager: Use separate lock for session event notification." into 13 2019-03-28 08:03:51 -05:00
Friendly Automation
df4a7a8fae Merge "pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs" into 13 2019-03-27 18:05:59 -05:00
sungtae kim
fb7aa52ae0 res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics
Added ARI resource for channel statistics.
GET /ari/channels/{channelId}/rtp_statistics : It returns given
channel's rtp statistics detail.

ASTERISK-28320

Change-Id: I4343eec070438cec13f2a4f22e7fd9e574381376
2019-03-27 22:55:49 +01:00
George Joseph
bcc3b86ca5 Merge "app_queue: Fix documentation for QUEUE_MEMBER function." into 13 2019-03-27 14:31:13 -05:00
Ben Ford
90c1653997 build: Add staging directories for future changes.
This is the first step in changing the release process so that changes
made to the CHANGES and UPGRADE.txt files do not result in merge
conflicts every time multiple people modify these files. The changes
made will go in these new directories: doc/CHANGES-staging and
doc/UPGRADE-staging. The README.md files explain how things will work,
but here's a little overview. When you make a change that would go in
either CHANGES or UPGRADE.txt, this should instead be documented in a
new file in the doc/CHANGES-staging or doc/UPGRADE-staging directory,
respectively. The format will look like this:

   Subject: res_pjsip

   A description that explains the changes made and why. The release
   script will handle the bulleting and section separators! The
   'Subject:' header is case-sensitive.

   You can still separate with new lines within your description.

   Subject: res_ari
   Master-Only: true

   You can have more than one subject, and they don't have to be the
   same! Also, the 'Master-Only' header should always be true and is
   also case-sensitive (but the value is not - you can have 'true' or
   'True'). This header will only ever be present in the master branch.

For more information, check out the wiki page:
https://wiki.asterisk.org/wiki/display/AST/CHANGES+and+UPGRADE.txt

This is an initial change for ASTERISK_28111. Functionally, this will
make no difference, but it will prep the directories for when the
changes from CHANGES and UPGRADE.txt are extracted.

Change-Id: I8d852f284f66ac456b26dcb899ee46babf7d15b6
2019-03-27 13:32:09 -05:00
Alexei Gradinari
6e20e071a9 pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs
The next usage of PJSIP_PARSE_URI will crash asterisk
${PJSIP_PARSE_URI(tel:+1234567890,host)}
or
${PJSIP_PARSE_URI(192.168.1.1:5060,host)}

The function pjsip_parse_uri successfully parses then, but returns
struct pjsip_other_uri *.

This patch restricts parsing only SIP/SIPS URIs.

Change-Id: I16f255c2b86a80a67e9f9604b94b129a381dd25e
2019-03-27 10:07:55 -06:00
Joshua Colp
c289bac4d3 Merge "chan_sip: Ensure 'qualifygap' isn't negative" into 13 2019-03-27 06:00:03 -05:00
Sean Bright
4a6bd68869 app_queue: Fix documentation for QUEUE_MEMBER function.
It was a copy/paste of the QUEUE_MEMBER_COUNT function's synopsis.

ASTERISK-20986 #close
Reported by: Olivier Krief

Change-Id: If51ec481feb35824a4e78ab5600b197b819b10be
2019-03-26 17:55:55 -04:00
Sean Bright
33647ebe2c pjproject: Add timer patch from pjproject r5934
ASTERISK-28161 #close
Reported by: Ross Beer

Change-Id: I65331d554695753005eaa66c1d5d4807fe9009c8
2019-03-26 14:09:31 -04:00
Joshua Colp
03708f435c manager: Use separate lock for session event notification.
When notifying a manager session that new events were available
the same lock was used that was also held when doing things within
the session (such as sending events out). If the manager session
blocked for a period of time this would cause a back up of messages
in Stasis and would also block any other sessions from receiving
events.

This change adds a separate lock to the manager session which is
strictly used for notifying it that new events are available.

ASTERISK-28350

Change-Id: Ifbcac007faca9ad0231640f5e82a6ca9228f261b
2019-03-26 10:37:09 -03:00
Friendly Automation
ac7caa269c Merge "res/res_ari: Added timestamp as a requirement for all ARI events" into 13 2019-03-26 08:34:08 -05:00
Friendly Automation
e821071943 Merge "res_config_odbc: set empty extended field as a single whitespace" into 13 2019-03-26 08:07:13 -05:00
sungtae kim
04d1bc3df0 res/res_ari: Added timestamp as a requirement for all ARI events
Changed to requirement to having timestamp for all of ARI events.
The below ARI events were changed to having timestamp.
PlaybackStarted, PlaybackContinuing, PlaybackFinished,
RecordingStarted, RecordingFinished, RecordingFailed,
ApplicationReplaced, ApplicationMoveFailed

ASTERISK-28326

Change-Id: I382c2fef58f5fe107e1074869a6d05310accb41f
2019-03-25 22:50:17 +01:00
Sean Bright
53aa750839 chan_sip: Ensure 'qualifygap' isn't negative
Passing negative intervals to the scheduler rips a hole in the
space-time continuum.

ASTERISK-25792 #close
Reported by: Paul Sandys

Change-Id: Ie706f21cee05f76ffb6f7d89e9c867930ee7bcd7
2019-03-25 15:31:26 -04:00
Alexei Gradinari
3b1cf67fa9 res_config_odbc: set empty extended field as a single whitespace
If Realtime @ variable value is NULL or empty or contains only whitespaces
then when we try to retrieve it using PJSIP_ENDPOINT we get WARNING
pjsip_endpoint_function_read: Unknown property @my_var for PJSIP endpoint.
And the variable is missing in the result of CLI pjsip show endpoint.

This patch keeps empty sorcery extended field.

ASTERISK-28341 #close

Change-Id: I221fccc04cbfa2be17ce971f64ae0e74e465eea0
2019-03-25 10:44:07 -06:00
Matthew Fredrickson
4315634bc9 main/taskprocessor: Increase max name length of taskprocessors
Since the new names went in, the maximum taskprocessor name is too
short.  This patch increases the name field to a length to better
handle the new names.

Change-Id: I32f32d6926f25c8ef5a91303fd2988d2c2858877
2019-03-25 07:14:23 -06:00
George Joseph
85f87790a5 Merge "sorcery.c: Sorcery enhancements for wizard management" into 13 2019-03-19 10:23:20 -05:00
George Joseph
f45178db28 Merge "res/res_stasis: Fixed wrong StasisEnd timestamp" into 13 2019-03-19 09:26:57 -05:00
George Joseph
69b194c837 sorcery.c: Sorcery enhancements for wizard management
Added ability to specifiy a wizard is read-only when applying
it to a specific object type.  This allows you to specify
create, update and delete callbacks for the wizard but limit
which object types can use them.

Added the ability to allow an object type to have multiple
wizards of the same type.  This is indicated when a wizard
is added to a specific object type.

Added 3 new sorcery wizard functions:

* ast_sorcery_object_type_insert_wizard which does the same thing
  as the existing ast_sorcery_insert_wizard_mapping function but
  accepts the new read-only and allot-duplicates flags and also
  returns the ast_sorcery_wizard structure used and it's internal
  data structure. This allows immediate use of the wizard's
  callbacks without having to register a "wizard mapped" observer.

* ast_sorcery_object_type_apply_wizard which does the same
  thing as the existing ast_sorcery_apply_wizard_mapping function
  but has the added capabilities of
  ast_sorcery_object_type_insert_wizard.

* ast_sorcery_object_type_remove_wizard which removes a wizard
  matching both its name and its original argument string.

* The original logic in __ast_sorcery_insert_wizard_mapping was moved
  to __ast_sorcery_object_type_insert_wizard and enhanced for the
  new capabilities, then __ast_sorcery_insert_wizard_mapping was
  refactored to just call __ast_sorcery_insert_wizard_mapping.

* Added a unit test to test_sorcery.c to test the read-only
  capability.

Change-Id: I40f35840252e4313d99e11dbd80e270a3aa10605
2019-03-18 11:38:16 -06:00
Friendly Automation
1274bc5af6 Merge "vector: Add AST_VECTOR_COMPACT() to reclaim wasted space" into 13 2019-03-18 06:26:12 -05:00
Friendly Automation
5c70d0c1b9 Merge "Variable ALTCONF ignored when service is used in Debian" into 13 2019-03-18 05:34:55 -05:00
George Joseph
93d5e4b106 Merge "app.c: Remove deletion of pool topic on mwi state delete" into 13 2019-03-15 18:30:29 -05:00
sungtae kim
dc94a3180e res/res_stasis: Fixed wrong StasisEnd timestamp
Because StasisEnd's timestamp created it's own timestamp, it makes
wrong timestamp, compare to other channel event(ChannelDestroyed).
Fixed to getting a timestamp from the Channel's timestamp.

ASTERISK-28333

Change-Id: I5eb8380fc472f1100535a6bc4983c64767026116
2019-03-15 22:44:53 +01:00
Sean Bright
cc954977eb vector: Add AST_VECTOR_COMPACT() to reclaim wasted space
This might be useful in situations where you are loading an undetermined number
of items into a vector and don't want to keep (potentially) 2x the necessary
memory around indefinitely.

Change-Id: I9711daa0fe01783fc6f04c5710eba84f2676d7b9
2019-03-15 16:03:03 -04:00
Richard Mudgett
f4bb80ba85 taskprocessor.c: Fix printf type mismatch
A size_t is not always an unsigned long.

* Use the %zu format specifier in the ast_cli() printf format string since
AST_VECTOR_SIZE() returns a size_t value.

Change-Id: Ib102dd36bbe6c2a7a4ce6870ae9110d978dd7e98
2019-03-14 13:41:55 -05:00
Friendly Automation
3df8d605cc Merge "AMI/ARI: Bump non-breaking version numbers" into 13 2019-03-14 09:42:24 -05:00
George Joseph
c87158f2da app.c: Remove deletion of pool topic on mwi state delete
As part of an earlier voicemail refactor, ast_delete_mwi_state_full
was modified to remove the pool topic for a mailbox when the state
was deleted.  This was an attempt to prevent stale topics from
accumulating when app_voicemail was reloaded and a mailbox went
away.  Unfortunately because of the fact that when app_voicemail
reloads, ALL mailboxes are deleted then only current ones recreated,
topics were being removed from the pool that still had subscribers
on them, then recreated as new topics of the same name.  So now
modules like res_pjsip_mwi are listening on a topic that will
never receive any messages because app_voicemail is publishing on
a different topic that happens to have the same name.  The solutiuon
to this is not easy and given that accumulating topics for
deleted mailboxes is less evil that not sending NOTIFYs...

* Removed the call to stasis_topic_pool_delete_topic in
  ast_delete_mwi_state_full.

Also:

* Fixed a topic reference leak in res_pjsip_mwi
  mwi_stasis_subscription_alloc.

* Added some debugging to mwi_stasis_subscription_alloc,
  stasis_topic_create, and topic_dtor.

* Fixed a topic reference leak in an error path in
  internal_stasis_subscribe.

ASTERISK-28306
Reported-by: Jared Hull

Change-Id: Id7da0990b3ac4be4b58491536b35f41291247b27
2019-03-14 10:31:10 -04:00
Joshua C. Colp
c7d58aec7a Merge "stasis: Improve topic/subscription names and statistics." into 13 2019-03-14 09:21:38 -05:00
Joshua C. Colp
9b5136ddc3 Merge "stasis: Allow empty application arguments to move." into 13 2019-03-13 11:33:37 -05:00
Kevin Harwell
5d67b8b144 Merge "app_queue: fix ring_entry to access nativeformats with a channel lock" into 13 2019-03-13 11:17:30 -05:00
Kevin Harwell
9717d1672c Merge "chan_dahdi: Add logical group at DAHDIChannel event and CHANNEL function" into 13 2019-03-13 10:55:01 -05:00
Joshua Colp
f0254cc1e9 stasis: Allow empty application arguments to move.
Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c
2019-03-13 10:55:37 -03:00
Joshua C. Colp
aa9091dcdd Merge "partial-inlining: disable partial-inlining if gcc>=8.2.1" into 13 2019-03-13 06:41:43 -05:00