]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoDelay signalling progress until a PRI channel really signals progress.
Tilghman Lesher [Thu, 19 Mar 2009 19:15:33 +0000 (19:15 +0000)] 
Delay signalling progress until a PRI channel really signals progress.
(closes issue #13034)
 Reported by: klaus3000
 Patches:
       20090316__bug13034.diff.txt uploaded by tilghman (license 14)
       patch_trunk_183progress_klaus3000.txt uploaded by klaus3000 (license 65)
 Tested by: klaus3000

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183319 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoExport some more required symbols.
Jason Parker [Thu, 19 Mar 2009 18:28:16 +0000 (18:28 +0000)] 
Export some more required symbols.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183291 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoRemove the use of RTLD_NOLOAD, as it is not behaving like expected.
Russell Bryant [Thu, 19 Mar 2009 17:52:52 +0000 (17:52 +0000)] 
Remove the use of RTLD_NOLOAD, as it is not behaving like expected.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183241 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow the AES API to work.
Russell Bryant [Thu, 19 Mar 2009 17:41:39 +0000 (17:41 +0000)] 
Allow the AES API to work.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAdd missing semicolon in exports script.
Russell Bryant [Thu, 19 Mar 2009 16:21:56 +0000 (16:21 +0000)] 
Add missing semicolon in exports script.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow disconnect feature before a call is bridged
David Vossel [Thu, 19 Mar 2009 16:15:16 +0000 (16:15 +0000)] 
Allow disconnect feature before a call is bridged

feature.conf has a disconnect option.  By default this option is set to '*', but it could be anything.  If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else.  This is because features are unavailable until bridging takes place.  The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different.  This patch allows features to be detected from outside of the bridge, but not operated on.  In this case, the disconnect feature can be detected before briding and handled outside of features.c.

(closes issue #11583)
Reported by: sobomax
Patches:
patch-apps__app_dial.c uploaded by sobomax (license 359)
11583.latest-patch uploaded by murf (license 17)
detect_disconnect.diff uploaded by dvossel (license 671)
Tested by: sobomax, dvossel
Review: http://reviewboard.digium.com/r/195/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183126 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow the CallerID API to work again.
Russell Bryant [Thu, 19 Mar 2009 16:13:18 +0000 (16:13 +0000)] 
Allow the CallerID API to work again.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183123 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix an issue where cancelled outgoing SIP calls would erroneously report the device...
Mark Michelson [Thu, 19 Mar 2009 16:04:02 +0000 (16:04 +0000)] 
Fix an issue where cancelled outgoing SIP calls would erroneously report the device as "in use."

A user was having an issue where if an outgoing SIP call was canceled, the SIP device
would remain in use if we had not received any response to the initial INVITE we sent out.
The SIP device would remain in use until the autocongestion timer was exhausted.

I tracked down the cause of this to be the section of code I am removing here. I asked several
people what the purpose of this code was meant to be, but no one could give me any sort of
answer as to why this was here. The person who was having this issue has been using this patch
for several months and it has stopped the problems they have had.

AST-196

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@183115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agofix typo which broke configure
Jeff Peeler [Wed, 18 Mar 2009 20:02:40 +0000 (20:02 +0000)] 
fix typo which broke configure

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182965 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow H.323 Plus library to be used in addition to the OpenH323 library
Jeff Peeler [Wed, 18 Mar 2009 19:57:05 +0000 (19:57 +0000)] 
Allow H.323 Plus library to be used in addition to the OpenH323 library

Chan_h323 can now be compiled against both the previously supported versions of
OpenH323 as well as the current H.323 Plus (version 1.20.2). The configure
script has been modified to look in the default install location of h323 to
hopefully help avoid using the environment variables OPENH323DIR and PWLIBDIR.
Also, the CLI command "h323 show version" has been added which indicates which
version of h323 is in use.

(closes issue 0011261)
Reported by: vhatz
Patches:
      asterisk-1.6.0.6-h323plus.patch uploaded by jthurman (license 614)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182963 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agofix another symbol namespace issue (reported by Andrew on asterisk-dev)
Kevin P. Fleming [Wed, 18 Mar 2009 11:31:41 +0000 (11:31 +0000)] 
fix another symbol namespace issue (reported by Andrew on asterisk-dev)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182882 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix cases where the internal poll() was not being used when it needed to be.
Russell Bryant [Wed, 18 Mar 2009 02:09:13 +0000 (02:09 +0000)] 
Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on
Mac OSX.  If you search around, you'll find a number of references to using
select() instead of poll() to work around these issues.  In Asterisk, we've
had poll.c which implements poll() using select() internally.  However, we
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even
though we were compiling in poll.o, the system poll() was still being used.
So, the primary purpose of this patch is to ensure that we're using the
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.
   Instead, put it in the configure script.  The logic in the configure
   script is the same as it was in the Makefile.  Ideally, we would have
   a functionality test for the problem, but that's not actually possible,
   since we would have to be able to run an application on the _target_
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel
   that it is good practice to give the API call a new name when we are
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine
(if they worked fine before).  So, for example, out of tree modules that are
using poll() will not stop working or anything.  However, for modules to work
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182810 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoImprove the build system to *properly* remove unnecessary symbols from the runtime...
Kevin P. Fleming [Wed, 18 Mar 2009 01:55:22 +0000 (01:55 +0000)] 
Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.

With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agorevert commit that included extranous changes
Kevin P. Fleming [Wed, 18 Mar 2009 01:51:21 +0000 (01:51 +0000)] 
revert commit that included extranous changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoremove accidentally merged properties
Kevin P. Fleming [Wed, 18 Mar 2009 01:32:18 +0000 (01:32 +0000)] 
remove accidentally merged properties

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182803 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoImprove the build system to *properly* remove unnecessary symbols from the runtime...
Kevin P. Fleming [Wed, 18 Mar 2009 01:28:42 +0000 (01:28 +0000)] 
Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.

With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182802 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow dahdichanname to work as advertised.
Jason Parker [Tue, 17 Mar 2009 20:13:40 +0000 (20:13 +0000)] 
Allow dahdichanname to work as advertised.

(closes issue #14056)
Reported by: dsedivec
Patches:
      load_from_zapata_conf.patch uploaded by dsedivec (license 638)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182652 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix race in astdb
Tilghman Lesher [Tue, 17 Mar 2009 05:50:52 +0000 (05:50 +0000)] 
Fix race in astdb
The underlying db1 implementation does not fully isolate the pages retrieved
from astdb, so the lock protecting accesses needs to be extended until the
copy from the shared memory structure is done.
(closes issue #14682)
 Reported by: makoto

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoRandomize IAX2 encryption padding
David Vossel [Mon, 16 Mar 2009 17:47:42 +0000 (17:47 +0000)] 
Randomize IAX2 encryption padding

The 16-32 byte random padding at the beginning of an encrypted IAX2 frame turns out to not be all that random at all.  This patch calls ast_random to fill the padding buffer with random data.  The padding is randomized at the beginning of every encrypted call and for every encrypted retransmit frame.

Review: http://reviewboard.digium.com/r/193/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182281 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFixup glare detection, to fix a memory leak of a local pvt structure.
Tilghman Lesher [Mon, 16 Mar 2009 15:39:15 +0000 (15:39 +0000)] 
Fixup glare detection, to fix a memory leak of a local pvt structure.
(closes issue #14656)
 Reported by: caspy
 Patches:
       20090313__bug14656__2.diff.txt uploaded by tilghman (license 14)
 Tested by: caspy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@182208 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoCheck the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF.
Mark Michelson [Fri, 13 Mar 2009 17:12:32 +0000 (17:12 +0000)] 
Check the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF.

Dynamic features defined in the applicationmap section of features.conf allow
one to specify whether the caller, callee, or both have the ability to use the
feature. The documentation in the features.conf.sample file could be interpreted
to mean that one only needs to set the DYNAMIC_FEATURES channel variable on the
calling channel in order to allow for the callee to be able to use the features
which he should have permission to use. However, the DYNAMIC_FEATURES variable
would only be read from the channel of the participant that pressed the DTMF
sequence to activate the feature. The result of this was that the callee was
unable to use dynamic features unless the dialplan writer had taken measures
to be sure that the DYNAMIC_FEATURES variable was set on the callee's channel.

This commit changes the behavior of ast_feature_interpret to concatenate the
values of DYNAMIC_FEATURES from both parties involved in the bridge. The features
themselves determine who has permission to use them, so there is no reason to believe
that one side of the bridge could gain the ability to perform an action that they
should not have the ability to perform.

Kevin Fleming pointed out on the asterisk-users list that the typical way that this
was worked around in the past was by setting _DYNAMIC_FEATURES on the calling channel
so that the value would be inherited by the called channel. While this works, the
documentation alone is not enough to figure out why this is necessary for the callee
to be able to use dynamic features. In this particular case, changing the code to match
the documentation is safe, easy, and will generally make things easier for people for
future installations.

This bug was originally reported on the asterisk-users list by David Ruggles.

(closes issue #14657)
Reported by: mmichelson
Patches:
      14657.patch uploaded by mmichelson (license 60)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoUse the correct branch integrated property when generating the version string.
Richard Mudgett [Fri, 13 Mar 2009 01:19:29 +0000 (01:19 +0000)] 
Use the correct branch integrated property when generating the version string.

Copied the make_version file from Asterisk trunk.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoProperly send a 487 on an INVITE we have not responded to if we receive a BYE.
Mark Michelson [Thu, 12 Mar 2009 18:29:48 +0000 (18:29 +0000)] 
Properly send a 487 on an INVITE we have not responded to if we receive a BYE.

If we receive an INVITE from an endpoint and then later receive a BYE from that
same endpoint before we have sent a final response for the INVITE, then we need
to respond to the INVITE with a 487.

There was logic in the code prior to this commit which seemed to exist solely to
handle this situation, but there was one condition in an if statement which
was incorrect. The only way we would send a 487 was if the sip_pvt had no owner
channel. This made no sense since we created the owner channel when we received
the INVITE, meaning that the majority of the time we would never send the 487.
The 487 being sent should not rely on whether we have created a channel. Its
delivery should be dependent on the current state of the initial INVITE transaction.
With this commit, that logic is now correctly in place.

(closes issue #14149)
Reported by: legranjl
Patches:
      14149.patch uploaded by mmichelson (license 60)
Tested by: legranjl

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix incorrect usage of strncasecmp... I really meant to use strcasecmp.
Joshua Colp [Thu, 12 Mar 2009 16:56:20 +0000 (16:56 +0000)] 
Fix incorrect usage of strncasecmp... I really meant to use strcasecmp.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181664 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix logic flaw in previous commit.
Joshua Colp [Thu, 12 Mar 2009 16:52:45 +0000 (16:52 +0000)] 
Fix logic flaw in previous commit.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181660 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix another scenario where depending on configuration the stream would not get read.
Joshua Colp [Thu, 12 Mar 2009 16:50:37 +0000 (16:50 +0000)] 
Fix another scenario where depending on configuration the stream would not get read.

For custom commands we don't know whether the audio is coming from a stream or not
so we are going to have to read the data despite no channels.

(closes issue #14416)
Reported by: caspy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181659 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix issue with streaming MOH failing if nobody is listening.
Joshua Colp [Thu, 12 Mar 2009 16:29:19 +0000 (16:29 +0000)] 
Fix issue with streaming MOH failing if nobody is listening.

When a music class is setup to actually provide music on hold
from a stream we need to constantly read audio from it since it
will constantly be providing audio. This is now done despite there
being no channels listening to it.

(closes issue #14416)
Reported by: caspy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181655 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAllow prefix to set localstatedir (when used and different from the default).
Jason Parker [Wed, 11 Mar 2009 22:18:42 +0000 (22:18 +0000)] 
Allow prefix to set localstatedir (when used and different from the default).

This is similar to the /etc change that was made for the non-FreeBSD case.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181436 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake code that updates BRIDGEPEER variable thread-safe.
Russell Bryant [Wed, 11 Mar 2009 21:42:58 +0000 (21:42 +0000)] 
Make code that updates BRIDGEPEER variable thread-safe.

It is not safe to read the name field of an ast_channel without the channel
locked.  This patch fixes some places in channel.c where this was being done,
and lead to crashes related to masquerades.

(closes issue #14623)
Reported by: guillecabeza

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181423 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoencrypted IAX2 during packet loss causes decryption to fail on retransmitted frames
David Vossel [Wed, 11 Mar 2009 17:25:31 +0000 (17:25 +0000)] 
encrypted IAX2 during packet loss causes decryption to fail on retransmitted frames

If an iax channel is encrypted, and a retransmit frame is sent, that packet's iseqno is updated while it is encrypted.  This causes the entire frame to be corrupted.  When the corrupted frame is sent, the other side decrypts it and sends a VNAK back because the decrypted frame doesn't make any sense.  When we get the VNAK, we look through the sent queue and send the same corrupted frame causing a loop.  To fix this, encrypted frames requiring retransmission are decrypted, updated, then re-encrypted.  Since key-rotation may change the key held by the pvt struct, the keys used for encryption/decryption are held within the iax_frame to guarantee they remain correct.

(closes issue #14607)
Reported by: stevenla
Tested by: dvossel

Review: http://reviewboard.digium.com/r/192/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181340 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix issue where an attended transfer could not be completed under a rare scenario.
Joshua Colp [Wed, 11 Mar 2009 17:22:52 +0000 (17:22 +0000)] 
Fix issue where an attended transfer could not be completed under a rare scenario.

When completing an attended transfer chan_sip does a check to make sure the extension
in the URI portion of the Refer-To header is a local valid extension. We don't actually
need to check this since we know for sure the other channel is already up and talking to
the extension. Some devices do not put the extension in the Refer-To header either, which
can cause the extension check to fail. We now no longer do this check if it is an attended
transfer.

(closes issue #14628)
Reported by: sverre
Patches:
      14628.diff uploaded by file (license 11)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181328 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix a problem with inband DTMF detection on outgoing SIP calls when dtmfmode=auto.
Joshua Colp [Wed, 11 Mar 2009 16:36:50 +0000 (16:36 +0000)] 
Fix a problem with inband DTMF detection on outgoing SIP calls when dtmfmode=auto.

When dtmfmode was set to auto the inband DTMF detector was not setup
on outgoing SIP calls. This caused inband DTMF detection to fail.
The inband DTMF detector is now setup for both dtmfmode inband and auto.

(closes issue #13713)
Reported by: makoto

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181295 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix malloc debug macros to work properly with h323.
Jeff Peeler [Wed, 11 Mar 2009 03:25:04 +0000 (03:25 +0000)] 
Fix malloc debug macros to work properly with h323.

The main problem here was that cstdlib was undefining free thereby causing the
proper debug macros to not be used. ast_h323.cxx has been changed to call
ast_free instead to avoid the issue. Because using the ast prefix calls are
a better choice, ast_free_ptr is the new wrapper for free to pass to functions.
Also, a little bit of clean up was done to avoid the debug macros intentionally
being redefined.

(closes issue #13593)
Reported by: pj

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181133 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoRemove unused variables.
Mark Michelson [Wed, 11 Mar 2009 00:32:40 +0000 (00:32 +0000)] 
Remove unused variables.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181031 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix incorrect tag checking on transfers when pedantic=yes is enabled.
Mark Michelson [Wed, 11 Mar 2009 00:30:26 +0000 (00:30 +0000)] 
Fix incorrect tag checking on transfers when pedantic=yes is enabled.

(closes issue #14611)
Reported by: klaus3000
Patches:
      patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@181029 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake things happier when using autoconf 2.62+
Jason Parker [Tue, 10 Mar 2009 22:02:18 +0000 (22:02 +0000)] 
Make things happier when using autoconf 2.62+

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180941 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake compilation succeed in dev-mode when IMAP storage is enabled.
Mark Michelson [Fri, 6 Mar 2009 18:23:09 +0000 (18:23 +0000)] 
Make compilation succeed in dev-mode when IMAP storage is enabled.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180567 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix handling of backreferences for ENUM lookups
David Vossel [Fri, 6 Mar 2009 17:19:55 +0000 (17:19 +0000)] 
Fix handling of backreferences for ENUM lookups

enum.c did not handle regex backtraces correctly.  The '\1' in the regex is a backreference that requires a pattern match to be inserted.  The way the code used to work is that it would find the backreference and insert the entire input string minus the '+'.  This is incorrect.  The regexec() function takes in a variable called pmatch which is an array of structs containing the start and end indexes for each backreference substring.  The original code actually passed the pmatch array pointer into regexec but never did anything with it.  Now when a backtrace is found, the backtrace number is looked up in the pmatch array and the correct substring is inserted.

(closes issue #14576)
Reported by: chris-mac
Review: http://reviewboard.digium.com/r/187/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180532 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years ago[IMAP] Fix message retrieval issues when identical mailbox names were defined in...
Mark Michelson [Thu, 5 Mar 2009 23:26:11 +0000 (23:26 +0000)] 
[IMAP] Fix message retrieval issues when identical mailbox names were defined in separate contexts.

There was a fix put in a while back so that an X-Asterisk-VM-Context message header was
added to stored IMAP voicemails. This would allow for us to differentiate if the same
mailbox name was used in multiple contexts. The problem still left was that not all places
where messages were retrieved actually attempted to use this header for information when
retrieving messages. This commit fixes that so that MWI and message retrieval from VoiceMailMain
work as expected.

(closes issue #13853)
Reported by: vicks1
Patches:
      13853_v2.patch uploaded by mmichelson (license 60)
Tested by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180464 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix broken mailbox parsing when searchcontexts option is enabled.
Mark Michelson [Thu, 5 Mar 2009 18:58:48 +0000 (18:58 +0000)] 
Fix broken mailbox parsing when searchcontexts option is enabled.

When using the searchcontexts option in voicemail.conf, the code
made the assumption that all mailbox names defined were unique across
all contexts. However, the code did nothing to actually enforce this
assumption, nor did it do anything to alert a user that he may have
created an ambiguity in his voicemail.conf file by defining the same
mailbox name in multiple contexts.

With this change, we now will issue a nice long warning if searchcontexts
is on and we encounter the same mailbox name in multiple contexts and ignore
any duplicates after the first box. Whether searchcontexts is enabled or not,
if we come across a duplicate mailbox in the same context, then we will issue
a warning and ignore the duplicated mailbox. I have also added a small note
to voicemail.conf.sample in the explanation for searchcontexts explaining
that you cannot define the same mailbox in multiple contexts if you have
enabled the option.

(closes issue #14599)
Reported by: lmadsen
Patches:
      14599.patch uploaded by mmichelson (license 60) (with slight modification)
Tested by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180380 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix problems when RTP packet frame size is changed
Kevin P. Fleming [Thu, 5 Mar 2009 18:22:16 +0000 (18:22 +0000)] 
Fix problems when RTP packet frame size is changed

During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good.

This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes.

Review: http://reviewboard.digium.com/r/184/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180372 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoLook for the number in a callerid string starting from the end. This way a value...
Joshua Colp [Wed, 4 Mar 2009 19:22:50 +0000 (19:22 +0000)] 
Look for the number in a callerid string starting from the end. This way a value using <> can exist in the name portion.

(issue #AST-194)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180194 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake sure we still support zapchan in users.conf, in addition to dahdichan.
Jason Parker [Tue, 3 Mar 2009 23:01:06 +0000 (23:01 +0000)] 
Make sure we still support zapchan in users.conf, in addition to dahdichan.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180010 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoClarify some documentation of queues.conf.sample
Mark Michelson [Tue, 3 Mar 2009 22:48:18 +0000 (22:48 +0000)] 
Clarify some documentation of queues.conf.sample

It had always been possible to explicitly specify a "blank"
value for a sound file in queues.conf and have no sound played
back. The problem with this is that it would result in some ugly
CLI warnings from file.c.

This commit introduces a check when playing a file in app_queue
to see if the name of the file is zero-length and return early if
that is the case. Also, the ability to specify the blank sound
files in queues.conf is now mentioned more clearly in queues.conf.sample

(closes issue #14227)
Reported by: caspy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@180006 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDo not assume that the bridge_cdr is still attached to the channel when the 'h' exten...
Joshua Colp [Tue, 3 Mar 2009 18:27:09 +0000 (18:27 +0000)] 
Do not assume that the bridge_cdr is still attached to the channel when the 'h' exten is finished executing.

It is possible for a masquerade operation to occur when the 'h' exten is operating. This operation moves
the CDR records around causing the bridge_cdr to no longer exist on the channel where it is expected to.
We can not safely modify it afterwards because of this, so don't even try.

(closes issue #14564)
Reported by: meric

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179840 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThese changes allow AEL to better check ${} constructs within $[...], that are concat...
Steve Murphy [Tue, 3 Mar 2009 18:11:34 +0000 (18:11 +0000)] 
These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text.

I modified and added rules in ast_expr2.fl to better handle
the concatenations.

I added some default routines to ast_expr2.y so the standalone would
compile. It also looks like I haven't run this thru bison since 2.1, so
it's good to get this updated.

The Makefile has comments added now for check_expr2 and check_expr to
explain what they are for, and how to run them.

The testexpr2s stuff has been removed, in favor of check_expr2.

expr2.testinput has been updated to include the two expressions
that inspired these changes (from mcnobody on #asterisk this morning)
The regression has been run and all looks well.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoEnsure chan->fdno always gets reset to -1 after handling a channel fd event.
Russell Bryant [Tue, 3 Mar 2009 16:45:46 +0000 (16:45 +0000)] 
Ensure chan->fdno always gets reset to -1 after handling a channel fd event.

Since setting fdno to -1 had to be moved, a couple of other code paths that
do process an fd event return early and do not pass through the code path
where it was moved to.  So, set it to -1 in a few other places, too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179741 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMove where fdno is set to the default value to *after* the read callback of the chann...
Joshua Colp [Tue, 3 Mar 2009 14:38:09 +0000 (14:38 +0000)] 
Move where fdno is set to the default value to *after* the read callback of the channel driver is called.
We have to do this as the underlying channel driver may need the fdno value to determine what to read.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179671 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake it easier to detect an improper call to ast_read().
Russell Bryant [Tue, 3 Mar 2009 13:53:52 +0000 (13:53 +0000)] 
Make it easier to detect an improper call to ast_read().

When you call ast_waitfor() on a channel, the index into the channel fds array
that holds the file descriptor that poll() determines has input available is
stored in fdno.  This patch clears out this value after a call to ast_read()
and also reports errors if ast_read() is called without an fdno set.

From a discussion on the asterisk-dev list.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179608 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix bridging regression from commit 176701
Jeff Peeler [Mon, 2 Mar 2009 23:54:39 +0000 (23:54 +0000)] 
Fix bridging regression from commit 176701

This fixes a bad regression where the bridge would exit after an attended
transfer was made. The problem was due to nexteventts getting set after the
masquerade which caused the bridge to return AST_BRIDGE_COMPLETE.

(closes issue #14315)
Reported by: tim_ringenbach

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179536 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMove ast_waitfor() down to avoid the results of the API call becoming stale.
Russell Bryant [Mon, 2 Mar 2009 23:34:13 +0000 (23:34 +0000)] 
Move ast_waitfor() down to avoid the results of the API call becoming stale.

This call to ast_waitfor() was being done way too soon in this section of code.
Specifically, there was code in between the call to waitfor and the code that
uses the result that puts the channel in autoservice.  By putting the channel
in autoservice, the previous results of ast_waitfor() become meaningless,
as the autoservice thread will do it's own ast_waitfor() and ast_read()
on the channel.

So, when we came back out of autoservice and eventually hit the block of code
that calls ast_read() on the channel, there may not actually be any input on
the channel available.  Even though the previous call to ast_waitfor() in
app_meetme said there was input, the autoservice thread has since serviced
the channel for some period of time.

This bug manifested itself while dvossel was doing some testing of MeetMe in
Asterisk trunk.  He was using the timerfd timing module.  When the code hit
ast_read() erroneously, it determined that it must have been called because of
input on the timer fd, as chan->fdno was set to AST_TIMING_FD, since that was
the cause of the last legitimate call to ast_read() done by autoservice.

In this test, an IAX2 channel was calling into the MeetMe conference.  It was
_much_ more likely to be seen with an IAX2 channel because of the way audio
is handled.  Every audio frame that comes in results in a call to
ast_queue_frame(), which then uses ast_timer_enable_continuous() to notify
the channel thread that a frame is waiting to be handled.  So, the chances
of ast_waitfor() indicating that a channel needs servicing due to a timer
event on an IAX2 event is very high.

Finally, it is interesting to note that if a different timing interface was
being used, this bug would probably not be noticed.  When ast_read() is called
and erroneously thinks that there is a timer event to handle, it calls the
ast_timer_ack() function.  The pthread and dahdi timing modules handle the
ack() function being called when there is no event by simply ignoring it.
In the case of the timerfd module, it results in a read() on the timer fd
that will block forever, as there is no data to read.  This caused Asterisk
to lock up very quickly.

Thanks to dvossel and mmichelson for the fun debugging session.  :-)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179532 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoWhen ending a recording with silence detection, remember to reduce the duration.
Tilghman Lesher [Mon, 2 Mar 2009 23:09:01 +0000 (23:09 +0000)] 
When ending a recording with silence detection, remember to reduce the duration.
The end of the recording is correspondingly trimmed, but the duration was not
trimmed by the number of seconds trimmed, so the saved duration was necessarily
longer than the actual soundfile duration.
(closes issue #14406)
 Reported by: sasargen
 Patches:
       20090226__bug14406.diff.txt uploaded by tilghman (license 14)
 Tested by: sasargen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179468 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoEnsure that only one thread is calling ast_settimeout() on a channel at a time.
Russell Bryant [Mon, 2 Mar 2009 22:58:18 +0000 (22:58 +0000)] 
Ensure that only one thread is calling ast_settimeout() on a channel at a time.

For example, with an IAX2 channel, you can have both the channel thread and the
chan_iax2 processing threads calling this function, and doing so twice at the
same time is a bad thing.

(Found in a debugging session with dvossel and mmichelson)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179461 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoRemove several silly warnings in editline. One about a broken preprocessor directive...
Jason Parker [Mon, 2 Mar 2009 20:14:57 +0000 (20:14 +0000)] 
Remove several silly warnings in editline.  One about a broken preprocessor directive, and another about strlcpy/strlcat.

(closes issue #14264)
Reported by: dimas

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179395 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoUpdate documentation for DIALEDTIME and ANSWEREDTIME variables.
Jason Parker [Fri, 27 Feb 2009 19:03:56 +0000 (19:03 +0000)] 
Update documentation for DIALEDTIME and ANSWEREDTIME variables.

(closes issue #14566)
Reported by: klaus3000
Patches:
      ANSWEREDTIME-1.4-patch.txt uploaded by klaus3000 (license 65)
      ANSWEREDTIME-trunk-patch.txt uploaded by klaus3000 (license 65)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@179056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis change moves the default feature digit timeout to 1000 ms from the previous...
Steve Murphy [Thu, 26 Feb 2009 21:27:32 +0000 (21:27 +0000)] 
This change moves the default feature digit timeout to 1000 ms from the previous default of 500.

As per bug 14515, a dev discussion arrived at a "mediated concensus"
of a default feature digit timeout of 1.0 sec. Some voted for 1300;
ctooley thought 1500 for distracted phone users in phone booths;
kpfleming put his foot down at 1.0 sec.

Users who found the previous default max delay of 250 msec perfect,
are welcome to override the new default. Notice that I said that
250 msec was the default; wait a minute, you might say, the config
file said it was 500 msec!; well, because of the bug fix for 14515,
we found that 500 msec was actually enforcing a max of 250. The bug
fix would restore 500 msec, but we felt even that was a bit tight
for most users... 2000 msec was pushed earlier by mmichelson, so
that reduces to 1000 msec after the bug fix. Enjoy!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178956 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoIAX2 prune realtime fix
David Vossel [Thu, 26 Feb 2009 17:24:02 +0000 (17:24 +0000)] 
IAX2 prune realtime fix

Now prune_users() and prune_peers() are called instead of reload_config() to prune all users/peers that are realtime.  These functions remove all users/peers with the rtfriend and delme flags set. iax2_prune_realtime() also lacked the code to properly delete a single friend.  For example. if iax2 prune realtime <friend> was called, only the peer instance would be removed. The user would still remain.

(closes issue #14479)
Reported by: mousepad99
Review: http://reviewboard.digium.com/r/176/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178838 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis patch prevents the feature detection timeout from being cut in half.
Steve Murphy [Thu, 26 Feb 2009 17:09:03 +0000 (17:09 +0000)] 
This patch prevents the feature detection timeout from being cut in half.

Because the ast_channel_bridge() call will return 0 and pass
a frame pointer for both DTMF_BEGIN and DTMF_END, the feature_timer
field in hte config struct is getting decremented twice, which
effectively cuts the digittimeout in half. I added conditions
to the if statement to only let DTMF_END frames to flow thru,
which solved the problem. Also, when the frame pointer is null,
let control flow thru-- this usually happens on timeouts. I added
a comment to the code to explain what's going on and why.

Many thanks to sodom for reporting this problem. Personnally, it always seemed
like something was wrong with the featuredigittimeout, but I never
could quite decide what... and was too busy to investigate.
This bug forced the issue, and now we know.

Sodom had other issues in 14515, but I couldn't reproduce them. If
he still has problems, and wants to get them solved, he is welcome
to reopen 14515.

(closes issue #14515)
Reported by: sodom
Patches:
      14515.patch uploaded by murf (license 17)
Tested by: murf, sodom

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178804 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis patch completes the fixes nec. to make 1.4 asterisk dialplan expressions ($...
Steve Murphy [Wed, 25 Feb 2009 21:00:50 +0000 (21:00 +0000)] 
This patch completes the fixes nec. to make 1.4 asterisk dialplan expressions ($[...]) 8-bit transparent

While I was updating ast_expr2.fl, I missed one rule that would allow 8-bit chars to be caught
in tokens; and in so doing, it absorbs the ${ sequence and messes up the
checking of raw exprs by AEL.

Trunk already has these changes.

(closes issue #14543)
Reported by: klaus3000
Patches:
      patch.14543 uploaded by murf (license 17)
Tested by: murf

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178640 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoUpdate the copyright year for the main page of the doxygen documentation.
Russell Bryant [Wed, 25 Feb 2009 12:43:36 +0000 (12:43 +0000)] 
Update the copyright year for the main page of the doxygen documentation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAdd section about the #exec command in configuration files.
Tilghman Lesher [Tue, 24 Feb 2009 23:25:24 +0000 (23:25 +0000)] 
Add section about the #exec command in configuration files.
(closes issue #14540)
 Reported by: jtodd
 Patch by: jtodd, with additional notes by tilghman (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178445 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoOnly set dtmfcount on BEGIN, and ensure it gets reset to 0 properly.
Russell Bryant [Tue, 24 Feb 2009 20:36:19 +0000 (20:36 +0000)] 
Only set dtmfcount on BEGIN, and ensure it gets reset to 0 properly.

(issue #14460)
Reported by: moliveras
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178373 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoChange include order to make compile on Centos 5 with DAHDI
Terry Wilson [Tue, 24 Feb 2009 17:02:20 +0000 (17:02 +0000)] 
Change include order to make compile on Centos 5 with DAHDI

If BIT_TYPES_DEFINED gets defined before linux/types.h is included, the
__s32 type doesn't get defined

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178266 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoSkip check for extension when subscribing for MWI.
Joshua Colp [Tue, 24 Feb 2009 15:16:07 +0000 (15:16 +0000)] 
Skip check for extension when subscribing for MWI.

Since the remote side is not actually subscribing to a specific extension when
subscribing for MWI just skip the check to see if the extension exists. They can't use it
to specify the mailbox either since we require configuration of that in sip.conf

(closes issue #14531)
Reported by: festr

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178205 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix infinite DTMF when a BEGIN is received without an END.
Russell Bryant [Mon, 23 Feb 2009 23:09:01 +0000 (23:09 +0000)] 
Fix infinite DTMF when a BEGIN is received without an END.

This commit is related to rev 175124 of 1.4 where a previous attempt was made
to fix this problem.  The problem with the previous patch was that the inserted
code needed to go _before_ setting the lastrxts to the current timestamp.
Because those were the same, the dtmfcount variable was never decremented, and
so the END was never sent.

In passing, I removed the dtmfsamples variable which was completed unused.  I
also removed a redundant setting of the lastrxts variable.

(closes issue #14460)
Reported by: moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@178141 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDon't print the CR-NL combination when we aren't outputting to the manager.
Tilghman Lesher [Fri, 20 Feb 2009 22:59:52 +0000 (22:59 +0000)] 
Don't print the CR-NL combination when we aren't outputting to the manager.

An embedded CR-NL in a CLI command screws up several AMI parsers that don't
expect to see that combination in the middle of output.

(Closes issue #14305)
Reported by: martins
Patch by: tilghman

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177786 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis exception does not appear to still be true for Solaris 10, and OpenSolaris defin...
Tilghman Lesher [Fri, 20 Feb 2009 21:15:01 +0000 (21:15 +0000)] 
This exception does not appear to still be true for Solaris 10, and OpenSolaris definitely needs it to be removed.
Fixed for snuff-home on -dev channel.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177701 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFixes issue with undefined audio codecs in chan_iax2
David Vossel [Fri, 20 Feb 2009 20:17:37 +0000 (20:17 +0000)] 
Fixes issue with undefined audio codecs in chan_iax2

During iax2 call negotiation, supported codecs are passed in an Information Element containing a 2 byte field where each bit correlates to a specific codec.  In 1.4 only audio codec bits 0-12 are defined, leaving bits 13-15 undefined.  By default all bits are enabled unless specified otherwise.  Since its a 2 byte field and 13-15 are not defined, these bits are never turned off.  In trunk, bits 13-15 are defined, which means 1.4 is advertising support for codecs it does not have when talking to trunk.  I fixed this by adding #define for undefined audio codec bits.  These bits are then removed from iax2's full bandwidth capabilities.

(closes issue #14283)
Reported by: jcovert

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177696 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis patch fixes a problem with 8-bit input to the ast_expr2 scanner.
Steve Murphy [Thu, 19 Feb 2009 22:51:37 +0000 (22:51 +0000)] 
This patch fixes a problem with 8-bit input to the ast_expr2 scanner.

The real culprit was the --full argument to flex
in the Makefile! This causes a 7-bit scanner to be
generated.

I reviewed the rules and found one rule where I needed
to specifically include 8-bit chars for a token.

I tested against the text supplied by ibercom, and
all looks very well.

This has been there a surprisingly long time!

(closes issue #14498)
Reported by: ibercom
Patches:
      14498.patch uploaded by murf (license 17)
Tested by: murf

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177540 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix up potential crashes, by reducing the sharing between interactive and non-interac...
Tilghman Lesher [Thu, 19 Feb 2009 22:26:01 +0000 (22:26 +0000)] 
Fix up potential crashes, by reducing the sharing between interactive and non-interactive threads.
(closes issue #14253)
 Reported by: Skavin
 Patches:
       20090219__bug14253.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Skavin

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177536 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoForce a MWI notification after subscribe request. Reported by the Resiprocate dev...
Olle Johansson [Thu, 19 Feb 2009 18:58:57 +0000 (18:58 +0000)] 
Force a MWI notification after subscribe request. Reported by the Resiprocate dev team. Thanks!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177450 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoIf we are able to create a speech structure unset the ERROR variable in case it was...
Joshua Colp [Thu, 19 Feb 2009 16:37:25 +0000 (16:37 +0000)] 
If we are able to create a speech structure unset the ERROR variable in case it was previously set.
(issue #LUMENVOX-13)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177383 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoThis patch fixes a regression of sorts that was introduced in
Steve Murphy [Wed, 18 Feb 2009 22:43:14 +0000 (22:43 +0000)] 
This patch fixes a regression of sorts that was introduced in
rev 24425.

It basically fixes AST-190/ABE-1782.

What was wrong: the user has 6000 extensions in one context; and
then 6000 contexts, one per extension. The parser could only handle
about 4893 of the 6000 extens in the single context.

This was due to the regression I mentioned. To get rid of
shift/reduce conflicts, Luigi set up right-recursive lists
for globals, context elements, switch lists, and statements.
Right recursive lists got rid of the warnings, but instead, they
use up a tremendous amount of stack space when the lists are long.

I saw this a few years back, and resolved not to fix it until
someone complained. That day has arrived!

After the changes were made, I ran the regression test suite,
and there were no problems.

I took the test case the user provided, and added 100,000
extensions to the single context, that already had 6,000 extens
in it. (I'll see your 6, and raise you 100!) It takes a few minutes
to read it all in, check it and generate code for it, but no
problems.

So, I think I can say that fundamentally, there are no longer
any limits on the number of items you can place in contexts,
statement blocks, switches, or globals, beyond your virt mem
constraints.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177225 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoModify h323 to build against PTLib as well as the older PWLib
Jeff Peeler [Wed, 18 Feb 2009 20:06:45 +0000 (20:06 +0000)] 
Modify h323 to build against PTLib as well as the older PWLib

Several changes in PTLib have occurred requiring build time detection. Changes
accounted for include the library name change, config option change, install
location change, and a boolean type change which is handled by ast_ptlib.h.
Also, the sed check has been modified to properly work with autoconf >= 2.62.

(closes issue #14224)
Reported by: bergolth
Patches:
      asterisk-autoconf-sed.patch uploaded by bergolth (license 661)
      asterisk-pwlib-v3.patch uploaded by bergolth (license 661)
Tested by: jpeeler

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177160 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDocument the return value of the update method (as requested on -dev list)
Tilghman Lesher [Wed, 18 Feb 2009 18:30:38 +0000 (18:30 +0000)] 
Document the return value of the update method (as requested on -dev list)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMerged revisions 177035 manually from
Doug Bailey [Wed, 18 Feb 2009 17:41:05 +0000 (17:41 +0000)] 
Merged revisions 177035 manually from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r177035 | dbailey | 2009-02-18 11:24:07 -0600 (Wed, 18 Feb 2009) | 2 lines

  Fixed error where a check for an zero length, terminated string was needed.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@177039 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoNeed to take into account the \0 terminator of the old string to determine the amount...
Doug Bailey [Wed, 18 Feb 2009 15:59:22 +0000 (15:59 +0000)] 
Need to take into account the \0 terminator of the old string to determine the amount available.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoSeveral changes to codec_dahdi to play nice with G723.
Shaun Ruffell [Wed, 18 Feb 2009 00:34:38 +0000 (00:34 +0000)] 
Several changes to codec_dahdi to play nice with G723.

This commit brings in the changes that were living out on the
svn/asterisk/team/sruffell/asterisk-1.4-transcoder branch.  codec_dahdi.c now
always uses signed linear as the simple codec so that a soft g729 codec will
not end up being preferred to the hardware codec.  There are also changes to
allow codec_dahdi.c to feed packets to the hardware in the native sample size of
the codec.  This solves problems with choppy audio when using G723.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176810 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoModify bridging to properly evaluate DTMF after first warning is played
Jeff Peeler [Tue, 17 Feb 2009 21:54:34 +0000 (21:54 +0000)] 
Modify bridging to properly evaluate DTMF after first warning is played

The main problem is currently if the Dial flag L is used with a warning sound,
DTMF is not evaluated after the first warning sound. To fix this, a flag has
been added in ast_generic_bridge for playing the warning which ensures that if
a scheduled warning is missed, multiple warrnings are not played back (due to a
feature evaluation or waiting for digits). ast_channel_bridge was modified to
store the nexteventts in the ast_bridge_config structure as that information
was lost every time ast_channel_bridge was reentered, causing a hangup due to
incorrect time calculations.

(closes issue #14315)
Reported by: tim_ringenbach

Reviewed on reviewboard:
http://reviewboard.digium.com/r/163/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176701 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoBackport change to 1.4:
Tilghman Lesher [Tue, 17 Feb 2009 21:21:41 +0000 (21:21 +0000)] 
Backport change to 1.4:
  Prior to masquerade, move the group definitions to the channel performing the
  masq, so that the group count lingers past the bridge.
  (closes issue #14275)
   Reported by: kowalma
   Patches:
         20090216__bug14275.diff.txt uploaded by Corydon76 (license 14)
   Tested by: kowalma

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176661 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoAfter a 'sip reload', qualifies for realtime peers weren't immediately
Tilghman Lesher [Tue, 17 Feb 2009 00:49:22 +0000 (00:49 +0000)] 
After a 'sip reload', qualifies for realtime peers weren't immediately
restarted, instead waiting until the next registration.  We're now
caching the qualify across a reload/restart and starting the qualify
immediately upon loading the peer.
(closes issue #14196)
 Reported by: pdf
 Patches:
       20090120__bug14196_1.4.diff.txt uploaded by pdf (license 663)
 Tested by: pdf

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176426 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging
David Vossel [Mon, 16 Feb 2009 23:30:52 +0000 (23:30 +0000)] 
Fixes issue with AST_CONTROL_SRCUPDATE not being relayed correctly during bridging

This should have been committed with rev176247, but I missed it.  srcupdate frames no longer break out of the native bridge, but are not being sent to the other call leg either.  This fixs that.

issue #13749

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176354 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agocorrect a logic error in the last stringfields commit... don't mark additional space...
Kevin P. Fleming [Mon, 16 Feb 2009 21:41:46 +0000 (21:41 +0000)] 
correct a logic error in the last stringfields commit... don't mark additional space as allocated if the string was built using already-allocated space

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176254 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoRemove unused variable and make dev-mode compilation happy
Mark Michelson [Mon, 16 Feb 2009 21:39:21 +0000 (21:39 +0000)] 
Remove unused variable and make dev-mode compilation happy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176252 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoOpen the DAHDI pseudo device and set it to be nonblocking atomically
Mark Michelson [Mon, 16 Feb 2009 21:34:27 +0000 (21:34 +0000)] 
Open the DAHDI pseudo device and set it to be nonblocking atomically

Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately
from opening the file was causing an "inappropriate ioctl for device" error.
While I cannot fathom why this would be happening, I certainly am not opposed
to making the code a bit more compact/efficient if it also fixes a bug.

(closes issue #14482)
Reported by: ys
Patches:
      meetme.patch uploaded by ys (license 281)
Tested by: ys

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176249 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFixes issue with AST_CONTROL_SRCUPDATE breaking out of native bridge
David Vossel [Mon, 16 Feb 2009 21:28:20 +0000 (21:28 +0000)] 
Fixes issue with AST_CONTROL_SRCUPDATE breaking out of native bridge

In iax2, when a AST_CONTROL_SRCUPDATE is received it breaks from the native bridge, but since there is no code path to handle srcupdate it just goes to be beginning of the loop.  This was causing packet storms of srcupdate frames between servers.  Now srcupdate frames do not break the native bridge for processing.

(closes issue #13749)
Reported by: adiemus

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176247 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agofix a flaw in the ast_string_field_build() family of API calls; these functions made...
Kevin P. Fleming [Mon, 16 Feb 2009 21:10:38 +0000 (21:10 +0000)] 
fix a flaw in the ast_string_field_build() family of API calls; these functions made no attempt to reuse the space already allocated to a field, so every time the field was written it would allocate new space, leading to what appeared to be a memory leak.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176216 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDon't have the Via header stored as a stringfield as it can change often during the...
Joshua Colp [Mon, 16 Feb 2009 15:33:53 +0000 (15:33 +0000)] 
Don't have the Via header stored as a stringfield as it can change often during the lifetime of a dialog.

This issue crept up with subscriptions on the AA50. When an outgoing NOTIFY is sent a new branch value
is created and the Via header is changed to reflect it. Since this was a stringfield a new spot in the
pool was used for the value while the old was left untouched/unused. If the current pool was full a new
pool was created. This would cause memory usage to increase steadily.

(issue #AA50-2332)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@176029 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agofix mis-spelling of the word registered.
Michiel van Baak [Sun, 15 Feb 2009 23:37:03 +0000 (23:37 +0000)] 
fix mis-spelling of the word registered.
Reported by De_Mon on #asterisk-dev.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175921 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoformat_ilbc does not depend on codec libraries and can therefore always be made....
Olle Johansson [Sun, 15 Feb 2009 20:33:17 +0000 (20:33 +0000)] 
format_ilbc does not depend on codec libraries and can therefore always be made. My mistake. Ursäkta!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDisable format_ilbc.so by default, like codec_ilbc.so
Olle Johansson [Sun, 15 Feb 2009 20:20:21 +0000 (20:20 +0000)] 
Disable format_ilbc.so by default, like codec_ilbc.so

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175792 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoMake sure that the debug line is not printed on debug level 0
Olle Johansson [Sun, 15 Feb 2009 19:48:38 +0000 (19:48 +0000)] 
Make sure that the debug line is not printed on debug level 0

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175777 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoZaptel is not DAHDI. Rather, Zaptel is actually Zaptel. (in case you're confused...
Jason Parker [Fri, 13 Feb 2009 21:53:16 +0000 (21:53 +0000)] 
Zaptel is not DAHDI.  Rather, Zaptel is actually Zaptel.  (in case you're confused, DAHDI is still DAHDI)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175698 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix a potential crash situation when using IMAP voicemail
Mark Michelson [Fri, 13 Feb 2009 19:47:48 +0000 (19:47 +0000)] 
Fix a potential crash situation when using IMAP voicemail

If calling into VoiceMailMain when using IMAP storage, it was
possible to crash Asterisk by hanging up the phone when prompted
for a voicemail mailbox. This patch fixes the issue.

While it may appear that this patch is superficial, it allows code
execution to continue to the failure case just below the IMAP_STORAGE
code block where this patch has been applied

(closes issue #14473)
Reported by: dwpaul
Patches:
      voicemail_imap_crash_no_mailbox.patch uploaded by dwpaul (license 689)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175590 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix a place where filestreams were not refcounted properly
Mark Michelson [Thu, 12 Feb 2009 23:22:44 +0000 (23:22 +0000)] 
Fix a place where filestreams were not refcounted properly

This section was already present in trunk and other branches,
but did not exist in 1.4.

(closes issue #14395)
Reported by: ZX81
Patches:
      14395.patch uploaded by putnopvut (license 60)
Tested by: ZX81

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175407 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix crashes when receiving certain T.38 packets. Also, increase the maximum
Tilghman Lesher [Thu, 12 Feb 2009 21:19:40 +0000 (21:19 +0000)] 
Fix crashes when receiving certain T.38 packets.  Also, increase the maximum
size of T.38 packets and warn users when they try to set the limits above those
maximums.
(closes issue #13050)
 Reported by: schern
 Patches:
       20090212__bug13050.diff.txt uploaded by Corydon76 (license 14)
 Tested by: schern

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175311 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix ParkedCall event information for From field in the case of a blind transfer
Jeff Peeler [Thu, 12 Feb 2009 20:34:36 +0000 (20:34 +0000)] 
Fix ParkedCall event information for From field in the case of a blind transfer

If the parker information can not be obtained from the peer, try and see if
the BLINDTRANSFER channel variable has been set. Previously, a blind transfer
to the ParkAndAnnounce app would return nothing for the From.

Closes AST-189

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175294 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoFix crash in event of failed attempt to transfer to parking
Jeff Peeler [Thu, 12 Feb 2009 17:57:10 +0000 (17:57 +0000)] 
Fix crash in event of failed attempt to transfer to parking

The peer may not necessarily exist, such as in the case of a transfer to
ParkAndAnnounce. In this case don't try to play a sound to it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175187 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoDon't send DTMF for infinite time if we do not receive an END event.
Russell Bryant [Thu, 12 Feb 2009 16:51:13 +0000 (16:51 +0000)] 
Don't send DTMF for infinite time if we do not receive an END event.

I thought that this was going to end up being a pretty gnarly fix, but it turns
out that there was actually already a configuration option in rtp.conf,
dtmftimeout, that was intended to handle this situation.  However, in between
Asterisk 1.2 and Asterisk 1.4, the code that processed the option got lost.
So, this commit brings it back to life.

The default timeout is 3 seconds.  However, it is worth noting that having
this be configurable at all is not really the recommended behavior in RFC 2833.
From Section 3.5 of RFC 2833:

      Limiting the time period of extending the tone is necessary
      to avoid that a tone "gets stuck". Regardless of the
      algorithm used, the tone SHOULD NOT be extended by more than
      three packet interarrival times. A slight extension of tone
      durations and shortening of pauses is generally harmless.

Three seconds will pretty much _always_ be far more than three packet
interarrival times.  However, that behavior is not required, so I'm going to
leave it with our legacy behavior for now.

Code from svn/asterisk/team/russell/issue_14460

(closes issue #14460)
Reported by: moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175124 65c4cc65-6c06-0410-ace0-fbb531ad65f3

16 years agoSet the initiator attribute to lowercase in our replies when receiving calls.
Philippe Sultan [Thu, 12 Feb 2009 10:16:21 +0000 (10:16 +0000)] 
Set the initiator attribute to lowercase in our replies when receiving calls.

This attribute contains a JID that identifies the initiator of the GoogleTalk
voice session. The GoogleTalk client discards Asterisk's replies if the
initiator attribute contains uppercase characters.

(closes issue #13984)
Reported by: jcovert
Patches:
      chan_gtalk.2.patch uploaded by jcovert (license 551)
Tested by: jcovert

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@175029 65c4cc65-6c06-0410-ace0-fbb531ad65f3