Commit Graph

25328 Commits

Author SHA1 Message Date
Scott Griepentrog
c229ebf8e4 sorcery: correct field register argument list
This fixes mistakes I previously made in merging
gtjoseph's changes with mine.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 22:07:52 +00:00
Matthew Jordan
10deefeace config_options: Display the see-also information for CLI config option help
The config option help information has always parsed the <see-also> tags in the
XML documentation. Unfortunately, it just never bothered displaying them on
the CLI. With this patch, when you execute 'config show help [module] [obj]
[option]', it will display what other options are useful to you.

(closes issue ASTERISK-22008)
Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:53:17 +00:00
Matthew Jordan
48ec1231f8 res_pjsip: Fix documentation for one touch recording see-also links
The one touch recording options have several see-also links between the
various configuration options. These were 'broken' by the snake casing
of those options. This patch corrects the see-also links such that they
reference the correct option names.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:13:31 +00:00
Scott Griepentrog
2e0396eac3 pjsip: allow and disallow show same codecs
In order to prevent confusion over the allow and disallow
list of codecs being the same an option for registering a
field as an alias is added.  The alias field will be read
from the configuration file, but afterwards is not listed
as a known field.  With disallow set as an alias, the CLI
command pjsip show endpoint # will list the allow= field,
but not the disallow field.

(closes issue ASTERISK-23092)
Review: https://reviewboard.asterisk.org/r/3193/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:10:41 +00:00
Mark Michelson
b24cb88190 Make res_sorcery_realtime filter unknown retrieved results.
When retrieving data from a database or other realtime backend, it's quite
possible to retrieve variables that Asterisk does not care about but that
are legitimate to exist. Asterisk does not need to throw a hissy fit when
these variables are encountered but rather just filter them out.

Review: https://reviewboard.asterisk.org/r/3305



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 21:03:57 +00:00
Richard Mudgett
42ecadbf49 stasis cache: Enhance to keep track of an item from different entities.
A stasis cache entry now contains more than a single message/snapshot.  It
contains messages/snapshots for the local entity as well as any remote
entities that post to the cached item.  In addition callbacks can be
supplied when the cache is created to compute and post the aggregate
message/snapshot representing all entities stored in the cache entry.

* All stasis messages now have an eid to indicate what entity posted it.

* The stasis cache enhancements allow device state to cache and aggregate
the device states from local and remote entities in a single operation.
The cached aggregate device state is available immediately after it is
posted to the stasis bus.  This improves performance by eliminating a
cache dump and associated ao2 container traversals to calculate the
aggregate state.

(closes issue ASTERISK-23204)
Reported by: Mark Michelson

Review: https://reviewboard.asterisk.org/r/3281/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 20:28:12 +00:00
Richard Mudgett
995d27b888 uniqueid: Fix chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler errors.
(issue ASTERISK-23120)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 19:11:27 +00:00
Scott Griepentrog
7bcf69eaad uniqueid: channel linkedid, ami, ari object creation with id's
Much needed was a way to assign id to objects on creation, and
much change was necessary to accomplish it.  Channel uniqueids
and linkedids are split into separate string and creation time
components without breaking linkedid propgation.  This allowed
the uniqueid to be specified by the user interface - and those
values are now carried through to channel creation, adding the
assignedids value to every function in the chain including the
channel drivers. For local channels, the second channel can be
specified or left to default to a ;2 suffix of first.  In ARI,
bridge, playback, and snoop objects can also be created with a
specified uniqueid.

Along the way, the args order to allocating channels was fixed
in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
masquerade occurs.

(closes issue ASTERISK-23120)
Review: https://reviewboard.asterisk.org/r/3191/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 15:46:32 +00:00
Matthew Jordan
9b77c08180 chan_sip: Allow static realtime members to be qualified during module load.
When a static realtime peer with qualify=yes is loaded, Asterisk will fail to
send an OPTIONS request due to the lastms being equal to 0. This results in
the peer being unable to receive calls from Asterisk because the status is
permanently UNKNOWN.

This patch allows an OPTIONS request to be sent during module load by
ignoring the lastms value on startup only.

Review: https://reviewboard.asterisk.org/r/3294/

(closes issue ASTERISK-17523)
Reported by: Maciej Krajewski
Tested by: wushumasters
patches:
  realtime_fix_11.7.0.txt uploaded by Trevor Peirce (license 6112)
........

Merged revisions 410105 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410106 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07 04:51:15 +00:00
Russell Bryant
5f22c3ae65 moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

Review: https://reviewboard.asterisk.org/r/3282/
........

Merged revisions 410043 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410044 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:40:42 +00:00
Richard Mudgett
b4865a4b53 sorcery.c: Fix off-nominal path ref and memory leak in ast_sorcery_objectset_json_create().
* Made exit a loop early on error in ast_sorcery_objectset_json_create().

* Removed some dead code in ast_sorcery_objectset_create2().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:35:33 +00:00
Jonathan Rose
3cdbf978d1 pjsip configuration: Make transport TOS values consistent with endpoints
Transport TOS values were interpreted as DSCP values without being documented
as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
values have historically. This patch makes the transport TOS values behave as
TOS values and makes all TOS values readable as string values (e.g. AF11).
In addition, alembic scripts have been updated to use the proper field types
for all TOS/COS values.

(issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3304/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 18:50:44 +00:00
Joshua Colp
b7326c2be7 res_stasis_recording: Add a "target_uri" field to recording events.
This change adds a target_uri field to the live recording object. It
contains the URI of what is being recorded.

(closes issue ASTERISK-23258)
Reported by: Ben Merrills

Review: https://reviewboard.asterisk.org/r/3299/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 18:18:16 +00:00
Mark Michelson
5ac921edc3 Don't attempt to link in an aggregate MWI subscription if an endpoint does not aggregate MWI.
Attempting to link a NULL object into an ao2 container had been benign previously, but since
enabling DO_CRASH in the testsuite, this is now causing a crash. It's better to be right
here anyway.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 15:43:43 +00:00
George Joseph
2bad4d070d sorcery: Create AST_SORCERY dialplan function.
This patch creates the AST_SORCERY dialplan function which allows someone to
retrieve any value from a sorcery-based config file.  It's similar to 
AST_CONFIG.

The creation of the function itself was fairly straightforward but it required
changes to the underlying sorcery infrastructure that rippled into individual
sorcery objects.  The changes stemmed from inconsistencies in how sorcery
created ast_variable objectsets from sorcery objects and the inconsistency
in how individual objects used that feature especially when it came to
parameters that can be specified multiple times like contact in aor and match
in identify.  You can read more here...
http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html

So, what this patch does, besides actually creating the AST_SORCERY function,
is the following...

* Creates ast_variable_list_append which is a helper to append one ast_variable
  list to another.
* Modifies the ast_sorcery_object_field_register functions to accept the
  already-defined sorcery_fields_handler callback.
* Modifies ast_sorcery_objectset_create to accept a parameter indicating return
  type preference...a single ast_variable with all values concatenated or an
  ast_variable list with multiple entries.  Also fixed a few bugs.
* Modifies individual sorcery object implementations to use the new function
  definition of the ast_sorcery_object_field_register functions.
* Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement
  sorcery_fields_handler handlers so they return multiple occurrences as an
  ast_variable_list.
* Added a whole bunch of tests to test_sorcery.

(closes issue ASTERISK-22537)
Review: http://reviewboard.asterisk.org/r/3254/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 15:13:03 +00:00
Matthew Jordan
a088e23f26 res_fax_spandsp: Fix crash when passing ulaw/alaw data to spandsp
When acting as a T.38 fax gateway, res_fax_spandsp would at times cause a crash
in libspandsp. This would occur when, during fax tone detection, a ulaw/alaw
frame would be passed to modem_connect_tones_rx. That particular routine
expects the data to be in slin format. This patch looks at the frame type and,
if the data is ulaw/alaw, converts the format to slin before passing it to
modem_connect_tones_rx.

Review: https://reviewboard.asterisk.org/r/3296

(closes issue ASTERISK-20149)
Reported by: Alexandr Gordeev
Tested by: Michal Rybarik
patches:
  spandsp_g711decode.diff uploaded by Michal Rybarik (license 6578)
........

Merged revisions 409990 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 02:05:26 +00:00
Richard Mudgett
d3498bd700 app_confbridge: Remove some noop code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:32:07 +00:00
Richard Mudgett
93f81ee4ef res_musiconhold.c: Remove some unnecessary RAII_VAR() usage.
* Made the moh_register() define use useful parameter names.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:17:11 +00:00
Kinsey Moore
774847cbde config: Fix inverted test
The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley
........

Merged revisions 409916 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409917 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 20:40:44 +00:00
Kinsey Moore
9650cb5f88 bridge_native_rtp: Fix crash involving masquerade
It is possible for a channel to be masqueraded out of a bridge which
means it may no longer have RTP glue to check upon leaving said bridge.
If this situation occurred (it's possible at least during dial and call
pickup) then Asterisk would crash. This change makes sure the glue is
checked before use.

(closes issue AST-1290)
Reported by: John Bigelow


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 19:21:39 +00:00
Mark Michelson
fd375c623c Fix documentation for PRESENCE_STATE to properly illustrate how to create a presence hint.
There was a missing comma.
This was discovered by Dan Kaplan.
........

Merged revisions 409886 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:46:31 +00:00
Richard Mudgett
526d0ee4cf alembic: Add missing queue and CDR table creation scripts.
* Added the queues and queue_members tables to the config alembic scripts.

* Added the CDR table alembic creation script.  The CDR table is more of
an example for new setups since the actual table can be fully customized
in cdr_adaptive_odbc.conf.

(closes issue ASTERISK-23233)
Reported by: jmls

Review: https://reviewboard.asterisk.org/r/3227/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:40:13 +00:00
David M. Lee
5ab9e72ed3 Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file
changes, it didn't cover all of the myriad of ways that one might obtain
nanosecond time resolution off of struct stat.

Rather than complicate the #if even further figuring out one system from
the next, this patch directly tests for the three struct members I know
about today, and #ifdef's accordingly.

Review: https://reviewboard.asterisk.org/r/3273/
........

Merged revisions 409833 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409834 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 16:57:12 +00:00
Sean Bright
804ee2c7d0 Fix references to 'keys' CLI commands in astgenkey
........

Merged revisions 409777 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409778 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 12:05:56 +00:00
Igor Goncharovskiy
fe17a176b4 Correct RTP handling in chan_unistim and fix transfer process broken in previous fix:
- Fixed too early RTP setup with phone, that cause no ringback tone on caller side
- Handle call transfer cancel only in STATE_CALL case (related to ASTERISK-23073)

(Reported by: Németh Tamás, niurkin sil)
........

Merged revisions 409761 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 06:30:25 +00:00
Igor Goncharovskiy
9d963d4a54 Add update_peer function to unistim_rtp_glue, improve other unistim_rtp_glue functions conforming to other channel drivers. Do not forget auto-detected and user-selected phone settings on 'unistim reload'
........

Merged revisions 409705 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409745 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 06:11:21 +00:00
Moises Silva
3ce2740bed Fix res/res_http_websocket.c build failure in 32bit due to incorrect print format for uint64_t
........

Merged revisions 409703 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 04:59:21 +00:00
Moises Silva
25f0cd3e7d Fix WebRTC over WSS not working
Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

(closes issue ASTERISK-23099)
(closes issue ASTERISK-21930)
Review: https://reviewboard.asterisk.org/r/3248/
........

Merged revisions 409681 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 01:27:13 +00:00
Richard Mudgett
2b5d779807 stasis: Made internal_stasis_subscribe() prototype and definition match exactly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 00:55:50 +00:00
Michael L. Young
75d35258a4 func_audiohookinheritance: Check If A Channel Was Specified
This patch prevents a crash when using the function audiohookinheritance without
setting the channel.

(closes issue ASTERISK-23104)
Reported by: Joel Vandal
Tested by: Joel Vandal
Patches:
    asterisk-23104_audiohook_inherit_no_channel-11.diff
                                     uploaded by Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/3272/
........

Merged revisions 409623 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409625 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 19:34:05 +00:00
Jonathan Rose
9055e2b4b7 res_rtp_asterisk: Fix one way audio problems with hold/unhold when using ICE
ICE sessions will now be restarted if sessions are changed to use new sets of
remote candidates.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Review: https://reviewboard.asterisk.org/r/3275/
........

Merged revisions 409565 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 17:07:14 +00:00
Kinsey Moore
d06644dedc AO2: Add an assert for bad objects
This adds an assert that will only be active if Asterisk is compiled
with DO_CRASH and allows the testsuite to fail tests that would
otherwise require log file parsing.
........

Merged revisions 409566 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409567 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 16:53:28 +00:00
Kinsey Moore
476bb7222b Blocked revisions 409524
........
rtp_engine: Clean up after a failed remote bridge

Upon failure of an INVITE transaction meant to initiate a remote native
bridge, rtp_engine.c would not clean up non-reference-counted bridge
instance pointers leaving a dangling pointer which was being used to
perform a local native bridge after the other channel had hung up. This
lead to dereferencing into freed memory and plenty of AO2 errors. This
change allows the remote native bridge loop to clean up properly when
the bridge fails.

(closes issue ASTERISK-23310)
Reported by: Jeremy Laine
........

Merged revisions 409521 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 15:39:43 +00:00
Sean Bright
7a11156543 Minor whitespace change to 'sip show peers' output.
(closes issue ASTERISK-23406)
Reported by: ibercom
Tested by: ibercom
Patches:
    asterisk-11.patch uploaded by ibercom
........

Merged revisions 409472 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409473 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04 14:54:21 +00:00
Joshua Colp
3a04c1b1be res_stasis_recording: Fix memory leak of the absolute name.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 19:44:20 +00:00
Matthew Jordan
f02fd0e725 doxygen: Tweak the link back to ye olde Digium website
........

Merged revisions 409361 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409362 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03 02:08:14 +00:00
Tzafrir Cohen
d2c6e91971 Makefile: replace -O6 with -O3
-O6 is not a legal option of gcc. Unofficially gcc considers it to be
equivalent of -O3. clang chalks on it, though. This commit sets the 
default optimization flag to be -O3, like gcc actually considered it.

Review: https://reviewboard.asterisk.org/r/3280/
........

Merged revisions 409308 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409344 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-02 15:14:45 +00:00
Joshua Colp
49c2d55c10 res_pjsip_session: Set options (100rel, timers) on incoming sessions.
This change passes options to the UAS creation function. This in turn
sets up 100rel and session timer properties on the incoming session.

Reported by Julian Russell on asterisk-users mailing list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 20:27:17 +00:00
Richard Mudgett
dccc215ba9 devicestate.c: Simplified some logic in _ast_device_state().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 00:04:47 +00:00
Richard Mudgett
4c840980cf stasis_cache.c: Remove some unnecessary RAII_VAR() usage.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-01 00:00:33 +00:00
Richard Mudgett
014010bf8e stasis.c: Misc code cleanups.
* Remove some unnecessary RAII_VAR() usage.

* Made the struct stasis_subscription ao2 object use the ao2 lock instead
of a redundant join_lock in the struct for ast_cond_wait().

* Removed locks on some ao2 objects that don't need the lock.

* Made the topic pool entries container use the ao2 template functions.

* Add some missing allocation failure checks.

* Add missing cleanup in off nominal path of dispatch_message().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 23:29:58 +00:00
Richard Mudgett
c38f3bd145 chan_sip: Add precautionary p->owner checks.
* Add precautionary p->owner checks in sip_hangup(), get_refer_info(),
get_also_info(), and interpret_t38_parameters().

* Simplify some tangled logic in get_refer_info(), get_also_info(), and
add_rpid().

* Removed some dead code in handle_request_invite().

(closes issue ASTERISK-23323)
Reported by: Walter Doekes
Patches:
      issueA23323-more_p_owner_checks-1.8.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-11.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-12.x.patch (license #5674) uploaded by wdoekes (modified)
      issueA23323-more_p_owner_checks-trunk.patch (license #5674) uploaded by wdoekes (modified)
........

Merged revisions 409207 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409255 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:40:54 +00:00
Kinsey Moore
370b75e4e1 app_queue: Fix documented AMI event name
During the rewrite of AMI events to use the Stasis bus, the name of the
QueueMemberPaused event was changed to QueueMemberPause. This corrects
documentation to reflect that.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:24:15 +00:00
Kinsey Moore
f0948cf239 Blocked revisions 409208
........
app_queue: Fix documentation generation

The documentation for QueueMemberPaused was causing documentation
generation to fail because the documentation for that AMI event was in
the wrong location. This moves that documentation the correct location
and adds a missing parameter.

(closes issue SWDAT-261)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 21:15:22 +00:00
Richard Mudgett
649dfa007c chan_sip: Fix crash in ast_channel_hangupcause_set().
* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes
........

Merged revisions 409156 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409157 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-28 18:02:11 +00:00
Jonathan Rose
5261fd7bc7 Multiple revisions 409129-409130
........
  r409129 | jrose | 2014-02-27 13:19:02 -0600 (Thu, 27 Feb 2014) | 15 lines
  
  res_rtp_asterisk: Fix checklist creating problems in ICE sessions
  
  Prior to this patch, local candidate lists including SRFLX would fail to start
  properly when building ICE candidate check lists. This patch fixes that problem
  by making sure that each SRFLX candidate is associated with the proper
  base address so that the check list can create matches properly.
  This patch was written by jcolp. The issue will be left open to await testing
  by the issue participants.
  
  (issue ASTERISK-23213)
  Reported by: Andrea Suisani
  Review: https://reviewboard.asterisk.org/r/3256/
........
  r409130 | jrose | 2014-02-27 13:38:10 -0600 (Thu, 27 Feb 2014) | 8 lines
  
  res_rtp_asterisk: correct build error from r409129
  
  Accidentally placed a declaration below functional code
  
  (issue ASTERISK-23213)
  Reported by: Andrea Suisani
  Review: https://reviewboard.asterisk.org/r/3256/
........

Merged revisions 409129-409130 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 19:42:17 +00:00
David M. Lee
7bf499290d Fix memory stomping bug in astman.
This memset complained in dev mod on my Ubuntu box. The memset is both
unnecessary and dangerous. At this point, m hasn't been initialized
yet, so the memset will write off to whatever address happens to be
on the stack at the time.
........

Merged revisions 409077 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409083 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:25:32 +00:00
Corey Farrell
a976d09cdc res_fax: Warn that minrate=2400 is not valid for V.27 instead of failing load.
Change minrate from 2400 to 4800 on config reload in response to changes from
ASTERISK-22790 only.  Any config with minrate of 2400 that would fail before
r405693 will still fail.

Comment out many settings in res_fax.conf.sample. The defaults are set in
res_fax.c, so setting the same value in sample config does nothing but make
the sample config more fragile.

(closes issue ASTERISK-23231)
Reported by: David Brillert
Review: https://reviewboard.asterisk.org/r/3261/
........

Merged revisions 409052 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 409053 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 16:05:31 +00:00
Matthew Jordan
4488ca127b Blocked revisions 409002
Note that this is blocked in 12 as channels are no longer masqueraded out
of bridges. The channel cannot be replaced with a ZOMBIE channel in the
affected routine.

........
rtp_engine: fix crash during remote native bridging when calling get_codecs

When two RTP channels are in a remote bridge, the remote bridging loop in
rtp_engine will periodically check to see if the two channels can still be
bridged. One of the many things it checks is whether or not the codecs have
changed on the channel. If the codec has changed, it will break out of the
loop to re-determine which type of bridge is appropriate.

In order to perform this check, the ast_rtp_glue virtual table's get_codec
callback is called for each channel. The callback implementations assume
that the channel tech private is valid when called; as such, there has
always been some code in place to check whether or not the channel pvt is
NULL before calling. However, this check is insufficient.

The channels are unlocked during the remote bridging loop. It is possible
for a channel to get masqueraded between the check for the pvt being NULL and
the actual call to get_codec. When this occurs, the callback is called with a
ZOMBIE channel, which now has a NULL pvt. Crash.

While this has always been possible in Asterisk 1.8, it is much more likely to
occur in Asterisk 11 and later versions due to the timing changes that occur
when getting the codec from a channel. Note that this is much more likely to be
reproduced on slow, boggy hardware running Asterisk 11 - but fairly rarely
otherwise.

Also Note: This crash was also caught by the various SIP blind transfer tests,
in addition to the bug report Alec filed.

Review: https://reviewboard.asterisk.org/r/3247/

(closes issue ASTERISK-21737)
Reported by: Alec Davis
Tested by: Alec Davis
........

Merged revisions 409001 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 13:09:37 +00:00
Matthew Jordan
e7d0c35210 res_pjsip_sdp_rtp: Apply packetization rules on inbound SDP handling
The setting 'use_ptime' is supposed to tell Asterisk to honour the ptime
attribute in an offer, preferring it to whatever packetization
preferences have been set internally. Currently, however, something
rather quirky will happen:

(1) The SDP answer will be constructed in create_outgoing_sdp_stream.
    This will use the preferences from the endpoint, such that the 200 OK
    response will add the packetization preferences from the endpoint, and
    not what was offered.
(2) When the 200 response is issued, apply_negotiated_sdp_stream is called.
    This will call apply_packetization, which will use the ptime attribute
    from the offer internally.

We end up telling the offerer to use the internal ptime attribute, but we end
up using the offered ptime attribute. Hilarity ensues.

This patch modifies the behaviour by calling apply_packetization from
negotiate_incoming_sdp_stream, which is called prior to
create_outgoing_sdp_stream. This causes the format preferences on the
session's media object to be set to the inbound ptime value (if 'use_ptime'
is enabled), such that the construction of the answer gets the right value
immediately.

Review: https://reviewboard.asterisk.org/r/3244/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-27 12:28:04 +00:00