Commit Graph

25340 Commits

Author SHA1 Message Date
Mark Michelson
98893f97ea Allow for multiple contacts to be configured in a single contact= line.
This is useful for configuring multiple permanent contacts for an AOR when using
realtime AORs.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:39:52 +00:00
Richard Mudgett
a44f43d452 Originated calls: Fix several originate call problems.
* Restore the reason value set by pbx_outgoing_attempt() to use
AST_CONTROL_xxx values as all the consumers were expecting rather than
cause codes.

* Fixed the dial routines to set cause codes for more than just
ast_request() so pbx_outgoing_attempt() reason codes will function.

* Fix inconsistent locked_channel return status in pbx_outgoing_attempt().
The chanel may not have been locked or the channel may have been a stale
pointer.

* Fixed the OutgoingSpoolFailed channel to run dialplan whenever the
dialing fails for an originate exten and 1 < synchronous.

* Fix incorrect ast_cond_wait() usage in pbx_outgoing_attempt().
Indroduced by issue ASTERISK-22212 patch.

* Made struct pbx_outgoing use the ao2 lock instead of its own lock for
the cond wait mutex.  No sense in having two locks associated with the
same struct when only one is needed.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:38:20 +00:00
Richard Mudgett
341db59212 app_dial and app_queue: Make lock the forwarding channel while taking the channel snapshot.
* Fixed ast_channel_publish_dial_forward() not locking the forwarded
channel when taking the channel snapshot.

* Fixed app_dial.c:do_forward() using the wrong channel to get the
original call forwarding string.

* Removed unnecessary locking when calling ast_channel_publish_dial() and
ast_channel_publish_dial_forward() in app_dial and app_queue.  Holding
channel locks when calling ast_channel_publish_dial_forward() with a
forwarded channel could result in pausing the system while the stasis bus
completes processsing a forwarded channel subscription.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 16:19:17 +00:00
Kinsey Moore
6b9f6459da ARI: Add debug logging for events and responses
This adds DEBUG level logging for ARI websocket events and HTTP
responses similar to what is available for AMI. Logging for ARI HTTP
requests is already adequate for debugging purposes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 14:21:34 +00:00
Joshua Colp
3a0d0b7522 res_pjsip: Handle reloading when permanent contacts exist and qualify is configured.
This change fixes a problem where permanent contacts being qualified were not
being updated. This was caused by the permanent contacts getting a uuid and not a
known identifier, causing an inability to look them up when updating in the
qualify code. A bug also existed where the new configuration may not be available
immediately when updating qualifies.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 22:49:32 +00:00
Jonathan Rose
8baf0ae036 Fix a silly shadowed variable mistake that was missed from play tones patch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 22:42:16 +00:00
Jonathan Rose
a365f9100f ARI: Add tones playback resource
Adds a tones URI type to the playback resource. The tone can be specified by
name (from indications.conf) or by a tone pattern. In addition, tonezone can
be specified in the URI (by appending ;tonezone=<zone>). Tones must be
stopped manually in order for a stasis control to move on from playback of
the tone. Tones may be paused, resumed, restarted, and stopped. They may
not be rewound or fast forwarded (tones can't be controlled in a way that
lets you skip around from note to note and pausing and resuming will also
restart the tone from the beginning). Tests are currently in development
for this feature (https://reviewboard.asterisk.org/r/3428/).

(closes issue ASTERISK-23433)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3427/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 21:47:10 +00:00
Matthew Jordan
703220e8a9 main/Makefile: Fix build failure on SmartOS/Illumos/SunOS
This patch fixes two issues when building on SmartOS:

- channels/chan_oss.c: it makes sure soundcard.h is found
- main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun
  Linker doesn't support that. Similar checks are already used elswhere in the
  Makefile

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

ASTERISK-23576 #close
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 20:24:41 +00:00
Kevin Harwell
4ca3de4f63 res_pjsip_refer: Channel variable SIPREFERTOHDR not being set during blind transfer
The SIPREFERTOHDR channel variable is not being set on any channel when
performing a blind transfer using PJSIP. The 'refer->refer_to' was not
being set during a blind transfer.  Updated so the 'refer_to' is set to
the target uri on a blind transfer.

(closes issue ASTERISK-23502)
Reported by: John Bigelow
Review: https://reviewboard.asterisk.org/r/3445/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-17 15:16:42 +00:00
Kinsey Moore
91e7c75848 Stasis: Add a usage note on stasis_app_get_bridge
This function returns an ast_bridge without a refcount bump and the
caller must increment the count if it intends to hold the pointer.

(closes issue ASTERISK-23588)
Review: https://reviewboard.asterisk.org/r/3450/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-16 19:13:51 +00:00
Richard Mudgett
32cd970a21 Eliminate some more unnecessary RAII_VAR() uses.
RAII_VAR() is not a hammer appropriate to pound all nails.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 18:27:23 +00:00
Richard Mudgett
51554c2927 Remove unused RAII_VAR() declarations.
* Remove unused RAII_VAR() declarations.  The compiler cannot catch these
because the cleanup function "references" the unused variable.  Some
actually allocated and released resources that were never used.

* Fixed some whitespace issues in stasis_bridges.c.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 17:56:53 +00:00
Richard Mudgett
ecd1f0eef5 chan_sip.c: Fix channel staging assertion failure.
The failing assertion ensures that the final snapshot gets generated so
CDR records can get finalized.  The only place where a channel staging
snapshot flag could be left set is in chan_sip.c:handle_request_bye().
The function could return before clearing the flag because the channel
could dissappear while the function had to have the channel unlocked.

* Fixed handle_request_bye() channel snapshot staging coverage area to not
have a return in the middle of it and be unable to clear the staging flag.

* Pushed the channel snapshot staging coverage area into
ast_rtp_instance_set_stats_vars() to ensure that the staging is not
interrutped.

* Made callers of ast_rtp_instance_set_stats_vars() not call it with any
channels or channel driver private locks held to eliminate the deadlock
potential.  The callers must hold references to the passed in channel and
rtp objects.

* Eliminated sip_hangup() trying to get the bridge peer.  It is futile at
this point because the channel could never be in a bridge.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 17:01:33 +00:00
Richard Mudgett
026d9e4613 chan_sip.c: Moved some sip_pvt unrefs after their last use.
* Moved sip_pvt unref in ast_hangup() and handle_request_do() to the end
of the function.  The unref needs to happen after the last use of the
pointer.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 16:36:38 +00:00
Jonathan Rose
8357534796 Reverting r411189 so that it can be put up for public review
---
  r411189 | jrose | 2014-03-26 10:50:48 -0500 (Wed, 26 Mar 2014) | 12 lines

  chan_sip: Send real CallerID information with P-Assserted-Identity (RFC-3325)

  Prior to 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 412328 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 15:58:42 +00:00
Corey Farrell
e15cab3523 autoservice: fix reference leak of logger callid.
autoservice acquires a local reference to the logger callid of each channel
in a loop.  This local reference was not released, causing the callid of
every channel in autoservice to leak.  This change moves the callid unref
inside the loop.

ASTERISK-23616 #close
Reported by: ibercom
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-14 15:53:26 +00:00
Richard Mudgett
8dc10400b7 app_stack: Add missing unlock in off-nominal path of STACK_PEEK function.
ASTERISK-23620 #close
Reported by: Bradley Watkins
Patches:
      ASTERISK-23620_unlock_oldlist.patch (license #5021) patch uploaded by Bradley Watkins
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 21:41:50 +00:00
Kinsey Moore
acb2a24954 bridging: Ensure locking during snapshot creation
While the vast majority of bridge snapshot creation is locked properly,
there are currently some instances that are not. This adds the missing
locking to ensure bridge state is not malleable during snapshot
creation.

(closes issue ASTERISK-22904)
Review: https://reviewboard.asterisk.org/r/3415/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 12:35:52 +00:00
Matthew Jordan
eefe5659f6 main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG output
This patch does the following:
(1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables
    REF_DEBUG globally throughout Asterisk.
(2) The ref debug log file is now created in the AST_LOG_DIR directory.
    Every run will now blow away the previous run (as large ref files
    sometimes caused issues). We now also no longer open/close the file
    on each write, instead relying on fflush to make sure data gets written
    to the file (in case the ao2 call being performed is about to cause a
    crash)
(3) It goes with a comma delineated format for the ref debug file. This
    makes parsing much easier. This also now includes the thread ID of the
    thread that caused ref change.
(4) A new python script instead for refcounting has been added in the
    contrib/scripts folder.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11 02:48:50 +00:00
Matthew Jordan
affc775b35 res_hep_pjsip: Use the channel name instead of the call ID when it is available
During discussions with Alexandr Dubovikov at Kamailio World, it became
apparent that while the SIP call ID is a useful identifier prior to an Asterisk
channel being created, it is far more preferable to use the channel name (or
some channel based identifier) when the channel is available. Homer is smart
enough to tie the various messages together. This patch opts to use the channel
name when it is available, falling back to the call ID otherwise.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-10 21:27:25 +00:00
Kevin Harwell
f7611711f1 res_pjsip_pubsub: Set the body generation result to 0 for a valid path
The result of the "ast_sip_pubsub_generate_body_content" was not
set/initialized.  Consequently, the nominal path potentially returned
an invalid value, thus not sending mwi notifications.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-10 21:07:44 +00:00
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