]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
16 years agoWait for wink before dialing when using E&M wink signaling
Jeff Peeler [Tue, 21 Jul 2009 20:16:55 +0000 (20:16 +0000)] 
Wait for wink before dialing when using E&M wink signaling

There was already code for other signaling types in dahdi_handle_event to
handle dialing if a dial operation dial string was present. Simply add
SIG_EMWINK to the list.

(closes issue #14434)
Reported by: araasch

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

16 years agoRevert r207573, this approach could potentially block for an unacceptable
Jeff Peeler [Tue, 21 Jul 2009 17:15:48 +0000 (17:15 +0000)] 
Revert r207573, this approach could potentially block for an unacceptable
amount of time.

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

16 years agoDocument default timeout for AMI originations.
Mark Michelson [Tue, 21 Jul 2009 14:26:00 +0000 (14:26 +0000)] 
Document default timeout for AMI originations.

AST-224

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

16 years agoEnsure that user-provided CFLAGS and LDFLAGS are honored.
Kevin P. Fleming [Tue, 21 Jul 2009 13:04:44 +0000 (13:04 +0000)] 
Ensure that user-provided CFLAGS and LDFLAGS are honored.

This commit changes the build system so that user-provided flags (in ASTCFLAGS
and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
by the build system itself, so that the user can effectively override the
build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
be provided *either* in the environment before running 'make', or as variable
assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
is no longer necessary, so they are no longer documented, but are still supported
so as not to break existing build systems that supply them when building Asterisk.

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

16 years agoWait for wink before dialing when using E&M wink signaling
Jeff Peeler [Mon, 20 Jul 2009 23:23:18 +0000 (23:23 +0000)] 
Wait for wink before dialing when using E&M wink signaling

This patch adds a new dahdi_wait function to specifically wait for the wink
event. If the wink is not eventually received the channel is hung up.

(closes issue #14434)
Reported by: araasch
Patches:
      emwinkmod uploaded by araasch (license 693)

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

16 years agoAnswer video SDP offers properly when videosupport is not enabled.
Mark Michelson [Mon, 20 Jul 2009 19:39:59 +0000 (19:39 +0000)] 
Answer video SDP offers properly when videosupport is not enabled.

Copied from Review board:

In issue 12434, the reporter describes a situation in which audio and video
is offered on the call, but because videosupport is disabled in sip.conf,
Asterisk gives no response at all to the video offer. According to RFC 3264,
all media offers should have a corresponding answer. For offers we do not
intend to actually reply to with meaningful values, we should still reply
with the port for the media stream set to 0.

In this patch, we take note of what types of media have been offered and
save the information on the sip_pvt. The SDP in the response will take into
account whether media was offered. If we are not otherwise going to answer
a media offer, we will insert an appropriate m= line with the port set to 0.

It is important to note that this patch is pretty much a bandage being
applied to a broken bone. The patch *only* helps for situations where video
is offered but videosupport is disabled and when udptl_pt is disabled but
T.38 is offered. Asterisk is not guaranteed to respond to every media offer.
Notable cases are when multiple streams of the same type are offered.
The 2 media stream limit is still present with this patch, too.

In trunk and the 1.6.X branches, things will be a bit different since Asterisk
also supports text in SDPs as well.

(closes issue #12434)
Reported by: mnnojd

Review: https://reviewboard.asterisk.org/r/311
Review: https://reviewboard.asterisk.org/r/313

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

16 years agoOnly do the chan->fdno check in ast_read() in a developer build.
Russell Bryant [Mon, 20 Jul 2009 16:26:24 +0000 (16:26 +0000)] 
Only do the chan->fdno check in ast_read() in a developer build.

I changed this check to only happen in a dev-mode build.  I also added a
comment explaining what is going on.  I also made it so that detection of
this situation does not affect ast_read() operation.

(closes issue #14723)
Reported by: seadweller

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

16 years agoFix format specifier to print out an unsigned long long.
Jeff Peeler [Fri, 17 Jul 2009 19:36:19 +0000 (19:36 +0000)] 
Fix format specifier to print out an unsigned long long.

Yep, it's even ifdefed out code. But it made it to the RR list...

(closes issue #14726)
Reported by: lmadsen

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

16 years agoEnhance configuration option for overlapdial allowing direction choice
Jeff Peeler [Fri, 17 Jul 2009 19:13:27 +0000 (19:13 +0000)] 
Enhance configuration option for overlapdial allowing direction choice

Previously overlap dialing could only be turned on or off for both incoming and
outgoing calls. New parameters incoming, outgoing, and both have been added to
allow further control. There is no change in default behavior with these new
options and allows in band DTMF to be accepted in one direction if required.

(closes issue #14471)
Reported by: eboscani

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

16 years agosip option flags handled incorrectly
David Vossel [Fri, 17 Jul 2009 18:00:38 +0000 (18:00 +0000)] 
sip option flags handled incorrectly

(issue #15376)

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

16 years agoSIP incorrect From: header information when callpres is prohib
David Vossel [Fri, 17 Jul 2009 16:05:06 +0000 (16:05 +0000)] 
SIP incorrect From: header information when callpres is prohib

Some ITSP make use of the "Anonymous" display name to detect a
requirement to withhold caller id across the PSTN. This does
not work if the display name is "Unknown".

(closes issue #14465)
Reported by: Nick_Lewis
Patches:
      chan_sip.c-callerpres.patch uploaded by Nick (license 657)
      chan_sip.c-callerpres_trunk.patch uploaded by dvossel (license 671)
Tested by: Nick_Lewis, dvossel

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

16 years agoerror in iax.conf related IP-based access control
David Vossel [Thu, 16 Jul 2009 21:33:19 +0000 (21:33 +0000)] 
error in iax.conf related IP-based access control

(closes issue #15518)
Reported by: pkempgen

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

16 years agoavoid segfault caused by user error
David Vossel [Thu, 16 Jul 2009 21:24:16 +0000 (21:24 +0000)] 
avoid segfault caused by user error

If the CALLERPRES() dialplan function is set to nothing,
a segfault occurs.  This is user error to begin with, but
I'd rather see a cli warning message than have Asterisk
crash on me.

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

16 years agoFix a memory leak.
Tilghman Lesher [Thu, 16 Jul 2009 16:27:35 +0000 (16:27 +0000)] 
Fix a memory leak.
(closes issue #15517)
 Reported by: adomjan
 Patches:
       func_realtime.c-ast_variable_destroy.diff uploaded by adomjan (license 487)

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

16 years agoMerged revision 206700 from
Richard Mudgett [Wed, 15 Jul 2009 20:44:55 +0000 (20:44 +0000)] 
Merged revision 206700 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.2-...

..........
  Fixed chan_misdn crash because mISDNuser library is not thread safe.

  With Asterisk the mISDNuser library is driven by two threads concurrently:
  1. channels/misdn/isdn_lib.c::manager_event_handler()
  2. channels/misdn/isdn_lib.c::misdn_lib_isdn_event_catcher()

  Calls into the library are done concurrently and recursively from
  isdn_lib.c.

  Both threads can fiddle with the master/child layer3_proc_t lists.  One
  thread may traverse the list when the other interrupts it and then removes
  the list element which the first thread was currently handling.  This is
  exactly what caused the crash.  About 60 calls were needed to a Gigaset
  CX475 before it occurred once.

  This patch adds locking when calling into the mISDNuser library.
  This also fixes some cb_log calls with wrong port parameter.

  JIRA ABE-1913
      Patches: misdn-locking.patch (Modified with mostly cosmetic changes)
..........

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

16 years agoOnly print debug info in codec_dahdi if we are asking for it.
Sean Bright [Wed, 15 Jul 2009 15:57:51 +0000 (15:57 +0000)] 
Only print debug info in codec_dahdi if we are asking for it.

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

16 years agoFixes several call transfer issues with chan_misdn.
Richard Mudgett [Tue, 14 Jul 2009 16:44:47 +0000 (16:44 +0000)] 
Fixes several call transfer issues with chan_misdn.

*  issue #14355 - Crash if attempt to transfer a call to an application.
Masquerade the other pair of the four asterisk channels involved in the
two calls.  The held call already must be a bridged call (not an
applicaton) or it would have been rejected.

*  issue #14692 - Held calls are not automatically cleared after transfer.
Allow the core to initate disconnect of held calls to the ISDN port.  This
also fixes a similar case where the party on hold hangs up before being
transferred or taken off hold.

*  JIRA ABE-1903 - Orphaned held calls left in music-on-hold.
Do not simply block passing the hangup event on held calls to asterisk
core.

*  Fixed to allow held calls to be transferred to ringing calls.
Previously, held calls could only be transferred to connected calls.
*  Eliminated unused call states to simplify hangup code.
*  Eliminated most uses of "holded" because it is not a word.

(closes issue #14355)
(closes issue #14692)
Reported by: sodom
Patches:
      misdn_xfer_v14_r205839.patch uploaded by rmudgett (license 664)
Tested by: rmudgett

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

16 years agoMerged revisions 206384 via svnmerge from
Russell Bryant [Tue, 14 Jul 2009 14:48:00 +0000 (14:48 +0000)] 
Merged revisions 206384 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r206384 | russell | 2009-07-14 09:45:47 -0500 (Tue, 14 Jul 2009) | 6 lines

  Ensure apathetic replies are sent out on the proper socket.

  chan_iax2 supports multiple address bindings.  The send_apathetic_reply()
  function did not attempt to send its response on the same socket that the
  incoming message came in on.
........

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

16 years agoFix some memory leaks in chan_misdn.
Richard Mudgett [Tue, 14 Jul 2009 00:17:28 +0000 (00:17 +0000)] 
Fix some memory leaks in chan_misdn.

JIRA ABE-1911

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

16 years agoPrint CID match in "show dialplan".
Russell Bryant [Mon, 13 Jul 2009 15:12:08 +0000 (15:12 +0000)] 
Print CID match in "show dialplan".

(closes issue #14702)
Reported by: klaus3000
Patches:
      patch_asterisk_1.4.23_CID_matching.txt uploaded by klaus3000 (license 65)

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

16 years agoProperly ACK 487 responses to canceled INVITEs.
Mark Michelson [Fri, 10 Jul 2009 17:39:13 +0000 (17:39 +0000)] 
Properly ACK 487 responses to canceled INVITEs.

From the review board request:
The fix from review 298 has exposed a new bug in chan_sip.

When we hang up an outgoing call, we first will dump all the outstanding
packets on the sip_pvt using __sip_pretend_ack. Then, if we can, we send
a CANCEL. The problem with this is that since destroyed all the outstanding
packets on the dialog, we cannot match the incoming 487 response to our
INVITE. Because we cannot match the response, we do not send an ACK.

To correct this, instead of using __sip_pretend_ack, I have changed the code
to loop through the list of packets and call __sip_semi_ack on each one
instead. This causes us to stop retransmitting the requests, but we still have
them around in case we get responses for them.

When discussing this earlier today with Josh Colp, we both agreed that in the
majority of cases, this would be enough of a fix. However, we also agreed that
we should have a safety net in place in case we never receive a response to
our initial INVITE. To handle this, I have modified __sip_autodestruct to
behave similar to the way it does in Asterisk 1.4. If there are outstanding
packets on the sip_pvt, the needdestroy flag is not set, and the last request
on the dialog was either a CANCEL or BYE, then we set the needdestroy flag and
reschedule destruction for 10 seconds in the future. If, though, the
needdestroy flag is set, then we use __sip_pretend_ack to kill the remaining
outstanding packets so that the monitor thread can destroy the sip_pvt.

I ran two separate tests. First, I placed a call from my Aastra phone to my
Polycom phone. I hung up the Aastra before the Polycom answered. I verified
through sip debug output that Asterisk properly ACKed the 487 received from the
Polycom.

For my second test, I set up a SIPp UAS scenario so that it would send a 200 OK
in response to a CANCEL but would not send a 487 for the original INVITE. I
verified that after about 40 seconds, Asterisk properly cleans up the outgoing
sip_pvt for the call.

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

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

16 years agoSIP registration auth loop caused by stale nonce
David Vossel [Fri, 10 Jul 2009 16:23:59 +0000 (16:23 +0000)] 
SIP registration auth loop caused by stale nonce

If an endpoint sends two registration requests in a very short
period of time with the same nonce, both receive 401 responses
from Asterisk, each with a different nonce (the second 401
containing the current nonce and the first one being stale).
If the endpoint responds to the first 401, it does not match
the current nonce so Asterisk sends a third 401 with a newly
generated nonce (which updates the current nonce)... Now if
the endpoint responds to the second 401, it does not match the
current nonce either and Asterisk sends a fourth 401 with a
newly generated nonce... This loop goes on and on.

There appears to be a simple fix for this.  If the nonce from
the request does not match our nonce, but is a good response
to a previous nonce, instead of sending a 401 with a newly
generated nonce, use the current one instead.  This breaks
the loop as the nonce is not updated until a response is
received. Additional logic has been added to make sure no
nonce can be responded to twice though.

(closes issue #15102)
Reported by: Jamuel
Patches:
      patch-bug_0015102 uploaded by Jamuel (license 809)
      nonce_sip.diff uploaded by dvossel (license 671)
Tested by: Jamuel

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

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

16 years agoEnsure that outbound NOTIFY requests are properly routed through stateful proxies.
Mark Michelson [Fri, 10 Jul 2009 15:51:36 +0000 (15:51 +0000)] 
Ensure that outbound NOTIFY requests are properly routed through stateful proxies.

With this change, we make note of Record-Route headers present in any SUBSCRIBE
request that we receive so that our outbound NOTIFY requests will have the proper
Route headers in them.

(closes issue #14725)
Reported by: ibc

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

16 years agoNo audio on calls from Asterisk to various ISDN devices until DTMF sent by caller.
Richard Mudgett [Thu, 9 Jul 2009 23:37:53 +0000 (23:37 +0000)] 
No audio on calls from Asterisk to various ISDN devices until DTMF sent by caller.

Add missing clearing of the dialing flag when the ISDN call is CONNECTED.
(i.e. When libpri generates the event PRI_EVENT_ANSWER.)

(closes issue #15420)
Reported by: scottbmilne
Patches:
      bug15420-1.4.25.1-diff2.txt uploaded by alecdavis (license 585)
Tested by: scottbmilne, alecdavis

(closes issue #15416)
Reported by: avinoash

(closes issue #15389)
Reported by: alecdavis

This patch should also fix the following issue:
(issue #15205)
Reported by: vinsik

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

16 years agoChanging ast_samp2tv to not use floating point.
David Vossel [Thu, 9 Jul 2009 16:18:09 +0000 (16:18 +0000)] 
Changing ast_samp2tv to not use floating point.

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

16 years agoFixes 8khz assumptions
David Vossel [Wed, 8 Jul 2009 23:15:54 +0000 (23:15 +0000)] 
Fixes 8khz assumptions

Many calculations assume 8khz is the codec rate. This
is not always the case.  This patch only addresses chan_iax.c
and res_rtp_asterisk.c, but I am sure there are other areas
that make this assumption as well.

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

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

16 years agomoving ast_devstate_to_extenstate to pbx.c from devicestate.c
David Vossel [Wed, 8 Jul 2009 21:35:12 +0000 (21:35 +0000)] 
moving ast_devstate_to_extenstate to pbx.c from devicestate.c

ast_devstate_to_extenstate belongs in pbx.c.  This change
fixes a compile time error with chan_vpb as well.

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

16 years agoPrevent phantom calls to queue members.
Mark Michelson [Wed, 8 Jul 2009 19:26:13 +0000 (19:26 +0000)] 
Prevent phantom calls to queue members.

If a caller were to hang up while a periodic announcement or position
were being said, the return value for those functions would incorrectly
indicate that the caller was still in the queue. With these changes,
the problem does not occur.

(closes issue #14631)
Reported by: latinsud
Patches:
      queue_announce_ghost_call2.diff uploaded by latinsud (license 745)
  (with small modification from me)

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

16 years agoUpdate config.guess and config.sub from the savannah.gnu.org git repo.
Jason Parker [Wed, 8 Jul 2009 18:19:03 +0000 (18:19 +0000)] 
Update config.guess and config.sub from the savannah.gnu.org git repo.

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

16 years agoast_samp2tv needs floating point for 16khz audio
David Vossel [Wed, 8 Jul 2009 16:53:40 +0000 (16:53 +0000)] 
ast_samp2tv needs floating point for 16khz audio

In ast_samp2tv(), (1000000 / _rate) = 62.5 when _rate is 16000.
The .5 is currently stripped off because we don't calculate
using floating points.  This causes madness with 16khz audio.

(issue ABE-1899)

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

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

16 years agoAdd redirection warnings for the invalid language codes previously removed.
Tilghman Lesher [Wed, 8 Jul 2009 16:26:15 +0000 (16:26 +0000)] 
Add redirection warnings for the invalid language codes previously removed.

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

16 years agoMake OpenSSL usage thread-safe.
Russell Bryant [Wed, 8 Jul 2009 15:54:21 +0000 (15:54 +0000)] 
Make OpenSSL usage thread-safe.

OpenSSL is not thread-safe by default.  However, making it thread safe is
very easy.  We just have to provide a couple of callbacks.  One callback
returns a thread ID.  The other handles locking.  For more information,
start with the "Is OpenSSL thread-safe?" question on the FAQ page of
openssl.org.

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

16 years agoRemoved confusing warning message "Got Busy in Connected State"
Richard Mudgett [Thu, 2 Jul 2009 21:59:43 +0000 (21:59 +0000)] 
Removed confusing warning message "Got Busy in Connected State"

If an incoming mISDN call is answered with the Answer application and a
subsequent Dial gets a busy endpoint then it is valid for that already
connected channel to get the busy indication.  Asterisk will play the busy
tones until the dialplan plays something else or hangs up the call.

(closes issue #11974)
Reported by: fvdb

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

16 years agomoving device state functions from pbx.h to devicestate.h to sync with other branches
David Vossel [Thu, 2 Jul 2009 18:15:39 +0000 (18:15 +0000)] 
moving device state functions from pbx.h to devicestate.h to sync with other branches

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

16 years agoImproved mapping of extension states from combined device states.
David Vossel [Thu, 2 Jul 2009 15:05:57 +0000 (15:05 +0000)] 
Improved mapping of extension states from combined device states.

This fixes a few issues with incorrect extension states and adds
a cli command, core show device2extenstate, to display all possible
state mappings.

(closes issue #15413)
Reported by: legart
Patches:
      exten_helper.diff uploaded by dvossel (license 671)
Tested by: dvossel, legart, amilcar

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

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

16 years agoMore incorrect language codes, plus ensuring that regionalizations use the specified...
Tilghman Lesher [Tue, 30 Jun 2009 20:23:51 +0000 (20:23 +0000)] 
More incorrect language codes, plus ensuring that regionalizations use the specified language, and not English for grammar.
(closes issue #15022)
 Reported by: greenfieldtech
 Patches:
       20090519__issue15022.diff.txt uploaded by tilghman (license 14)

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

16 years agoFix ast_say_counted_noun to correctly handle Polish. Fix a comment typo in passing.
Jason Parker [Tue, 30 Jun 2009 18:47:06 +0000 (18:47 +0000)] 
Fix ast_say_counted_noun to correctly handle Polish.  Fix a comment typo in passing.

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

16 years ago"tw" is the language specification for Twi (from Ghana) not Taiwanese.
Tilghman Lesher [Tue, 30 Jun 2009 18:23:35 +0000 (18:23 +0000)] 
"tw" is the language specification for Twi (from Ghana) not Taiwanese.
(closes issue #15346)
 Reported by: volivier
 Patches:
       20090617__issue15346__1.4.diff.txt uploaded by tilghman (license 14)
       20090617__issue15346__trunk.diff.txt uploaded by tilghman (license 14)
       20090617__issue15346__1.6.0.diff.txt uploaded by tilghman (license 14)
       20090617__issue15346__1.6.1.diff.txt uploaded by tilghman (license 14)
       20090617__issue15346__1.6.2.diff.txt uploaded by tilghman (license 14)
 Tested by: volivier

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

16 years agoAdd error message so that it is clear why a SIP peer was not processed when
Mark Michelson [Mon, 29 Jun 2009 22:45:34 +0000 (22:45 +0000)] 
Add error message so that it is clear why a SIP peer was not processed when
a DNS lookup fails on a host or outboundproxy.

(closes issue #13432)
Reported by: p_lindheimer
Patches:
      outboundproxy.patch uploaded by p (license 558)

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

16 years agoFix build oops.
Mark Michelson [Mon, 29 Jun 2009 21:37:05 +0000 (21:37 +0000)] 
Fix build oops.

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

16 years agoFix a problem where chan_sip would ignore "old" but valid responses.
Mark Michelson [Mon, 29 Jun 2009 21:23:43 +0000 (21:23 +0000)] 
Fix a problem where chan_sip would ignore "old" but valid responses.

chan_sip has had a problem for quite a long time that would manifest when
Asterisk would send multiple SIP responses on the same dialog before receiving
a response. The problem occurred because chan_sip only kept track of the highest
outgoing sequence number used on the dialog. If Asterisk sent two requests out,
and a response arrived for the first request sent, then Asterisk would ignore
the response. The result was that Asterisk would continue retransmitting the
requests and ignoring the responses until the maximum number of retransmissions
had been reached.

The fix here is to rearrange the code a bit so that instead of simply comparing
the sequence number of the response to our latest outgoing sequence number, we
walk our list of outstanding packets and determine if there is a match. If there is,
we continue. If not, then we ignore the response.

In doing this, I found a few completely useless variables that I have now removed.

(closes issue #11231)
Reported by: flefoll

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

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

16 years agoRevision 189537 was supposed to make 1.4 more correct. Instead, it broke func_odbc...
Tilghman Lesher [Mon, 29 Jun 2009 19:36:01 +0000 (19:36 +0000)] 
Revision 189537 was supposed to make 1.4 more correct.  Instead, it broke func_odbc.  Reverting.
(closes issue #15317, issue #14614)

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

16 years agosegfault after SPINLOCK schedule delete
David Vossel [Mon, 29 Jun 2009 17:04:04 +0000 (17:04 +0000)] 
segfault after SPINLOCK schedule delete

Using the SPINLOCK schedule delete macro can result in the iax_pvt lock
being given up.  This makes it possible for the iax_pvt to dissappear
when we thought we held the mutex the entire time.  To resolve this, the
iax_pvt's ref count is incremented.

(closes issue #15377)
Reported by: aragon
Patches:
      iax_spin_issue_1.4.diff uploaded by dvossel (license 671)
Tested by: aragon, dvossel

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

16 years agoPlace unlock of mutex in an else block so that it does not get unlocked twice.
Mark Michelson [Mon, 29 Jun 2009 15:04:17 +0000 (15:04 +0000)] 
Place unlock of mutex in an else block so that it does not get unlocked twice.

(closes issue #15400)
Reported by: aragon

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

16 years agoThe ISDN CPE side should not exclusively pick B channels normally.
Richard Mudgett [Sat, 27 Jun 2009 00:55:12 +0000 (00:55 +0000)] 
The ISDN CPE side should not exclusively pick B channels normally.

Before this patch, Asterisk unconditionally picked B channels exclusively
on the CPE side and normally allowed alternative B channels on the network
side.  Now Asterisk does the opposite.

Reasons for the CPE side to normally not pick B channels exclusively:
*  For CPE point-to-multipoint mode (i.e. phone side), the CPE side does
not have enough information to exclusively pick B channels.  (There may be
other devices on the line.)
*  Q.931 gives preference to the network side picking B channels.
*  Some telcos require the CPE side to not pick B channels exclusively.

(closes issue #14383)
Reported by: mbrancaleoni

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

16 years agoMake sure to recreate the dahdi pseudo channel after dahdi restart
Jeff Peeler [Fri, 26 Jun 2009 22:09:19 +0000 (22:09 +0000)] 
Make sure to recreate the dahdi pseudo channel after dahdi restart

(closes issue #14477)
Reported by: timking

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

16 years agoDon't fast forward past the end of a message.
Russell Bryant [Fri, 26 Jun 2009 21:16:39 +0000 (21:16 +0000)] 
Don't fast forward past the end of a message.

This is nice change for users of the voicemail application.  If someone gets a
little carried away with fast forwarding through a message, they can easily
get to the end and accidentally exit the voicemail application by hitting the
fast forward key during the following prompt.

This adds some safety by not allowing a fast forward past the end of a message.

(closes issue #14554)
Reported by: lacoursj
Patches:
      21761.patch uploaded by lacoursj (license 707)
Tested by: lacoursj

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

16 years agoFixing voicemail's error in checking max silence vs min message length
David Brooks [Fri, 26 Jun 2009 20:03:42 +0000 (20:03 +0000)] 
Fixing voicemail's error in checking max silence vs min message length

Max silence was represented in milliseconds, yet vmminsecs (minmessage) was represented
as seconds.

Also, the inequality was reversed. The warning, if triggered, was "Max silence should
be less than minmessage or you may get empty messages", which should have been logged
if max silence was greater than minmessage, but the check was for less than.

Also, conforming if statement to coding guidelines.

closes issue #15331)
Reported by: markd

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

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

16 years agoI didn't see that Mark already fixed the underlying issue!
Terry Wilson [Thu, 25 Jun 2009 21:13:10 +0000 (21:13 +0000)] 
I didn't see that Mark already fixed the underlying issue!

Yay for removing useless code.

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

16 years agoFix a case where CDR answer time could be before the start time involving parking.
Russell Bryant [Thu, 25 Jun 2009 21:02:18 +0000 (21:02 +0000)] 
Fix a case where CDR answer time could be before the start time involving parking.

(closes issue #13794)
Reported by: davidw
Patches:
      13794.patch uploaded by murf (license 17)
      13794.patch.160 uploaded by murf (license 17)
Tested by: murf, dbrooks

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

16 years agoDon't try to free NULL
Terry Wilson [Thu, 25 Jun 2009 20:09:15 +0000 (20:09 +0000)] 
Don't try to free NULL

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

16 years agoPrevent false positives when freeing a NULL pointer with MALLOC_DEBUG enabled.
Mark Michelson [Thu, 25 Jun 2009 18:52:22 +0000 (18:52 +0000)] 
Prevent false positives when freeing a NULL pointer with MALLOC_DEBUG enabled.

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

16 years agoResolve a crash related to a T.38 reinvite race condition.
Russell Bryant [Thu, 25 Jun 2009 16:02:16 +0000 (16:02 +0000)] 
Resolve a crash related to a T.38 reinvite race condition.

This change resolves a crash observed locally during some T.38 testing.
A call was set up using a call file, and when the T.38 reinvite came in,
the channel state was still AST_STATE_DOWN.  The reason is explained by
a comment in the code that previously lived in the handling of
AST_STATE_RINGING.  This change modifies the logic to handle the same
race condition for any channel state that is not UP.

(closes ABE-1895)

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

16 years agoImproved chan_dahdi.conf pritimer error checking.
Richard Mudgett [Wed, 24 Jun 2009 21:01:43 +0000 (21:01 +0000)] 
Improved chan_dahdi.conf pritimer error checking.

Valid format is: pritimer=timer_name,timer_value

*  Fixed segfault if the ',' is missing.
*  Completely check the range returned by pri_timer2idx() to prevent
possible access outside array bounds.

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

16 years agoUse the handy UNLINK macro instead of hand-coding the same thing in-line.
Mark Michelson [Wed, 24 Jun 2009 18:28:47 +0000 (18:28 +0000)] 
Use the handy UNLINK macro instead of hand-coding the same thing in-line.

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

16 years agoMWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport
David Vossel [Tue, 23 Jun 2009 16:28:46 +0000 (16:28 +0000)] 
MWI NOTIFY contains a wrong URI if Asterisk listens to non-standard port and transport

(closes issue #14659)
Reported by: klaus3000
Patches:
      patch_chan_sip_fixMWIuri_1.4.txt uploaded by klaus3000 (license 65)
      mwi_port-transport_trunk.diff uploaded by dvossel (license 671)
Tested by: dvossel, klaus3000

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

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

16 years agoFix more memory leaks that may result if rtp is not successfully allocated.
Mark Michelson [Tue, 23 Jun 2009 15:22:35 +0000 (15:22 +0000)] 
Fix more memory leaks that may result if rtp is not successfully allocated.

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

16 years agoFix potential memory leak in chan_sip when video rtp is not allocated properly.
Mark Michelson [Tue, 23 Jun 2009 15:08:27 +0000 (15:08 +0000)] 
Fix potential memory leak in chan_sip when video rtp is not allocated properly.

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

16 years agoReport CallerID change during a masquerade.
Russell Bryant [Mon, 22 Jun 2009 20:08:53 +0000 (20:08 +0000)] 
Report CallerID change during a masquerade.

Reported by: markster

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

16 years agoMake Polycom subscription type override check more explicit.
Russell Bryant [Mon, 22 Jun 2009 16:00:00 +0000 (16:00 +0000)] 
Make Polycom subscription type override check more explicit.

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

16 years agoRemove an extra debug line left from previous commit.
Mark Michelson [Mon, 22 Jun 2009 14:44:58 +0000 (14:44 +0000)] 
Remove an extra debug line left from previous commit.

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

16 years agoFix a situation in which Asterisk would not stop retransmitting 487s.
Mark Michelson [Mon, 22 Jun 2009 14:42:55 +0000 (14:42 +0000)] 
Fix a situation in which Asterisk would not stop retransmitting 487s.

If a CANCEL were received by Asterisk, we would send a 487 in response
to the original INVITE and a 200 OK for the CANCEL. If there were a network
hiccup which caused the 200 OK and the 487 to be lost, then the UA communicating
with Asterisk may try to retransmit its CANCEL. Asterisk's response to this used
to be to try sending another 487 to the canceled INVITE and another 200 OK to the
CANCEL.

The problem here is that the originally-sent 487 was sent "reliably" meaning that
it will be retransmitted until it is received properly. So when we receive the second
CANCEL it is likely that the first batch of 487s we sent is still going strong and
reaches the UA. The result was that the second set of 487s would be retransmitted
constantly until the maximum number of retries had been reached.

The fix for this is that if we receive a second CANCEL for an INVITE, then we cancel
the retransmission of the first set of 487s and start a second set. This causes the
dialog to be terminated reasonably.

(closes issue #14584)
Reported by: klaus3000
Patches:
      14584_v2.patch uploaded by mmichelson (license 60)
Tested by: klaus3000

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

16 years agoFix a possible infinite loop in SDP parsing during glare situation.
Mark Michelson [Mon, 22 Jun 2009 14:34:05 +0000 (14:34 +0000)] 
Fix a possible infinite loop in SDP parsing during glare situation.

There was a while loop in get_ip_and_port_from_sdp which was controlled
by a call to get_sdp_iterate. The loop would exit either if what we were
searching for was found or if the return was NULL. The problem is that
get_sdp_iterate never returns NULL. This means that if what we were searching
for was not present, the loop would run infinitely. This modification of the
loop fixes the problem.

(closes issue #15213)
Reported by: schmidts

(closes issue #15349)
Reported by: samy

(closes issue #14464)
Reported by: pj

(closes issue #15345)
Reported by: aragon
Patches:
      sip_inf_loop.patch uploaded by mmichelson (license 60)
Tested by: aragon

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

16 years agoSince we don't have sip_pvt_lock() in 1.4, we need to use ast_mutex_* directly.
Sean Bright [Sat, 20 Jun 2009 17:51:41 +0000 (17:51 +0000)] 
Since we don't have sip_pvt_lock() in 1.4, we need to use ast_mutex_* directly.

(closes issue #15366)
Reported by: loloski

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

16 years agoAdded deadlock protection to try_suggested_sip_codec in chan_sip.c.
Matthew Nicholson [Fri, 19 Jun 2009 21:21:15 +0000 (21:21 +0000)] 
Added deadlock protection to try_suggested_sip_codec in chan_sip.c.

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

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

16 years agotimestamp was being converted to host order as a short rather than a long
David Vossel [Fri, 19 Jun 2009 20:22:02 +0000 (20:22 +0000)] 
timestamp was being converted to host order as a short rather than a long

(closes issue #15361)
Reported by: ffloimair
Patches:
      ts_issue.diff uploaded by dvossel (license 671)

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

16 years agoIf the "h" extension fails, give it another chance in main/pbx.c.
Tilghman Lesher [Fri, 19 Jun 2009 00:40:41 +0000 (00:40 +0000)] 
If the "h" extension fails, give it another chance in main/pbx.c.
If the "h" extension fails, give it another chance in main/pbx.c, when it
returns from the bridge code.  Fixes an issue where the "h" extension may
occasionally not fire, when a Dial is executed from a Macro.
Debugged in #asterisk with user tompaw.

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

16 years agoFix memory corruption and leakage related reloads of non files mode MoH classes.
Russell Bryant [Thu, 18 Jun 2009 15:24:31 +0000 (15:24 +0000)] 
Fix memory corruption and leakage related reloads of non files mode MoH classes.

For Music on Hold classes that are not files mode, meaning that we are executing
an application that will feed us audio data, we use a thread to monitor the
external application and read audio from it.  This thread also makes use of the
MoH class object.  In the MoH class destructor, we used pthread_cancel() to ask
the thread to exit.  Unfortunately, the code did not wait to ensure that the
thread actually went away.  What needed to be done is a pthread_join() to ensure
that the thread fully cleans up before we proceed.  By adding this one line, we
resolve two significant problems:

  1) Since the thread was never joined, it never fully goes away.  So, on every
     reload of non-files mode MoH, an unused thread was sticking around.

  2) There was a race condition here where the application monitoring thread
     could still try to access the MoH class, even though the thread executing
     the MoH reload has already destroyed it.

(issue #15109)
Reported by: jvandal

(issue #15123)
Reported by: axisinternet

(issue #15195)
Reported by: amorsen

(issue AST-208)

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

16 years agoChange the datastore traversal in ast_do_masquerade to use a safe list traversal.
Mark Michelson [Wed, 17 Jun 2009 19:59:31 +0000 (19:59 +0000)] 
Change the datastore traversal in ast_do_masquerade to use a safe list traversal.

It is possible for datastore fixup functions to remove the datastore from the list
and free it. In particular, the queue_transfer_fixup in app_queue does this. While
I don't yet know of this causing any crashes, it certainly could.

Found while discussing a separate issue with Brian Degenhardt.

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

16 years agoStopMixMonitor race condition (not giving up file immediately)
David Vossel [Wed, 17 Jun 2009 19:28:12 +0000 (19:28 +0000)] 
StopMixMonitor race condition (not giving up file immediately)

StopMixMonitor only indicates to the MixMonitor thread to stop
writing to the file.  It does not guarantee that the recording's
file handle is available to the dialplan immediately after execution.
This results in a race condition.  To resolve this, the filestream
pointer is placed in a datastore on the channel. When StopMixMonitor
is called, the datastore is retrieved from the channel and the
filestream is closed immediately before returning to the dialplan.
Documentation indicating the use of StopMixMonitor to free files
has been updated as well.

(closes issue #15259)
Reported by: travisghansen
Tested by: dvossel

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

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

16 years agoChecks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read()
David Brooks [Wed, 17 Jun 2009 18:45:50 +0000 (18:45 +0000)] 
Checks for NULL sip_pvt pointer in chan_sip.c->acf_channel_read()

Zombie channels could be passed, and chan_sip.c wasn't checking for it.
Could crash Asterisk. Now checking for NULL pointer.

(closes issue #15330)
Reported by: okrief
Tested by: dbrooks

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

16 years agoCorrect AST_LIST_APPEND_LIST behavior when list to be appended is empty.
Kevin P. Fleming [Wed, 17 Jun 2009 12:03:25 +0000 (12:03 +0000)] 
Correct AST_LIST_APPEND_LIST behavior when list to be appended is empty.

When the list to be appended is empty, and the list to be appended to is *not*,
AST_LIST_APPEND_LIST would actually cause the target list to become broken,
and no longer have a pointer to its last entry. This patch fixes the problem.

(reported by Stanislaw Pitucha on the asterisk-dev mailing list)

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

16 years agoImprove support for media paths that can generate multiple frames at once.
Kevin P. Fleming [Tue, 16 Jun 2009 17:05:38 +0000 (17:05 +0000)] 
Improve support for media paths that can generate multiple frames at once.

There are various media paths in Asterisk (codec translators and UDPTL, primarily)
that can generate more than one frame to be generated when the application calling
them expects only a single frame. This patch addresses a number of those cases,
at least the primary ones to solve the known problems. In addition it removes the
broken TRACE_FRAMES support, fixes a number of bugs in various frame-related API
functions, and cleans up various code paths affected by these changes.

https://reviewboard.asterisk.org/r/175/

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

16 years agoShow the interface name on error, if it is not found.
Eliel C. Sardanons [Tue, 16 Jun 2009 13:25:51 +0000 (13:25 +0000)] 
Show the interface name on error, if it is not found.

If the smdiport specified is not found, show the interface name
instead of '(null)'.

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

16 years agoAdd INFO to our allowed methods so that endpoints know they may send it to us.
Mark Michelson [Mon, 15 Jun 2009 15:21:46 +0000 (15:21 +0000)] 
Add INFO to our allowed methods so that endpoints know they may send it to us.

AST-223

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

16 years agoSuppress a warning message and give a better return code when generating
Mark Michelson [Fri, 12 Jun 2009 19:06:41 +0000 (19:06 +0000)] 
Suppress a warning message and give a better return code when generating
inband ringing after a call is answered.

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

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

16 years agoBackport fix for parallel build warnings from trunk r199781.
Sean Bright [Thu, 11 Jun 2009 22:20:31 +0000 (22:20 +0000)] 
Backport fix for parallel build warnings from trunk r199781.

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

16 years agoFix path for .flavor and .version.
Leif Madsen [Thu, 11 Jun 2009 12:12:06 +0000 (12:12 +0000)] 
Fix path for .flavor and .version.

(issue #14737)
Reported by: davidw
Patches:
      flavor.patch uploaded by davidw (license 780)
Tested by: davidw

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

16 years ago__WORDSIZE is not available on all platforms, so use sizeof(void *) instead.
Sean Bright [Wed, 10 Jun 2009 16:08:35 +0000 (16:08 +0000)] 
__WORDSIZE is not available on all platforms, so use sizeof(void *) instead.

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

16 years agoFix a typo in the stack size calculation just introduced.
Sean Bright [Mon, 8 Jun 2009 19:28:33 +0000 (19:28 +0000)] 
Fix a typo in the stack size calculation just introduced.

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

16 years agoIncrease the size of our thread stack on 64 bit processors.
Sean Bright [Mon, 8 Jun 2009 19:24:32 +0000 (19:24 +0000)] 
Increase the size of our thread stack on 64 bit processors.

We were setting the stack size for each thread to 240KB regardless of
architecture, which meant that in some scenarios we actually had less available
stack space on 64 bit processors (pointers use 8 bytes instead of 4).  So now we
calculate the stack size we reserve based on the platform's __WORDSIZE, which
gives us:

     32 bit -> 240KB
     64 bit -> 496KB
    128 bit -> 1008KB (that's right, we're ready for 128 bit processors)

Patch typed by me but written by several members of #asterisk-dev, including
Kevin, Tilghman, and Qwell.

(closes issue #14932)
Reported by: jpiszcz
Patches:
      06052009_issue14932.patch uploaded by seanbright (license 71)
Tested by: seanbright

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

16 years agoFixes issue with hints giving unexpected results.
David Vossel [Fri, 5 Jun 2009 21:19:56 +0000 (21:19 +0000)] 
Fixes issue with hints giving unexpected results.

Hints with two or more devices that include ONHOLD gave unexpected results.

(closes issue #15057)
Reported by: p_lindheimer
Patches:
      onhold_trunk.diff uploaded by dvossel (license 671)
      pbx.c.1.4.patch uploaded by p (license 558)
      devicestate.c.trunk.patch uploaded by p (license 671)
Tested by: p_lindheimer, dvossel

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

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

16 years agoAdditional updates to AST-2009-001
David Vossel [Thu, 4 Jun 2009 19:00:15 +0000 (19:00 +0000)] 
Additional updates to AST-2009-001

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

16 years agoSafely handle AMI connections/reload requests that occur during startup.
Sean Bright [Thu, 4 Jun 2009 14:14:57 +0000 (14:14 +0000)] 
Safely handle AMI connections/reload requests that occur during startup.

During asterisk startup, a lock on the list of modules is obtained by the
primary thread while each module is initialized.  Issue 13778 pointed out a
problem with this approach, however.  Because the AMI is loaded before other
modules, it is possible for a module reload to be issued by a connected client
(via Action: Command), causing a deadlock.

The resolution for 13778 was to move initialization of the manager to happen
after the other modules had already been lodaded.  While this fixed this
particular issue, it caused a problem for users (like FreePBX) who call AMI
scripts via an #exec in a configuration file (See issue 15189).

The solution I have come up with is to defer any reload requests that come in
until after the server is fully booted.  When a call comes in to
ast_module_reload (from wherever) before we are fully booted, the request is
added to a queue of pending requests.  Once we are done booting up, we then
execute these deferred requests in turn.

Note that I have tried to make this a bit more intelligent in that it will not
queue up more than 1 request for the same module to be reloaded, and if a
general reload request comes in ('module reload') the queue is flushed and we
only issue a single deferred reload for the entire system.

As for how this will impact existing installations - Before 13778, a reload
issued before module initialization was completed would result in a deadlock.
After 13778, you simply couldn't connect to the manager during startup (which
causes problems with #exec-that-calls-AMI configuration files).  I believe this
is a good general purpose solution that won't negatively impact existing
installations.

(closes issue #15189)
(closes issue #13778)
Reported by: p_lindheimer
Patches:
      06032009_15189_deferred_reloads.diff uploaded by seanbright (license 71)
Tested by: p_lindheimer, seanbright

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

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

16 years agoFix a possible crash in pbx_spool.
Sean Bright [Wed, 3 Jun 2009 20:39:10 +0000 (20:39 +0000)] 
Fix a possible crash in pbx_spool.

We were trying to reference members of a struct that had previously been freed.
This patch makes sure that we free the struct after it has been removed from
the spooler queue.

(closes issue #15072)
Reported by: garlew
Patches:
      spool.diff uploaded by garlew (license 376)

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

16 years agoGeneric call forward api, ast_call_forward()
David Vossel [Wed, 3 Jun 2009 15:49:46 +0000 (15:49 +0000)] 
Generic call forward api, ast_call_forward()

The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string.  After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one.  I have included this api call in both channel.c's ast_request_and_dial() and res_feature.c's feature_request_and_dial().  App_dial and app_queue already contain call forward logic specific for their application and options.

(closes issue #13630)
Reported by: festr

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

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

16 years agoIf using the old deprecated format, a reload would cause the class to disappear.
Tilghman Lesher [Mon, 1 Jun 2009 20:07:04 +0000 (20:07 +0000)] 
If using the old deprecated format, a reload would cause the class to disappear.
(closes issue #14759)
 Reported by: lidocaineus
 Patches:
       20090518__issue14759.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen

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

16 years agoProperly terminate AMI JabberSend response messages.
Sean Bright [Sat, 30 May 2009 19:36:20 +0000 (19:36 +0000)] 
Properly terminate AMI JabberSend response messages.

The response message (either Error or Success) needs an extra trailing \r\n
after the fields to inform the client that the message is complete.

(closes issue #14876)
Reported by: srt
Patches:
      05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
      asterisk_14876.patch uploaded by srt (license 378)
      trunk-14876-2.diff uploaded by phsultan (license 73)

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

16 years agoFix a crash that occurred when MWI SMDI messages expired.
Russell Bryant [Sat, 30 May 2009 03:42:46 +0000 (03:42 +0000)] 
Fix a crash that occurred when MWI SMDI messages expired.

(closes issue #14561)
Reported by: cmoss28

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

16 years agoTreat an empty FORWARD_CONTEXT the same way we treat a missing one.
Sean Bright [Sat, 30 May 2009 02:46:41 +0000 (02:46 +0000)] 
Treat an empty FORWARD_CONTEXT the same way we treat a missing one.

(closes issue #15056)
Reported by: p_lindheimer
Patches:
      05292009_bug15056.diff uploaded by seanbright (license 71)
Tested by: p_lindheimer

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

16 years agoUse AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.
Matthew Nicholson [Fri, 29 May 2009 18:53:01 +0000 (18:53 +0000)] 
Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.

This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels.

(closes issue #12946)
Reported by: meral
Patches:
      null-cdr2.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, dbrooks

(closes issue #15122)
Reported by: sum
Tested by: sum

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

16 years agoFix 'make config' target for Slackware.
Sean Bright [Fri, 29 May 2009 18:14:12 +0000 (18:14 +0000)] 
Fix 'make config' target for Slackware.

There was a missing semi-colon after the echo statement in the Makefile that was
causing problems for some users.  Fix suggested by reporter.

(closes issue #15225)
Reported by: pdavis

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

16 years agoUpdate MixMonitor documentation.
Leif Madsen [Thu, 28 May 2009 23:57:00 +0000 (23:57 +0000)] 
Update MixMonitor documentation.

Updated the MixMonitor documentation for the 'b' option so that
it is more obvious that you must not optimize awat the Local
channel when using this option.

(issue #14829)

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

16 years ago'iax show peer blah' now outputs whether or not peer 'blah' is in trunk mode or not.
David Vossel [Thu, 28 May 2009 15:51:52 +0000 (15:51 +0000)] 
'iax show peer blah' now outputs whether or not peer 'blah' is in trunk mode or not.

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

16 years agoAllow for media to arrive from an alternate source when responding to a reinvite...
Mark Michelson [Thu, 28 May 2009 15:27:49 +0000 (15:27 +0000)] 
Allow for media to arrive from an alternate source when responding to a reinvite with 491.

When we receive a SIP reinvite, it is possible that we may not be able to process the
reinvite immediately since we have also sent a reinvite out ourselves. The problem is
that whoever sent us the reinvite may have also sent a reinvite out to another party,
and that reinvite may have succeeded.

As a result, even though we are not going to accept the reinvite we just received, it
is important for us to not have problems if we suddenly start receiving RTP from a new
source. The fix for this is to grab the media source information from the SDP of the
reinvite that we receive. This information is passed to the RTP layer so that it will
know about the alternate source for media.

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

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

16 years agoUse the address we already know when reloading a peer with nat=yes.
Eliel C. Sardanons [Thu, 28 May 2009 15:21:32 +0000 (15:21 +0000)] 
Use the address we already know when reloading a peer with nat=yes.

If we already have an address for a peer, and we are reloading the sip
configuration, try to use that address to contact the peer, instead of
getting it from the Contact.

(closes issue #15194)
Reported by: ibc
Patches:
      sip.patch uploaded by eliel (license 64)
      Tested by: manwe

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

16 years agoAdd flags to chanspy audiohook so that audio stays in sync.
Mark Michelson [Thu, 28 May 2009 14:49:13 +0000 (14:49 +0000)] 
Add flags to chanspy audiohook so that audio stays in sync.

There are two flags being added to the chanspy audiohook here. One
is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set,
we ensure that the read and write slinfactories on the audiohook do
not skew beyond a certain tolerance.

In addition, there is a new audiohook flag added here,
AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for
a slinfactory to build up a substantial amount of audio before
flushing it. For this particular issue, this means that the person
spying on the call will hear the conversations in real time with very
little delay in the audio.

(closes issue #13745)
Reported by: geoffs
Patches:
      13745.patch uploaded by mmichelson (license 60)
Tested by: snblitz

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

16 years agoFix a bug where the flag indicating the presence of rport would get overwritten by...
Joshua Colp [Thu, 28 May 2009 13:44:58 +0000 (13:44 +0000)] 
Fix a bug where the flag indicating the presence of rport would get overwritten by the nat setting.

The presence of rport is now stored as a separate flag. Once the dialog is setup and authenticated
(or it passes through unauthenticated) the proper nat flag is set.

(closes issue #13823)
Reported by: dimas

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

16 years agoUse bash explicitly when calling build_tools/mkpkgconfig from the Makefile.
Sean Bright [Wed, 27 May 2009 20:12:06 +0000 (20:12 +0000)] 
Use bash explicitly when calling build_tools/mkpkgconfig from the Makefile.

Since we use bashisms in build_tools/mkpkgconfig, we should call on bash
explicitly when running from the Makefile, otherwise we get errors during a
'make install.'

(closes issue #15209)
Reported by: seandarcy

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

16 years agoTypo fix
Olle Johansson [Wed, 27 May 2009 20:07:04 +0000 (20:07 +0000)] 
Typo fix

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