Commit Graph

29958 Commits

Author SHA1 Message Date
Richard Mudgett
2ec26dc635 bridge_native_rtp.c: Fixup native_rtp_framehook()
* Fix framehook to test frame type for control frame.
* Made framehook exit early if frame type is not a control frame.
* Eliminated RAII_VAR in framehook.
* Use switch instead of else-if ladder for control frame handling.

Change-Id: Ia555fc3600bd85470e3c0141147dbe3ad07c1d18
2017-08-29 14:37:17 -05:00
Sean Bright
9af11c6acd confbridge: Handle user hangup during name recording
This prevents orphaned CBAnn channels from getting stuck in the bridge.

ASTERISK-26994 #close
Reported by: James Terhune

Change-Id: I5e43e832a9507ec3f2c59752cd900b41dab80457
2017-08-29 09:28:06 -05:00
Jenkins2
d05ab9e91a Merge "core: Reduce video update queueing." into 15 2017-08-29 06:13:05 -05:00
Joshua Colp
87f6dd2ef3 Merge "app_record: Resolve some absolute vs. relative filename bugs" into 15 2017-08-29 05:48:09 -05:00
Jenkins2
232277776f Merge "voicemail: Fix various abuses of mkstemp" into 15 2017-08-29 05:15:44 -05:00
Joshua Colp
6baf2c26f3 core: Reduce video update queueing.
A video update frame is used to indicate that a channel
with video negotiated should provide a full frame so the
decoder decoding the stream is able to do so. In situations
where a queue is used to store frames it makes no sense
for the queue to contain multiple video update frames. One
is sufficient to have a full frame be sent.

ASTERISK-27222

Change-Id: Id3f40a6f51b740ae4704003a1800185c0c658ee7
2017-08-28 13:09:25 -03:00
Jenkins2
2f9ec09479 Merge "res/res_pjsip_session: allow SDP answer to be regenerated" into 15 2017-08-28 07:24:41 -05:00
Joshua Colp
949d53e0b1 Merge "alembic: Add dtls_fingerprint column in ps_endpoints table" into 15 2017-08-28 07:11:17 -05:00
Sean Bright
66388de98c voicemail: Fix various abuses of mkstemp
mkstemp() returns a unique filename, but appending an extension to that
filename does not guarantee uniqueness. Instead, use mkdtemp() and we
can put whatever extension we want on the files that we create inside
the directory.

In the case of app_minivm, we also now properly clean up any temporary
files that we create.

ASTERISK-20858 #close
Reported by: Walter Doekes

Change-Id: I30ad04f0e115f0b11693ff678ba5184d8b938e43
2017-08-25 16:08:47 -05:00
Sean Bright
ffb2a781f6 app_record: Resolve some absolute vs. relative filename bugs
If the Record() application is called with a relative filename that
includes directories, we were not properly creating the intermediate
directories and Record() would fail.

Secondarily, updated the documentation for RECORDED_FILE to mention
that it does not include a filename extension.

Finally, rewrote the '%d' functionality to be a bit more straight
forward and less noisy.

ASTERISK-16777 #close
Reported by: klaus3000

Change-Id: Ibc2640cba3a8c7f17d97b02f76b7608b1e7ffde2
2017-08-25 12:27:04 -05:00
Jenkins2
3440a7404b Merge "app_queue: Evaluate realtime queues when running dialplan functions" into 15 2017-08-25 09:23:40 -05:00
Joshua Colp
1697fc304b Merge "chan_pjsip.c: Fix topology refresh response code accuracy." into 15 2017-08-25 08:51:57 -05:00
Jenkins2
9e2805b1da Merge "app_voicemail: Honor escape digits in "greeting only" mode" into 15 2017-08-25 08:27:30 -05:00
Florian Floimair
5b91992c27 alembic: Add dtls_fingerprint column in ps_endpoints table
The ps_endpoints table was missing the dtls_fingerprint column
introduced with commit adba2a8d7f.

ASTERISK-27168 #close

Change-Id: I9cb5006f7f50718b5239919562773adabb334cfd
2017-08-25 08:10:42 -05:00
Torrey Searle
c5b89a390c res/res_pjsip_session: allow SDP answer to be regenerated
If an SDP answer hasn't been sent yet, it's legal to change it.
This is required for PJSIP_DTMF_MODE to work correctly, and can
also have use in the future for updating codecs too.

ASTERISK-27209 #close

Change-Id: Idbbfb7cb3f72fbd96c94d10d93540f69bd51e7a1
2017-08-25 14:19:55 +02:00
Sean Bright
6d5e5d0520 app_queue: Evaluate realtime queues when running dialplan functions
ASTERISK-19103 #close
Reported by: Jim Van Meggelen

Change-Id: I4bd32a9d1fcebb8ac56bff0e084d4f53e31b692b
2017-08-24 09:44:21 -05:00
Sean Bright
f18f81cac7 app_voicemail: Honor escape digits in "greeting only" mode
ASTERISK-21241 #close
Reported by: Eelco Brolman
Patches:
	Patch uploaded by Eelco Brolman (License 6442)

Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
2017-08-24 09:04:08 -05:00
Sean Bright
e65b4d6525 res_smdi: Clean up memory leak
Change-Id: I1e33290929e1aa7c5b9cb513f8254f2884974de8
2017-08-24 08:39:46 -05:00
Joshua Colp
f7d88161da Merge "res_pjsip_session.c: Fix crash when declining an active stream." into 15 2017-08-23 14:49:31 -05:00
Jenkins2
a52be09f82 Merge changes from topic 'ASTERISK-27212' into 15
* changes:
  bridge_channel.c: Fix FRACK when mapping frames to the bridge.
  bridge: Fix softmix bridge deadlock.
2017-08-23 14:32:23 -05:00
Jenkins2
0f819d5801 Merge "channel: Fix topology API locking." into 15 2017-08-23 14:05:31 -05:00
Joshua Colp
be8d32f635 Merge "bridge_softmix.c: Restored softmix_bridge_leave() shortcut exit." into 15 2017-08-23 12:43:47 -05:00
Jenkins2
391af17068 Merge "app_confbridge: Document sfu video_mode value." into 15 2017-08-23 12:38:38 -05:00
Jenkins2
e2307a5ca5 Merge "confbridge.h: Fix doxygen comments." into 15 2017-08-23 12:22:59 -05:00
Jenkins2
cbc539b2cb Merge "bridge_softmix.c: Remove always true test." into 15 2017-08-23 11:54:59 -05:00
Richard Mudgett
02044e6470 res_pjsip_session.c: Fix crash when declining an active stream.
If a previously active stream is declined we could crash because the
channel's thread is still using the stream while we are updating the
topology in the serializer thread.

* Defer removing any declined stream's handler until we have blocked the
channel's thread with the channel lock.

ASTERISK-27212

Change-Id: I50e1d3ef26f8e41948f4c411ee329aa3b960a420
2017-08-22 11:57:21 -05:00
Richard Mudgett
3e9cd53b5c bridge_channel.c: Fix FRACK when mapping frames to the bridge.
* Add protection checks when mapping streams to the bridge.  The channel
and bridge may be in the process of updating the stream mapping when a
media frame comes in so we may not be able to map the frame at the time.

* We need to map the streams to the bridge's stream numbers right before
they are written into the bridge.  That way we don't have to keep
locking/unlocking the bridge and we won't have any synchronization
problems before the frames actually go into the bridge.

* Protect the deferred queue with the bridge_channel lock.

ASTERISK-27212

Change-Id: Id6860dd61b594b90c8395f6e2c0150219094c21a
2017-08-22 11:57:21 -05:00
Richard Mudgett
6c555891eb channel: Fix topology API locking.
* ast_channel_request_stream_topology_change() must not be called with any
channel locks held.

* ast_channel_stream_topology_changed() must be called with only the
passed channel lock held.

ASTERISK-27212

Change-Id: I843de7956d9f1cc7cc02025aea3463d8fe19c691
2017-08-22 11:57:21 -05:00
Richard Mudgett
efa6262814 bridge: Fix softmix bridge deadlock.
* Fix deadlock in
bridge_softmix.c:softmix_bridge_stream_topology_changed() between
bridge_channel and channel locks.

* The new bridge technology topology change callbacks must be called with
the bridge locked.  The callback references the bridge channel list, the
bridge technology could change, and the bridge stream mapping is updated.

ASTERISK-27212

Change-Id: Ide4360ab853607e738ad471721af3f561ddd83be
2017-08-22 11:57:21 -05:00
Richard Mudgett
0f832afb05 chan_pjsip.c: Fix topology refresh response code accuracy.
There are other 1xx and 2xx codes than 100 and 200 respectively.

Change-Id: I680db0997343256add1478714f5bf5b5569aee17
2017-08-22 11:32:11 -05:00
Richard Mudgett
b5987fa191 bridge_softmix.c: Restored softmix_bridge_leave() shortcut exit.
Change-Id: I13026cd90954e0265eab94a0faf635a3e11f0e35
2017-08-22 11:25:32 -05:00
Richard Mudgett
51bcfab4c6 app_confbridge: Document sfu video_mode value.
Change-Id: I26e17df2c93f3933b23f78070603adbcc84ba204
2017-08-22 11:22:30 -05:00
Richard Mudgett
a689fcb39f confbridge.h: Fix doxygen comments.
Change-Id: I16133166a85fdb557c66ffcbfe8128d0b4725b0e
2017-08-22 11:20:31 -05:00
Richard Mudgett
8f707ba8c7 bridge_softmix.c: Remove always true test.
Change-Id: I26238df2ff0d0f6dfe95c3aa35da588f1ee71727
2017-08-22 11:11:15 -05:00
Sungtae Kim
069ed905b4 app_queue: Fix initial hold time queue statistic
Fixed to use correct initial value and fixed to use the
correct queue info to check the first value.

ASTERISK-27204

Change-Id: Ia9e36c828e566e1cc25c66f73307566e4acb8e73
2017-08-22 08:28:24 -05:00
Joshua Colp
b7c27e1c84 Merge "res_xmpp: fix inverted return code check in OAuth" into 15 2017-08-22 07:57:00 -05:00
Jenkins2
0bb4a9117e Merge "res_calendar_icalendar: Properly handle recurring events" into 15 2017-08-22 05:15:36 -05:00
Michael Kuron
ac6a905bb2 res_xmpp: fix inverted return code check in OAuth
fetch_access_token calls func_curl via ast_func_read. The latter returns 0 upon
success and -1 if the function is not available.
This commit inverts the return code check so that an error is printed if the
module is not loaded and not if it is loaded.

ASTERISK-27207 #close

Change-Id: I9ef903f80702d1218e8701f65a4e5e918e6548fb
2017-08-22 00:35:59 -05:00
Jenkins2
29a8488ced Merge "Fix downloader not working with curl" into 15 2017-08-18 10:26:59 -05:00
Sean Bright
07c3608c6c res_calendar_icalendar: Properly handle recurring events
When looking for recurring events, use the correct end time based on the
configured 'timeframe.'

ASTERISK-27174 #close
Reported by: Mark Thompson

Change-Id: Id90c3cfc79d561a5521d79be176683e225f2edef
2017-08-17 12:15:47 -05:00
Jenkins2
45ca50a3be Merge "manager: hook event is not being raised" into 15 2017-08-17 06:50:19 -05:00
George Joseph
44f23dcae0 Fix downloader not working with curl
The codec/dpma downloader wasn't handling curl correctly.  The logic
that transforms makeopts into a bash-sourceable file wasn't
handling the make 'or' command in DOWNLOAD_TIMEOUT so bash was
looking for an 'or' command.

That logic has been eliminated.  Instead of trying to transform
and source makeopts, the downloader now calls a make scriptlet
to print the value of a specific variable.  This way, make handles
the ors (or any other make construct that happens to creep into
that file).

ASTERISK-27202
Reported by: Sean McCord

Change-Id: Iadfb6693528e4d4da7b8bb201fa66da2c71c7f99
2017-08-16 16:11:42 -05:00
Kevin Harwell
f919adac8d manager: hook event is not being raised
When the iostream code went in it introduced a conditional that made it so the
hook event was not being raised even if a hook is present. This patch adds a
check to see if a hook is present in astman_append. If so then call into the
send_string function, which in turn raises the even for specified hook.

Also updated the ami hooks unit test, so the test could be automated.

ASTERISK-27200 #close

Change-Id: Iff37f02f9708195d8f23e68f959d6eab720e1e36
2017-08-16 09:41:42 -05:00
Jenkins2
b3eb36a54a Merge "configure: Check cache for valid pjproject tarball before downloading." into 15 2017-08-16 07:19:52 -05:00
Richard Mudgett
7d1e1287b6 configure: Check cache for valid pjproject tarball before downloading.
On a fresh Asterisk source directory, the bundled pjproject tarball is
unconditionally downloaded even if the tarball is already in a specified
cache directory.

* Made check if the pjproject tarball is valid in the cache directory
before downloading the tarball on a fresh source directory.

Change-Id: Ic7ec842d3c97ecd8dafbad6f056b7fdbce41cae5
2017-08-15 15:23:44 -05:00
Richard Mudgett
d0f6892dff res_pjsip: Fix prune_on_boot to remove only contacts for the host.
* Check that the contact's reg_server matches the host's name before
deleting any prune_on_boot contacts.  We don't want to delete reliable
transport contacts made with other servers if the ps_contacts database
table is shared with other servers.

Thanks to Ross Beer for pointing out that the original prune logic would
delete reliable transport contacts from other servers.

ASTERISK-27147

Change-Id: I8e439d0d1c266ffdfd7b73d1e5e466180a689bd0
2017-08-15 11:22:35 -05:00
Andrey Egorov
4e11c2192f res_xmpp: Google OAuth 2.0 protocol support for XMPP / Motif
Add ability to use tokens instead of passwords according to Google OAuth 2.0
protocol.

ASTERISK-27169
Reported by: Andrey Egorov
Tested by: Andrey Egorov

Change-Id: I07f7052a502457ab55010a4d3686653b60f4c8db
2017-08-15 11:09:43 +00:00
George Joseph
0442fcb586 Merge "res_pjsip_outbound_registration.c: Re-REGISTER on transport shutdown." into 15 2017-08-14 12:20:57 -05:00
George Joseph
6a736c3c0d Merge changes from topic 'ASTERISK-27147' into 15
* changes:
  res_pjsip: Remove ephemeral registered contacts on transport shutdown.
  res_pjsip: PJSIP Transport state monitor refactor.
2017-08-14 12:20:47 -05:00
Jenkins2
c5618d7c29 Merge "res_pjsip_transport_management.c: Rename some variables." into 15 2017-08-14 11:39:51 -05:00