Commit Graph

31918 Commits

Author SHA1 Message Date
George Joseph 6f158d27fc Makefile.moddir_rules: Pass PJPROJECT_BUNDLED to download_externals
The download_externals script wasn't getting the PJPROJECT_BUNDLED
environment variable passed down to it so it wasn't downloading
the appropriate variant of res_digium_phone.  This could cause
crashes in the DPMA.

Change-Id: I5daa9369c7af1fd556d892e89a85f279a2533425
2019-03-12 12:28:08 -06:00
Friendly Automation 4114c2bc3c Merge "chan_pjsip: add a flag to ignore 183 responses if no SDP present" 2019-03-12 10:10:12 -05:00
George Joseph 30c19527bf Merge "app_meetme: Don't mute joining admins if conference is muted" 2019-03-11 09:49:03 -05:00
Friendly Automation d93c931503 Merge "res/res_rtp_asterisk.c: Fixing possible divide by zero" 2019-03-11 09:45:28 -05:00
sungtae kim 8641fd9700 res/res_rtp_asterisk.c: Fixing possible divide by zero
Currently, when the Asterisk calculates rtp statistics, it uses
sample_count as a unsigned integer parameter. This would be fine
for most of cases, but in case of large enough number of sample_count,
this might be causing the divide by zero error.

ASTERISK-28321

Change-Id: If7e0629abaceddd2166eb012456c53033ea26249
2019-03-11 09:09:09 -03:00
Torrey Searle 4661c08549 chan_pjsip: add a flag to ignore 183 responses if no SDP present
chan_sip will always ignore 183 responses that do not contain SDP
however, chan_pjsip will currently always translate it into a
183 with SDP.  This new flag allows chan_pjsip to have the same
behavior as chan_sip.

ASTERISK-28322 #close

Change-Id: If81cfaa17c11b6ac703e3d71696f259d86c6be4a
2019-03-08 14:16:30 -05:00
Corey Farrell 9b7b8cb155 jansson: json_pack with new format to verify required runtime version.
Add a json_pack at startup that will fail if runtime links against a
library older than jansson-2.11.

Change-Id: I101aebafe0f9407650206f7c552dad3d69377b5a
2019-03-08 12:47:50 -06:00
George Joseph 5f6890a8f9 Merge "res_stasis: Add ability to switch applications." 2019-03-08 12:43:45 -06:00
George Joseph 9390333862 Merge "Replace calls to strtok() with strtok_r()" 2019-03-08 12:42:44 -06:00
Friendly Automation a502cb81db Merge "samples: Fix comment typo in pjsip.conf.sample" 2019-03-08 12:11:42 -06:00
George Joseph 228205f520 Merge "bridging: Add creation timestamps" 2019-03-08 11:11:36 -06:00
Sean Bright 57850c7861 app_meetme: Don't mute joining admins if conference is muted
ASTERISK-28328 #close

Change-Id: I4f6069fb34923b7521520c2a205a1e56227e592b
2019-03-08 10:44:00 -06:00
Sean Bright 2473b791b9 Replace calls to strtok() with strtok_r()
strtok() uses a static buffer, making it not thread safe.

Also add a #define to cause a compile failure if strtok is used.

Change-Id: Icce265153e1e65adafa8849334438ab6d190e541
2019-03-07 16:44:50 -06:00
Sean Bright 7b02a9617c samples: Fix comment typo in pjsip.conf.sample
Change-Id: I84a45c3d9fd26ca61aca99927eec83b57f1de857
2019-03-07 16:06:38 -06:00
Ben Ford 6626df586e res_stasis: Add ability to switch applications.
Added the ability to move between Stasis applications within Stasis.
This can be done by calling 'move' in an application, providing (at
minimum) the channel's id and the application to switch to. If the
application is not registered or active, nothing will happen and the
channel will remain in the current application, and an event will be
triggered to let the application know that the move failed. The event
name is "ApplicationMoveFailed", and provides the "destination" that the
channel was attempting to move to, as well as the usual channel
information. Optionally, a list of arguments can be passed to the
function call for the receiving application. A full example of a 'move'
call would look like this:

client.channels.move(channelId, app, appArgs)

The control object used to control the channel in Stasis can now switch
which application it belongs to, rather than belonging to one Stasis
application for its lifetime. This allows us to use the same control
object instead of having to tear down the current one and create
another.

ASTERISK-28267 #close

Change-Id: I43d12b10045a98a8d42541889b85695be26f288a
2019-03-07 07:53:01 -06:00
Friendly Automation a32f525489 Merge "sip_to_pjsip: Make multiline comment parsing consistent with Asterisk" 2019-03-05 09:17:38 -06:00
Friendly Automation 5e21763560 Merge "app_queue: Handle empty 'interface' in queue member config" 2019-03-05 08:50:57 -06:00
Joshua Colp c20b84e35b Merge "res_pjsip_registrar: blocked threads on reliable transport shutdown take 3" 2019-03-05 07:16:05 -06:00
Joshua Colp d7eed3bc5d Merge "basic-pbx: Update configuration to work with current modules." 2019-03-05 07:04:50 -06:00
Sean Bright f6b5b7208c app_queue: Handle empty 'interface' in queue member config
While the 'interface' column is a NOT NULL, the empty string is still
allowed. res_config_odbc treats the empty string as a NULL and we crash
when trying to dereference.

Also cleaned up an adjacent error message for consistency.

ASTERISK-28168 #close

Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
2019-03-04 16:07:46 -06:00
Sean Bright f098d4a325 sip_to_pjsip: Make multiline comment parsing consistent with Asterisk
In Asterisk configuration, a multiline comment starts with ;-- as long as it is
not followed by another dash (i.e. ;--- is not a multiline comment).

ASTERISK-28323 #close

Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72
2019-03-04 13:40:43 -06:00
Friendly Automation d490db8d58 Merge "res_pjsip_diversion: Use static pj_str_t for Diversion header names" 2019-03-04 06:13:48 -06:00
Joshua Colp 20e7ae1556 Merge "CHANGES: Document addition of 'wrapuptime' argument to AddQueueMember()" 2019-03-04 05:50:47 -06:00
Joshua Colp 2980622d2b basic-pbx: Update configuration to work with current modules.
The res_pjsip_websocket module requires the res_http_websocket
module so ensure it is loaded. As well the res_pjsip_notify
module needs the pjsip_notify.conf configuration file so
ensure it is installed.

ASTERISK-28272

Change-Id: I261659b84e7a6ac4cb49990d9badb4b2ad01bacd
2019-03-04 05:03:05 -06:00
sungtae kim 3638c433ac bridging: Add creation timestamps
This small feature will help to checking the bridge's status to
figure out which bridge is in old/zombie or not. Also added
detail items for the 'bridge show *' cli to provide more detail
info. And added creation item to the ARI as well.

ASTERISK-28279

Change-Id: I460238c488eca4d216b9176576211cb03286e040
2019-03-03 05:25:22 -06:00
Sean Bright 106a8ff05c res_pjsip_diversion: Use static pj_str_t for Diversion header names
PJSIP assumes that these header names are not allocated, and does not
clone the name strings when reusing headers.

Block unload of res_pjsip_diversion until shutdown to ensure static
memory stays valid.

ASTERISK-28312 #close

Change-Id: Ibd6ea55ec4a604bbd43ac07f8d0b54da2c39b8b9
2019-03-01 16:47:22 -06:00
Kevin Harwell 67d5c469fb Merge "res_config_odbc: Avoid deadlock when max_connections = 1" 2019-03-01 16:20:45 -06:00
Rodrigo Ramírez Norambuena f8295e0771 CHANGES: Document addition of 'wrapuptime' argument to AddQueueMember()
Change-Id: Ieb332d018ae3f2fc82b9465381fde0f299af1611
2019-03-01 16:18:01 -06:00
Friendly Automation 3fbbd57338 Merge "menuselect: Add license header to menuselect_gtk.c" 2019-03-01 15:01:00 -06:00
Joshua Colp a7e8a782a6 Merge "Revert "pjsip_message_filter: Only do interface lookup for wildcard addresses."" 2019-03-01 08:02:21 -06:00
Sean Bright 8dc5f86095 menuselect: Add license header to menuselect_gtk.c
This file was added to the Subversion repository on 2007-03-15 by
Russell Bryant, a Digium employee at the time.

ASTERISK-24173 #close

Change-Id: Ie866fa9d31d550467613d362b35b03c031ee594d
2019-02-28 15:38:55 -06:00
Sean Bright 719a4643ab res_config_odbc: Avoid deadlock when max_connections = 1
Rather than calling ast_odbc_find_table() in the prepare callback, call
it beforehand and pass it in to the callback to avoid the need for a
second connection.

ASTERISK-28166 #close

Change-Id: I6f8a0b9990d636fd6bc1a92ed70f7050d2436202
2019-02-28 14:46:16 -06:00
George Joseph 8f9ffe5905 res_pjsip_sdp_rtp: Fix return code from apply_negotiated_sdp_stream
apply_negotiated_sdp_stream was returning a "1" when no joint
capabilities were found on an outgoing call instead of a "-1".
This indicated to res_pjsip_session that the handler DID handle
the sdp when in fact it didn't.  Without the appropriate setup,
a subsequent media frame coming in would have an invalid stream_num
and cause a seg fault when the stream was attempted to be retrieved.

apply_negotiated_sdp_stream now returns the correct "-1" and any
media is now discarded before it reaches the core stream processing.

ASTERISK-28260
Reported by: Sotiris Ganouris

Change-Id: Ia095cb16b4862f2f6ad6d2d2a77453fa2542371f
2019-02-28 11:35:53 -06:00
Joshua Colp 47745fa1c9 Merge "res_pjsip_config_wizard: Don't crash if misconfigured" 2019-02-28 07:47:51 -06:00
Sean Bright 101272d0dc Revert "pjsip_message_filter: Only do interface lookup for wildcard addresses."
This reverts commit d524ad523d.

Reason for revert: This causes Contact and Via headers to have the wrong
transport address.

ASTERISK-28309 #close

Change-Id: Ibba4d6176f68e39279fcd9a545f81d56e747bed8
2019-02-28 06:57:58 -06:00
Friendly Automation 9d6161ee6a Merge "res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen" 2019-02-28 05:44:47 -06:00
Sean Bright 82a43394ed res_pjsip_config_wizard: Don't crash if misconfigured
If both send_registrations and send_auth are both set to yes,
outbound_auth/username must be set or we crash.

ASTERISK-27992 #close

Change-Id: I6418d56de1ae53f80393b314c2584048fbf7f11d
2019-02-27 19:54:32 -06:00
Friendly Automation b408bfdd06 Merge "res_mwi_devstate.c: New module to allow presence subs to VM boxes" 2019-02-27 17:40:32 -06:00
Kevin Harwell 930a7fe910 res_pjsip_registrar: blocked threads on reliable transport shutdown take 3
When a contact was removed by the registrar it did not always check to see if
the circumstances involved a monitored reliable transport. For instance, if the
'remove_existing' option was set to 'true' then when existing contacts were
removed due to 'max_contacts' being reached, those existing contacts being
removed did not unregister the transport monitor.

Also, it was possible to add more than one monitor on a reliable transport for
a given aor and contact.

This patch makes it so all contact removals done by the registrar also remove
any associated transport monitors if necessary. It also makes it so duplicate
monitors cannot be added for a given transport.

ASTERISK-28213

Change-Id: I94b06f9026ed177d6adfd538317c784a42c1b17a
2019-02-27 17:02:43 -06:00
George Joseph e0fc663295 CI: Update jenkinsfiles with new Gerrit URLs
The recent upgrade of Gerrit to 2.16 elimiated referencing a
repository in a way the jenkinsfiles were relying on so
the URL references were changed to a more consistent and supported
format.

Change-Id: I2e8e3f213b9a96bb1b27665eca4a9a24bc49820e
(cherry picked from commit 5ce084579f)
2019-02-27 10:56:33 -06:00
Joshua C. Colp f48a9c2520 Merge "rest-api-templates/asterisk_processor - replace http line breaks with line feed" 2019-02-26 09:14:02 -06:00
George Joseph 9ee76cf070 res_mwi_devstate.c: New module to allow presence subs to VM boxes
This module allows presence subscriptions to voicemail boxes.  This
allows common BLF keys to act as voicemail waiting indicators.

ASTERISK-28301

Change-Id: I62a246c24f3d7d432e33e22d7a4a57c15c292fdd
2019-02-26 08:32:01 -06:00
Torrey Searle 360f543677 res/res_rtp_asterisk: smoother can cause wrong timestamps if dtmf happen
Delivery timeval in the smoother object will fall behind while a DTMF is
being generated.  This can eventually lead to invalid rtp timestamps.
To prevent this from happening the smoother needs to be reset after every
DTMF to keep the timing up to date.

ASTERISK-28303 #close

Change-Id: Iaba3f7b428ebd72a4caa90e13b829ab4f088310f
2019-02-26 08:13:38 -06:00
Friendly Automation 12c359ba5d Merge "http.c: Support separated HTTP request" 2019-02-26 07:17:53 -06:00
Joshua C. Colp 18f92cb6f3 Merge "taskprocessor: Enable subsystems and overload by subsystem" 2019-02-26 07:04:15 -06:00
Friendly Automation b37283e694 Merge "app_queue: Enable set the wrapuptime from AddQueueMember application" 2019-02-26 06:52:06 -06:00
Joshua C. Colp 5d08b4c463 Merge "res_ari_applications: Fix incorrect call to ao2_lock." 2019-02-26 06:26:16 -06:00
Joshua C. Colp 5f29d3b581 Merge "Core: Increase AST_PBX_MAX_STACK to 512 if not LOW_MEMORY" 2019-02-26 06:08:45 -06:00
Kevin Harwell 574128dec6 rest-api-templates/asterisk_processor - replace http line breaks with line feed
Including line breaks (<br>, <br/>, <br />) in certain parts of the rest-api
json definition (e.g. summary, notes) displays them correctly in swagger.
However, when the field gets converted to the wiki format those breaks get
escaped and show up in the text as the actual string literal "<br>" etc...

This patch makes it so when converting to the wiki format it replaces all line
break values (<br>, etc...) with line feeds ('\n').

Change-Id: Ie1c9faa0d1c5d622804cc0a21ce769095b08aa3d
2019-02-25 17:31:57 -06:00
Joshua C. Colp e687cf214d res_ari_applications: Fix incorrect call to ao2_lock.
When listing the applications the apps lock was incorrectly
locked twice instead of being locked and then unlocked.

ASTERISK-28302

Change-Id: If7d064592a9e88c0f1049214c50e02be6dabf79e
2019-02-25 06:12:14 -06:00