Commit Graph

25469 Commits

Author SHA1 Message Date
Mark Michelson
29283615f6 Add a Command header to the AMI Mixmonitor action.
This fixes a parsing error that occurred during the processing of
the AMI action. The error did not result in MixMonitor itself
misbehaving, but it could result in the AMI response not giving
correct information back.

The new header allows for one to specify a post-process command
to run when recording finishes. Previously, in order to do this,
the post-process command would have to be placed at the end of
the Options: header. 

Patches: mixmonitor_command_2.patch by jhardin (License #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-09 20:32:36 +00:00
Kinsey Moore
9e9ebccb12 res_stasis_answer: Add missing newlines
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-09 18:16:08 +00:00
Richard Mudgett
a32039a552 Internal timing: Add notice that the -I and internal_timing option are no longer needed.
Add notice messages during execution that the -I command line option and
the astersik.conf internal_timing option are no longer needed.  The
internal timing functionality is now always enabled if there is a timing
module loaded.

NOTE: Since the command line options and the asterisk.conf config file are
processed before the logging system is initialized, the messages are
output to stderr.

Change requested as a result of asterisk-dev list comments about the
commit for ASTERISK-22846 that removed the -I and internal_timing options.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 21:23:46 +00:00
Richard Mudgett
08e25ad156 config: Fix CB_ADD_LEN() to work as originally intended.
Fix a long standing bug in CB_ADD_LEN() behaving like CB_ADD().

ASTERISK-23546 #close
Reported by: Walter Doekes
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 20:51:55 +00:00
Richard Mudgett
afdb50aa96 app_confbridge: Fix confbridge.conf dsp_talking_threshold option setting wrong parameter.
Fixed copy pasta error.

ASTERISK-23545 #close
Reported by: John Knott
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 18:01:58 +00:00
Joshua Colp
97e034a4d8 res_pjsip: Ignore explicit transport configuration if a WebSocket transport is specified.
This change makes it so if a transport is configured on an endpoint that is a WebSocket
type the option will be ignored. In practice this is fine because the WebSocket
transport can not create outgoing connections, it can only reuse existing ones. By
ignoring the option the existing PJSIP logic for using the existing connection will
be invoked and stuff will proceed.

(closes issue ASTERISK-23584)
Reported by: Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08 14:48:46 +00:00
Kinsey Moore
46cdbe5863 PJSIP: Ensure test event has new state
The change that fixed the pubsub test event's use of a dangling pointer
also changed when it was processed relative to the pjsip subscription
state change processing. This change corrects the order of events while
holding a reference to the pointer that was previously dangling.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 20:39:55 +00:00
Jonathan Rose
5d5cc8b88c AGI/Manager: Prevent multiple NewExten events during AGI application changes
AGI applications would trigger NewExten events every time the state of the AGI
application changed. This has historically not been the behavior and this
behavior was introduced with a CDR patch. This patch corrects that.

(closes issue ASTERISK-23390)
Reported by: Benjamin Keith Ford
Review: https://reviewboard.asterisk.org/r/3406/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 16:02:44 +00:00
Walter Doekes
4117ac58ed app_queue: Re-add HoldTime to QueueCallerAbandon event (simple typo during ast12 refactor).
Reported by: Ibrahim22 (on IRC)
Tested by: Ibrahim22


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:55:19 +00:00
Walter Doekes
e0ad8ce3e4 configs: Clean up long line and typo in res_odbc.conf.sample.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:50:04 +00:00
Kinsey Moore
b33b4f21cc Stasis: Fix Stasis() bridge refcount issue
The Stasis() dialplan application monitors what bridge a channel is in
and so necessarily holds on to a bridge pointer. This change ensures
that it also holds on to a reference for that bridge to prevent the
bridge pointer from becoming a dangling pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 14:28:41 +00:00
Kinsey Moore
2c6af830d9 PJSIP: Fix crash introduced in r411671
The test event introduced in revision 411671 uses a dangling pointer to
access information about pubsub state changes. This moves the event to
within the lifetime of the pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-07 13:24:09 +00:00
Richard Mudgett
84d7ae1894 internal_timing: Remove the option and always make it enabled if a timing module is loaded.
The masquerade supertest frequently fails because either the local channel
chain doesn't completely optimize out or the DTMF handshake doesn't
completely get accross.  Local channel optimization requires frames
flowing to trigger when optimization can happen.  When optimization
happens the media frame that triggered the optimization is dropped.
Sending DTMF requires frames to flow in the other direction for timing
purposes while sending nothing.  If internal timing is not enabled when
MOH is playing, Asterisk switches to received timing when an audio frame
is received.  With optimization dropping media frames and MOH not sending
frames unless it receives frames, occasionaly there are no more frames
being passed and the test fails.

* The asterisk command line -I option and the asterisk.conf
internal_timing option are removed.  Asterisk now always uses internal
timing when needed if any timing module is loaded.  The issue
ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken
if other internal timing modules besides DAHDI are used.  The
ast_read_generator_actions() now only does received timing if it has no
choice for frame generators like MOH, silence, and playback streaming.

* Cleaned up some code dealing with frame generators in
ast_deactivate_generator(), generator_write_format_change(),
ast_activate_generator(), and ast_channel_stop_silence_generator().

ASTERISK-22846 #close
Reported by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 19:02:57 +00:00
Richard Mudgett
3ad7a09002 Add some asserts that were handy when looking for a stasis cache problem.
* Assert if a channel is destroyed but has the snapshot staging flag set.
In this case the final channel destruction snapshot would never get taken.

* Assert if what we just got out of the stasis cache is not what we were
looking for.  This assert would have saved several days searching for a
bug and a lot of my hair.

* Assert if the music on hold message posts could not find the associated
channel.  A crash will happen later when manager tries to send the MOH AMI
message.  This assert catches the problem when the stasis message is
posted instead of by the thread processing the defective message.

* Always generate a backtrace when an ast_assert() fails.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 17:53:20 +00:00
Matthew Jordan
96426324be http: Fix spurious ERROR message in responses with no content
When a response has a content length of 0, fwrite would be called to write a
buffer with no data in it. This resulted in the following classic error
message:

  [Apr  3 11:49:17] ERROR[26421] http.c: fwrite() failed: Success

This patch makes it so that we only attempt to write out the content if the
calculated content_length is non-zero.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 15:11:48 +00:00
Kinsey Moore
65a71b5428 res_pjsip_pubsub: Add test event for state change
This adds a test event when subscription state changes so that
integration tests may trigger new actions at the appropriate times.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-03 11:57:10 +00:00
Matthew Jordan
39df315d97 res_hep: Fix crash when hep.conf not available
Parts of res_hep properly checked for a valid configuration object before
attempting to access the configuration. A check, however, was missed when
a packet is sent. This patch fixes the crash caused by not checking if the
configuration object is valid.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-03 11:43:24 +00:00
Richard Mudgett
abbe88ce19 res_parking: Minor tweaks.
* Use ast_bridge_channel_lock()/ast_bridge_channel_unlock() instead of
ao2_lock()/ao2_unlock() for struct ast_bridge_channel variables.

* Use ast_copy_string() instead of inlining it.

* Remove an already done TODO comment.

* Some whitespace tweaks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 22:41:16 +00:00
Richard Mudgett
6b46e78b59 stasis_channels.c: Eliminate another overuse of RAII_VAR().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 22:24:39 +00:00
Corey Farrell
79d467285a Blocked revisions 411633
........
app_voicemail: fix missing symbol

ASTERISK-23391 caused a regression where the symbol 'defaultlanguage'
was used by app_voicemail but not exported by main/asterisk.  This
change renames the variable to ast_defaultlanguage.  The variable was
already renamed in Asterisk 12+.

(closes issue ASTERISK-23559)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3408/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 20:48:36 +00:00
Joshua Colp
8b5bf0f282 app_queue: Fix a bug where realtime members would be deleted during reload causing waiting callers to get ejected.
This patch causes realtime queue members to remain in queues during the reload process. Previously these
members would be removed causing any waiting callers to be ejected from the queue with a reason of "EXITEMPTY".

ASTERISK-23547 #close
ASTERISK-23547 #comment Patch app_queue_fix_realtime_reload_1.8_trunk.patch submitted by Italo Rossi (license 6409)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-01 16:51:05 +00:00
Matthew Jordan
dccb74849e res_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP
This patch adds the following:
(1) A new module, res_hep, which implements a generic packet capture agent for
the Homer Encapsulation Protocol (HEP) version 3. Note that this code is based
on a patch provided by Alexandr Dubovikov; I basically just wrapped it up,
added configuration via the configuration framework, and threw in a
taskprocessor.
(2) A new module, res_hep_pjsip, which forwards all SIP message traffic that
passes through the res_pjsip stack over to res_hep for encapsulation and
transmission to a HEPv3 capture server.

Much thanks to Alexandr for his Asterisk patch for this code and for a *lot*
of patience waiting for me to port it to 12/trunk. Due to some dithering on
my part, this has taken the better part of a year to port forward (I still
blame CDRs for the delay).

ASTERISK-23557 #close

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 18:09:03 +00:00
Alexandr Anikin
21165859f2 process stack command even if gatekeeper client isn't register
don't destroy gatekeeper client if it is not started
don't destroy gatekeeper client in some sort of gatekeeper errors
signal rtp create condition when call cleared before rtp structure created

(closes issue ASTERISK-23460)

Reported by: Dmitry Melekhov
Patches:
	ASTERISK-23460-2.patch

Tested by: Dmitry Melekhov
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:52:09 +00:00
Matthew Jordan
c6e15a8e34 Update API versions and UPGRADE/CHANGES for 12.2.0
This patch does the following:
 * It updates the AMI version to 2.2.0 to indicate backwards compatible
   changes have been made since the last release
 * It updates the ARI version to 1.2.0 to indicate backwards compatible
   changes have been made since the last release
 * It updates the UPGRADE/CHANGES files with changes that were not
   mentioned


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:35:48 +00:00
Mark Michelson
44e73556bc Add alembic script that adds contact user_agent and endpoint message_context.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:08:52 +00:00
Matthew Jordan
016c672852 res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.
This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 16:48:32 +00:00
Scott Griepentrog
ed2452a9a5 http: response body often missing after specific request
This patch works around a problem with the HTTP body
being dropped from the response to a specific client
and under specific circumstances:

a) Client request comes from node.js user agent
   "Shred" via use of swagger-client library.

b) Asterisk and Client are *not* on the same
   host or TCP/IP stack

In testing this problem, it has been determined that
the write of the HTTP body is lost, even if the data
is written using low level write function.  The only
solution found is to instruct the TCP stack with the
shutdown function to flush the last write and finish
the transmission.  See review for more details.


ASTERISK-23548 #close
(closes issue ASTERISK-23548)
Reported by: Sam Galarneau
Review: https://reviewboard.asterisk.org/r/3402/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 16:17:52 +00:00
Matthew Jordan
833d37a15e Remove block on 411408
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 16:00:46 +00:00
Matthew Jordan
5c72fbc83d UPGRADE: Note IAX2 compatibility issue between 1.4 and 1.8+ systems.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 15:47:36 +00:00
Matthew Jordan
d6faf21d4a contrib/realtime: Remove empty SQL script files
Since the relatime scripts are now managed by Alembic, the previous realtime
scripts were previously removed. However, the removal process messed up, as
the files were still in the repository. The contents were just empty.

This removes the files from the tree.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 14:18:32 +00:00
Matthew Jordan
06c0158d8e Blocked revisions 411408
........
res_config_odbc/res_odbc: Fix handling of non-text columns updates with empty values.

This patch fixes setting nullable integer columns to NULL instead of an empty
string, which fails for PostgreSQL, for example. The current code is supposed
to do so, but the check is broken. The patch also allows the first column in
the list to be a nullable integer.

This patch also adds a compatibility setting in res_odbc.conf,
allow_empty_string_in_nontext. It is enabled by default. It should be disabled
for database backends (such as PostgreSQL) that require NULL instead of an
empty string for Integer columns.

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

(issue ASTERISK-23459)
Reported by: zvision
patches:
  res_config_odbc.diff uploaded by zvision (License 5755)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 04:33:07 +00:00
Matthew Jordan
118789a15a chan_sip: Add MESSAGE request to allowed methods
The allowed methods advertised by chan_sip did not previously note the MESSAGE
request. Even in Asterisk 1.8, we do accept in-dialog MESSAGE requests; we
should advertise that we support MESSAGE requests.

ASTERISK-23504 #close
ASTERISK-23504 #comment Reported by: Martin Kontsek
ASTERISK-23504 #comment Patch sip.h_patch.diff uploaded by Martin Kontsek (license 6587)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 03:54:31 +00:00
Corey Farrell
56dac4c762 Fix dialplan function NULL channel safety issues
(closes issue ASTERISK-23391)
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3386/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 19:15:35 +00:00
Corey Farrell
2cb2ee62ae main/formats: Fix crash in ast_format_cmp during non-clean shutdown.
* Update asterisk.h to reflect availability of ast_register_cleanup in 11.9.
* Use ast_register_cleanup for format_attr_shutdown.

(closes issue ASTERISK-23103)
Reported by: JoshE
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 18:24:24 +00:00
Mark Michelson
e8c1b4f2b0 Give sorcery instances a reference to their wizards.
On graceful shutdown, sorcery wizards are all killed off, but it is
possible for sorcery instances to still have dangling pointers after
this, possibly causing a crash. Giving the sorcery instances a reference
to their wizards ensures that the wizard reference will remain valid for
the lifetime of the sorcery instance.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27 14:20:10 +00:00
Joshua Colp
017d40c2b2 say: Fix a bug where SayNumber in Polish tries to play incorrect sound.
This change fixes a bug where calling SayNumber with a number divisible by
100 using the Polish language would cause the code to attempt to play a
sound file with an empty name.

(closes issue ASTERISK-23509)
Reported by: zvision

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 22:44:40 +00:00
Jonathan Rose
fc7faefe55 chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)
Prior too this patch, the P-Asserted-Identity header would include anonymous
caller id information which seems to go against the point of the
P-Asserted-Identity header. Now the real caller ID information will be
included in this header. Also, no privacy header would be included.
This patch adds 'Privacy: id' to outgoing SIP messages that include the
P-Asserted-Identity header.

(closes issue AST-1301)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 16:07:31 +00:00
Richard Mudgett
a90c190c87 Fix 'alembic branches' merge conflict as described by the web page.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 16:03:24 +00:00
Sean Bright
c90a39b6b8 ARI: Don't complain about missing ARI users when we aren't enabled
Currently, if ARI is not enabled it will still complain that there are no
configured users.  This patch checks to see if ARI is enabled before logging and
error or iterating the container to validate the users.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 18:43:57 +00:00
Mark Michelson
7d174a1daf Prevent duplicate sorcery wizards from being applied to sorcery object types.
This commit contains several changes to sorcery:

1) Application of sorcery configuration based on module name is automatically performed
when sorcery is opened for a module.
2) Sorcery will not attempt to apply the same wizard to an object type more than once.
3) Sorcery gives more exact results when attempting to apply a wizard, whether as the
default or based on configuration.

Sorcery unit tests still pass for me after making these changes.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 17:52:39 +00:00
Mark Michelson
665461ef70 Add a "message_context" option for PJSIP endpoints.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 17:30:56 +00:00
Richard Mudgett
6695c113db res_pjsip: Fix contact authenticate_qualify endpoint lookup when qualifing a contact.
* Fixed bad use of ao2_find() in on_endpoint().

* Replaced use of find_endpoints() with find_an_endpoint() since only the
first found endpoint is ever needed.

* Fixed qualify_contact_cb() to update the contact with the aor
authenticate_qualify setting.  Otherwise, permanent contacts in the aor
type sections would have a config line order dependancy.

* Fixed off nominal path contact ref leak in qualify_contact().  The
comment saying the unref is not needed was wrong.

* Fixed off nominal path use of the endpoint parameter if it is NULL in
send_out_of_dialog_request().

* Added missing off nominal path unref of pjsip tdata in
send_out_of_dialog_request().

* Fixed off nominal path failing to call the callback in send_request_cb()
when the request is challenged for authentication.

* Eliminated silly RAII_VAR() use in qualify_contact_cb().

* Updated ast_sip_send_request() doxygen to better reflect reality.

(closes issue ASTERISK-23254)
Reported by: rmudgett

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 16:55:16 +00:00
Kinsey Moore
0a2ebbd815 chan_sip: Fix incorrect use of timers
If update_provisional_keepalive() is called while
send_provisional_keepalive_full() is waiting on the PVT lock, then
pvt->provisional_keepalive_sched_id will be changed to a new sched_id
value by update_provisional_keepalive(), but that new sched_id then may
be overwritten with -1 by send_provisional_keepalive_full(), killing
the pvt's reference to a schedule and "leaking" the reference.

(closes issue ASTERISK-22079)
Review: https://reviewboard.asterisk.org/r/3368/
Reported by: Jamuel Starkey, Matteo, Leif Madsen, Steve Davies
Patches:
    provisional_keepalive_fix.diff uploaded by Steve Davies (license 5012)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 16:04:10 +00:00
Jonathan Rose
225c7dd818 ARI: Resolve a subscription leak against implicit bridge subscriptions
When a channel in a stasis application is joined to a bridge, a subscription
for that bridge is created implicitly for the stasis application serving the
channel. Prior to this patch, subsequent removals of the channel from the
bridge would leave the subscription open.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-25 15:44:29 +00:00
Joshua Colp
bab4f757f2 chan_sip: Always use fromdomain if set for domain, even if callerid is set to restricted.
(closes issue ASTERISK-20841)
Reported by: Kelly Goedert
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-24 21:38:21 +00:00
Richard Mudgett
82f9ceae5b res_pjsip_registrar.c: Miscellaneous cleanup in rx_task().
* Fix variable shadowing of 'updated' by renaming it to 'contact_update'.

* Checked 'contact_update' for ast_sorcery_copy() failure.

* Removed silly use of RAII_VAR() for 'contact_update'.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-21 16:01:56 +00:00
Jonathan Rose
8d1073a05d app_confbridge: Fix bug - users with startmuted set don't start muted
(closes issue ASTERISK-23461)
Reported by: Chico Manobela
Review: https://reviewboard.asterisk.org/r/3373/
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 22:54:59 +00:00
Richard Mudgett
ce6048c07f assigned-uniqueids: Miscellaneous cleanup and fixes.
* Fix memory leak in ast_unreal_new_channels().  Made it generate the ;2
uniqueid on a stack variable instead of mallocing it.

* Made send error response to ARI and AMI requests instead of just logging
excessive uniqueid length and allowing truncation.  action_originate() and
ari_channels_handle_originate_with_id().

* Fixed minor truncating uniqueid hole when generating the ;2 uniqueid
string length.  Created public and internal lengths of uniqueid.  The
internal length can handle a max public uniqueid plus an appended ;2.

* free() and ast_free() are NULL tolerant so they don't need a NULL test
before calling.

* Made use better struct initialization format instead of the position
dependent initialization format.  Also anything not explicitly initialized
in the struct is initialized to zero by the compiler.

* Made ast_channel_internal_set_fake_ids() use the safer
ast_copy_string() instead of strncpy().

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-20 16:27:49 +00:00
Mark Michelson
c2dd050e1a PJSIP: Allow for identify sections to be specified in sorcery.conf.
"identify" is a special type of configuration object in PJSIP because
unlike the other objects, it is not provided by the base res_pjsip module.
Instead, it is provided by the res_pjsip_endpoint_identifier_ip module. If
using the default sorcery wizard (config,criteria=type=identify) then things
work because the module that applies the default wizard is the correct module.

However, if attempting to use sorcery.conf to apply an alternate wizard, it
was not possible. If you attempted to specify the identify object type in the
res_pjsip section, then the object could not be registered since the object
was undocumented for the res_pjsip module. There was no alternate configuration
section defined for it, so you were out of luck if you wanted to override the
default wizard.

With this change, the identify section will properly have a sorcery.conf-based
wizard applied when the identify definition is within the res_pjsip_endpoint_identifier_ip
section.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 17:26:22 +00:00
Joshua Colp
5517b92d75 res_stasis: Fix a bug where the default bridge type was not set.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 14:24:43 +00:00