Commit Graph

3218 Commits

Author SHA1 Message Date
Kinsey Moore
d0619b1217 editing files in main/editline does not ensure rebuild of libedit.a
When editing a source file in main/editline, the build system does not rebuild
libedit.a and uses the already existing one instead.  Adding a PHONY to
CHECK_SUBDIR fixes this problem.

(closes issue ASTERISK-16221)
Patch-by: Walter Doekes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-03 15:14:36 +00:00
Kinsey Moore
ba0c95e491 Incorrect playback for Spanish in some circumstances
When you say the time in spanish and it is 01:00 - 01:59 or 13:00 - 13:59 you
must use female pronunciation "1F". The function "say_date_with_format_es" does
not take this in account.

(closes ASTERISK-15016)
Patch-by: Luis Jimenez


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-01 15:22:10 +00:00
Richard Mudgett
4bd9b75724 Remove some redundant locking code in ast_do_masquerade().
Also updated some comments.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-30 23:56:29 +00:00
Gregory Nietsky
842ab32ecc prevent double masqurading channels when one is been hung up and deadlock avoidance is used.
There is a race condition in ast_do_masquerade / ast_hangup (at least)

Reported by me signed off by schmidts with input from David Vossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-30 15:25:16 +00:00
Terry Wilson
659c320f5d Make console colors work for TERM=xterm-256color
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@330107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-28 21:42:41 +00:00
Jonathan Rose
31a1b94622 Fixes some voicemail forwarding behavior based around prepend mode.
Formerly, prepend forwarding would have the user record a message with no useful prompt
and an expectation for the user to push a button on the phone when finished recording.
If a length of silence was detected instead, the recording would be canceled and the user
would re-enter the voicemail forwarding menu. Subsequent time-outs in prepend recording
would also bug out in the sense that they would write over the original message and get
sent to the recipient regardless of whether they timed out or were accepted. This patch
fixes this issue and adds a prompt which will be played after a timeout informing the
user that they needed to press a button. Currently, the sound files that we have are
somewhat inadquate for this, so after the call we simply have Allison say "Please try
again. Then press pound." which actually relies on two separate sound files. Just one
would be more appropriate.

reporter: Vlad Povorozniuc
Review: https://reviewboard.asterisk.org/r/1327/ 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-26 13:25:35 +00:00
Paul Belanger
ba4e50a28a Decrease verbose messages to debug, to help clean up CLI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-25 19:49:40 +00:00
Richard Mudgett
a55804ffda Fix memory leak in an allocation error path of handle_statechange().
* Make use buffer accessor function in handle_statechange() rather than
directly accessing the struct member.

* Make use less redundant loop construct for iterating over hints.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22 21:10:40 +00:00
Richard Mudgett
a97d03e34a Deadlocks dealing with dialplan hints during reload.
There are two remaining different deadlocks reported dealing with dialplan
hints.

The deadlock in ASTERISK-17666 is caused by invalid locking order in
ast_remove_hint().  The hints container must be locked before the hint
object.

The deadlock in ASTERISK-17760 is caused by a catch-22 situation in
handle_statechange().  The deadlock is caused by not having the conlock
before calling the watcher callbacks.  Unfortunately, having that lock
causes a different deadlock as reported in ASTERISK-16961.

* Fixed ast_remove_hint() locking order.

* Made handle_statechange() no longer call the watcher callbacks holding
any locks that matter.

* Made hint ao2 destructor do the watcher callbacks for extension
deactivation to guarantee that they get called.

* Fixed hint reference leak in ast_add_hint() if the callback container
constructor failed.

* Fixed hint reference leak in complete_core_show_hint() for every hint it
found for CLI tab completion.

* Adjusted locking in ast_merge_contexts_and_delete() for safety.

* Added context_merge_lock to prevent ast_merge_contexts_and_delete() and
handle_statechange() from interfering with each other.

* Fixed ast_change_hint() not taking into account that the extension is
used for the hash key.

(closes issue ASTERISK-17666)
Reported by: irroot
Tested by: irroot
JIRA SWP-3318

(closes issue ASTERISK-17760)
Reported by: Byron Clark
Tested by: irroot
JIRA SWP-3393

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-22 15:44:58 +00:00
Richard Mudgett
6d145897bb Dialplan bridge() app mutex 'current_dest_chan' freed more times than we've locked!
This appears to be a leftover from when ast_channel was converted to ao2
objects.

Simply removed the extraneous unlock.

(closes issue ASTERISK-17772)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@329144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-21 16:46:21 +00:00
Kinsey Moore
5905269669 RTP bridge away with inband DTMF and feature detection
When deciding whether Asterisk was allowed to bridge the call away from the
core, chan_sip did not take into account the usage of features on dialed
channels that require monitoring of DTMF on channels utilizing inband DTMF.
This would cause Asterisk to allow the call to be locally or remotely bridged, 
preventing access to the data required to detect activations of such features.

(closes 17237)
Review: https://reviewboard.asterisk.org/r/1302/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-19 17:57:18 +00:00
Mark Murawki
e739fd42fc Fixed invalid read and null pointer deref on asterisk shutdown.
In some cases when starting asterisk with -c and hitting control-c to shutdown, there will be an invalid read and null pointer deref causing a crash.

(closes issue ASTERISK-17927)
Reported by: Mark Murawski
Tested by: Mark Murawski, Kinsey Moore, Tilghman Lesher


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-18 12:06:50 +00:00
Leif Madsen
d4938a111e Introduce <support_level> tags in MODULEINFO.
This change introduces MODULEINFO into many modules in Asterisk in order to show
the community support level for those modules. This is used by changes committed
to menuselect by Russell Bryant recently (r917 in menuselect). More information about
the support level types and what they mean is available on the wiki at
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:13:06 +00:00
Kevin P. Fleming
feb182f802 Correct double-free situation in manager output processing.
The process_output() function calls ast_str_append() and xml_translate() on its
'out' parameter, which is a pointer to an ast_str buffer. If either of these
functions need to reallocate the ast_str so it will have more space, they will
free the existing buffer and allocate a new one, returning the address of the
new one. However, because process_output only receives a pointer to the ast_str,
not a pointer to its caller's variable holding the pointer, if the original
ast_str is freed, the caller will not know, and will continue to use it (and
later attempt to free it).

(reported by jkroon on #asterisk-dev)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 22:53:53 +00:00
Matthew Nicholson
0bc1f651c7 reset our buffer each iteration when doing variable substitution
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 13:53:59 +00:00
Tzafrir Cohen
5bff785fc6 Properly building the Debian armhf (HardFloat) port.
Remove the line that should have been removed in r327411.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 10:56:23 +00:00
Tzafrir Cohen
d004e5839a fix building the Debian armhf (HardFloat) port
Fixes http://buildd.debian-ports.org/status/fetch.php?pkg=asterisk&arch=armhf&ver=1%3A1.8.4.4~dfsg-2&stamp=1309935385
(Missing pthreads)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-11 10:46:34 +00:00
Matthew Nicholson
1fcdb0f58b Reset our ast_str before passing it on to dialplan function backends.
It is possible for a dialplan backend to not modify the given buffer or ast_str
and still return success. This causes any previous value stored in the buffer
to be used as if the new function call provided it. Some functions also append
to the given buffer assuming it is empty.

The test_substitution unit test has also been modified to detect this problem.

(closes issue ASTERISK-17878)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@327106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 19:52:51 +00:00
Richard Mudgett
d3bcf224b0 Some code cleanup in pbx.c
* Mostly comment and format changes.

* ast_context_remove_extension_callerid() and ast_add_extension_nolock()
will write lock the found specific context.

* ast_context_find() will now tolerate a NULL name.

* Eliminated some inlined versions of find_context() and
find_context_locked().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@326985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-08 01:08:05 +00:00
Matthew Jordan
46289ce3a0 Updated filestream destructor to block until move is complete when cache is used
When a cache directory is used, the process is forked and a mv command is executed to move the temporary file to the permanent location.  This caused issues with voicemail, where a race condition occurred when the parent expected the file to be in the permanent location prior to the mv command completing.  The parent process is now blocked until the mv command completes.

(closes issue ASTERISK-17724)
Reported by: Adiren P.
Tested by: mjordan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@326209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-05 13:23:57 +00:00
Matthew Nicholson
0bdbde0690 make framehooks prevent native bridging (for real this time)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@325545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-29 16:18:39 +00:00
Matthew Nicholson
3b216f2dc9 don't do native/remote bridging if a framehook is active on the channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@325537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-29 15:34:47 +00:00
Tilghman Lesher
72d041e1b9 Save and restore errno from within signal handlers.
This is recommended by the POSIX standard, as well as by the sigaction(2) manpage
for various platforms that we support (e.g. Mac OS X).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-27 16:30:50 +00:00
David Vossel
e1adc7cefa Merged revisions 324634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r324634 | dvossel | 2011-06-23 13:18:46 -0500 (Thu, 23 Jun 2011) | 13 lines
  
  Merged revisions 324627 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r324627 | dvossel | 2011-06-23 13:16:52 -0500 (Thu, 23 Jun 2011) | 7 lines
    
    Addresses AST-2011-010, remote crash in IAX2 driver
    
    Thanks to twilson for identifying the issue and providing the patches.
    
    AST-2011-010
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-23 18:23:21 +00:00
Terry Wilson
0ada0bfea3 Stop sending IPv6 link-local scope-ids in SIP messages
The idea behind the patch listed below was used, but in a more targeted manner.
There are now address stringification functions for addresses that are meant to
be sent to a remote party. Link-local scope-ids only make sense on the machine
from which they originate and so are stripped in the new functions.

There is also a host sanitization function added to chan_sip which is used
for when peer and dialog tohost fields or sip_registry hostnames are used to
craft a SIP message.

Also added are some basic unit tests for netsock2 address parsing.

(closes issue ASTERISK-17711)
Reported by: ch_djalel
Patches:
      asterisk-1.8.3.2-ipv6_ll_scope.patch uploaded by ch_djalel (license 1251)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-22 18:52:04 +00:00
David Vossel
87908a3f5d Fixes locking inversion issue in ast_async_goto()
During this function we can not hold the "chan" lock while
doing the masquerade, the explicit goto on the tmp chan, or
the channel alloc.  Instead we need to get the channel lock,
store off information about the channel that we need, and
then let the channel lock go for the remainder of the function.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-21 20:11:52 +00:00
Leif Madsen
557fe8bc24 Add Username and Secret fields to manager Login action.
Pointed out by Vlad Povorozniuc

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-17 18:51:16 +00:00
Leif Madsen
cfec9cdf0d Fix grammar in documentation for Goto() and GotoIf()
(closes issue ASTERISK-18023)
Reported by: Tim Osman

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-17 15:14:54 +00:00
Terry Wilson
c84e7b911e Lock the channel before calling the setoption callback
The channel needs to be locked before calling these callback functions. Also,
sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-16 22:35:41 +00:00
Terry Wilson
c24706ee9e Merged revisions 323733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323733 | twilson | 2011-06-15 13:13:00 -0500 (Wed, 15 Jun 2011) | 16 lines
  
  Merged revisions 323732 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r323732 | twilson | 2011-06-15 13:06:24 -0500 (Wed, 15 Jun 2011) | 9 lines
    
    Fix DYNAMIC_FEATURES
    
    DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes
    sure that dynamic features are also checked when deciding whether or not
    to pass DTMF through or store it for interpreting.
    
    (closes issue ASTERISK-17914)
    Reported by: vrban
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 18:21:52 +00:00
Richard Mudgett
9a19763a38 [regression] Voicemail MWI is no longer sent.
When leaving a voicemail, the MWI message is never sent.  The same thing
happens when checking a voicemail and marking it as read.

If you restart Asterisk, everything comes up at that state correctly, but
changes to the messages in voicemail causes the light to not be set
appropriately.  Very easy to reproduce.

* Made ast_event_check_subscriber() return TRUE if there are ANY
subscribers to an event type when there are no restricting ie values
passed.  This allows an event being queued to be queued.

(closes issue ASTERISK-18002)
Reported by: lmadsen
Tested by: lmadsen, irroot
Patches:
     jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)

(closes issue ASTERISK-18019)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 16:43:18 +00:00
Sean Bright
0701feaa95 Merged revisions 323579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323579 | seanbright | 2011-06-15 11:22:50 -0400 (Wed, 15 Jun 2011) | 32 lines
  
  Merged revisions 323559 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r323559 | seanbright | 2011-06-15 11:15:30 -0400 (Wed, 15 Jun 2011) | 25 lines
    
    Resolve a segfault/bus error when we try to map memory that falls on a page
    boundary.
    
    The fix for ASTERISK-15359 was incorrect in that it added 1 to the length of the
    mmap'd region.  The problem with this is that reading/writing to that extra byte
    outside of the bounds of the underlying fd causes a bus error.
    
    The real issue is that we are working with both a FILE * and the raw fd
    underneath it and not synchronizing between them.  The code that was removed in
    ASTERISK-15359 was correct, but we weren't flushing the FILE * before mapping
    the fd.
    
    Looking at the manager code in 1.4 reveals that the FILE * in 'struct
    mansession' is never used except to create a temporary file that we immediately
    fdopen.  This means we just need to write a 0 byte to the fd and everything will
    just work.  The other branches require a call to fflush() which, while not a
    guaranteed fix, should reduce the likelihood of a crash.
    
    This all makes sense in my head.
    
    (closes issue ASTERISK-16460)
    Reported by: Ravelomanantsoa Hoby (hoby)
    Patches:
    		issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license #5060)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 15:31:53 +00:00
Richard Mudgett
ba678e9c1b Add missing break in ast_event_get_cached().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-15 00:50:20 +00:00
Richard Mudgett
0fe02d0183 Made ast_sockaddr_split_hostport() port warning msgs more meaningful.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 17:21:39 +00:00
Richard Mudgett
2b2aa6ba3e Add more strict hostname checking to ast_dnsmgr_lookup().
Change suggested in review.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 17:21:24 +00:00
Terry Wilson
ee2920afba Add rtpkeepalives back to 1.8
The RTP-engine conversion left out support for handling rtpkeepalives.
This patch adds them back.

(closes issue ASTERISK-17304)
Reported by: lmadsen

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-14 16:33:55 +00:00
Leif Madsen
a3c4818a51 Avoid dividing by zero with L() option to Dial()
Reported by: nicolasom
Patches:
    
issue-17995.patch - nicolasom (License #5994)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-13 19:51:52 +00:00
Terry Wilson
12cab256cc Avoid a DB1 infinite loop bug
Explicity check the last entry in the DB and make sure that we don't iterate
past it. Since there can be no duplicates, this just makes sure that we stop
after matching the last key.

This patch also refactors the code to get away from some code duplication. A
previous patch added many astdb tests and this patch passed them.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-10 15:29:00 +00:00
Richard Mudgett
aec1979e7f Remove potential deadlock in call pickup race.
Deadlock is possible in ast_do_pickup() when holding the target channel
lock and trying to get the chan channel lock.  Also, holding the target
lock when calling ast_channel_masquerade() is not a good idea because that
routine does deadlock avoidance.

* Removed the need to hold the target lock after marking the target with a
datastore and getting the connected line data off of the target channel.

* Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
pickup methods use the same basic call pickup availability check.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 16:31:53 +00:00
Jonathan Rose
5f46b994f4 Adds ast_escape_encoded utility to properly handle escaping of quoted field before uri.
This commit backports a feature in trunk affecting initreqprep so that display name won't
be encoded improperly. Also includes unit tests for the ast_escape_quoted function.
This patch gives 1.8 a much improved outlook in countries which don't use standard
ASCII characters.

(closes issue ASTERISK-16949)
Reported by: Örn Arnarson
Review: https://reviewboard.asterisk.org/r/1235/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-09 14:06:42 +00:00
Richard Mudgett
6b2172bea3 SRV lookup attempted for SIP peers listed as an IP address.
Asterisk attempts to SRV lookup a host name even if the host name is an IP
address.  Regression introduced when IPv6 support was added.

* Restored the check in ast_dnsmgr_lookup() to see if the given host name
is an IP address.  The IP address could be in either IPv4 or IPv6 formats.

(closes issue ASTERISK-17815)
Reported by: Byron Clark
Tested by: Byron Clark, Richard Mudgett
Patches:
     issue19248_v1.8.patch - uploaded by Richard Mudgett (License #5621)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-08 18:46:30 +00:00
Jonathan Rose
c728c8d56b Fixes level toggling for logger set levels since it was reversed
(closes issue ASTERISK-17850)
Reported by: Luke H
Tested by: jrose, Luke H
  
Review: https://reviewboard.asterisk.org/r/1244/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-06 19:07:56 +00:00
Richard Mudgett
549f79b9f3 Be more explicit for CCSS generic device state event subscription.
Make CCSS generic device state event subscription specify the
AST_EVENT_IE_STATE ie exists to be safe.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 21:49:17 +00:00
Richard Mudgett
779a74b358 Event subscription fixes.
Must commit the subscription fixes together with the integration
subscription tests.  The subscription fixes cause an erroneously passing
test to fail.  The new subscription tests detect errors without the
subscription fixes.

* Added missing event_names[] table entry.

* Reworked ast_event_check_subscriber()/match_sub_ie_val_to_event() to
correctly detect if a subscriber exists for the proposed event.

* Made match_ie_val() and match_sub_ie_val_to_event() check the buffer
length for RAW payload types.

* Fixed error handling memory leak in ast_event_sub_activate(),
ast_event_unsubscribe(), and ast_event_queue().

* Made ast_event_new() and ast_event_check_subscriber() better protect
themselves from an invalid payload type.

* Added container lock protection between removing old cache events and
adding the new cached event in
ast_event_queue_and_cache()/event_update_cache().

* Added new event subscription tests.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 20:58:13 +00:00
Richard Mudgett
a32c86fb71 Constify subscription description parameter string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-03 19:56:09 +00:00
Richard Mudgett
12fa6d28e0 CDR comment tweaks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-01 23:11:55 +00:00
Richard Mudgett
8e6b43e331 Crash when using hagi and no servers are available.
When none of the servers returned by the SRV querey respond, asterisk
crashes.  The problem is that if the loop over all the SRV entries
finishes then the srv_context has already been cleaned up.

* Make ast_srv_cleanup() check to see if the context is already cleaned
up.

(closes issue #19256)
Reported by: byronclark


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 23:45:41 +00:00
Leif Madsen
9718442188 Fix issue with playback of H.261 video.
(closes issue #19379)
Reported by: neutrino88
Patches:
      videoprompt.patch uploaded by neutrino88 (license 297)
(changes by russell)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 21:54:54 +00:00
Leif Madsen
96d69b7aa8 Allow parking lot hints and musicclass to be set.
(closes issue #19378)
Reported by: sboily_proformatique
Patches:
      pf_parkinghint_music_fix uploaded by sboily proformatique (license 206)
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 21:40:23 +00:00
Alec L Davis
fd24de3306 Fix *8 directed pickup locks system during pickupsound play out
move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
This stop the clash of 2 threads trying to write audio to same channel.
In addition fixes choppy audio beep in issue 19177.
 
 (issue #18654)
 (issue #19177)
 Reported by: Docent
 Patches: 
      review1232-1.88888888 alecdavis (license 585)
 Tested by: alecdavis
 
Review: https://reviewboard.asterisk.org/r/1232/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-27 08:31:15 +00:00