]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
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

16 years agoUse a different determinator on whether to print the delimiter, since leading fields...
Tilghman Lesher [Wed, 27 May 2009 19:09:42 +0000 (19:09 +0000)] 
Use a different determinator on whether to print the delimiter, since leading fields may be blank.
(closes issue #15208)
 Reported by: ramonpeek
 Patch by me, though inspired in part by a patch from ramonpeek

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

16 years agoFix broken attended transfers
Jeff Peeler [Wed, 27 May 2009 16:49:38 +0000 (16:49 +0000)] 
Fix broken attended transfers

The bridge was terminating immediately after the attended transfer was
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.

(closes issue #15183)
Reported by: andrebarbosa
Tested by: andrebarbosa, tootai, loloski

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

16 years agoFix handling of the 'state_interface' option of the 'queue add member' CLI
Sean Bright [Wed, 27 May 2009 13:54:35 +0000 (13:54 +0000)] 
Fix handling of the 'state_interface' option of the 'queue add member' CLI
command.

This change relates to r184980, which was a backport of the state interface
changes to app_queue from trunk.  trunk and all of the 1.6.x branches are not
affected.

'queue add member' allows for specifying an interface to use for device state
when adding a queue member via CLI, but the validation code was not properly
updated to reflect this optional argument.

(closes issue #15198)
Reported by: loloski
Patches:
      05272009_app_queue.diff uploaded by seanbright (license 71)
Tested by: loloski

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

16 years agoResolve a file handle leak.
Russell Bryant [Tue, 26 May 2009 18:14:36 +0000 (18:14 +0000)] 
Resolve a file handle leak.

The frames here should have always been freed.  However, out of luck, there was
never any memory leaked.  However, after file streams became reference counted,
this code would leak the file stream for the file being read.

(closes issue #15181)
Reported by: jkroon

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

16 years agoRemove some bash specific stuff from safe_asterisk.
Joshua Colp [Tue, 26 May 2009 13:06:09 +0000 (13:06 +0000)] 
Remove some bash specific stuff from safe_asterisk.

(closes issue #10812)
Reported by: paravoid
Patches:
      safe_asterisk_bashism.diff uploaded by tzafrir (license 46)

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

16 years agoFix a bug where using immediate with mISDN caused a cause code of 16 to get sent...
Joshua Colp [Fri, 22 May 2009 13:54:17 +0000 (13:54 +0000)] 
Fix a bug where using immediate with mISDN caused a cause code of 16 to get sent back instead of 1 if the 's' extension did not exist.

(closes issue #12286)
Reported by: lmamane

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

16 years agoSign problem calculating timestamp for iax frame leads to no audio on the receiving...
David Vossel [Thu, 21 May 2009 19:04:56 +0000 (19:04 +0000)] 
Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.

There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset.  This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number.  This patch checks for this negative case and sets the ms to zero.  A similar check is already done right below this one in the 'else' statement.

(closes issue #15032)
Reported by: guillecabeza
Patches:
      chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380)
Tested by: guillecabeza

(closes issue #14216)
Reported by: Andrey Sofronov

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

16 years agoThis commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED...
Matthew Nicholson [Thu, 21 May 2009 15:25:50 +0000 (15:25 +0000)] 
This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED from being updated in certain cases.

This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags.  These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected.

This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on.  Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr.  This allows the original cdr record and any forked cdr records to be properly updated with answer and end times.

(closes issue #13797)
Reported by: sh0t
Tested by: sh0t

(closes issue #14744)
Reported by: deepesh

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

16 years agoFix some code that wrongly assumed a pointer would always be non-NULL when dealing...
Joshua Colp [Wed, 20 May 2009 17:30:25 +0000 (17:30 +0000)] 
Fix some code that wrongly assumed a pointer would always be non-NULL when dealing with CDRs after a bridge.

(closes issue #15079)
Reported by: barryf

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

16 years agoFix a bug where the MeetMe option 'D' did not actually prompt for the pin.
Joshua Colp [Wed, 20 May 2009 17:14:00 +0000 (17:14 +0000)] 
Fix a bug where the MeetMe option 'D' did not actually prompt for the pin.

(closes issue #15050)
Reported by: pmhaddad

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

16 years agoEnsure thread keys are initialized before attempting to access them.
Tilghman Lesher [Tue, 19 May 2009 20:12:20 +0000 (20:12 +0000)] 
Ensure thread keys are initialized before attempting to access them.
(closes issue #14889)
 Reported by: jaroth
 Patches:
       app_voicemail.c.patch uploaded by msirota (license 758)
 Tested by: msirota, BlargMaN

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

16 years agoFix a bug where direct RTP setup would partially occur even when disabled if the...
Joshua Colp [Tue, 19 May 2009 14:41:45 +0000 (14:41 +0000)] 
Fix a bug where direct RTP setup would partially occur even when disabled if the calling channel was answered.

(issue #13545)
Reported by: davidw
(issue #14244)
Reported by: mbnwa

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

16 years agoAdd a similar dependency on SMDI for voicemail as already exists for ADSI.
Tilghman Lesher [Mon, 18 May 2009 20:24:13 +0000 (20:24 +0000)] 
Add a similar dependency on SMDI for voicemail as already exists for ADSI.
(closes issue #14846)
 Reported by: pj
 Patches:
       20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
       20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
       20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)

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

16 years agoFix a typo which caused loss of audio when using G729 in some scenarios with a smooth...
Joshua Colp [Mon, 18 May 2009 15:51:22 +0000 (15:51 +0000)] 
Fix a typo which caused loss of audio when using G729 in some scenarios with a smoother present.

(closes issue #15105)
Reported by: bamby
Patches:
      process-vad-correctly.diff uploaded by bamby (license 430)

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

16 years agoFix a bug where the codecs of the called party leg were not properly sent back to...
Joshua Colp [Mon, 18 May 2009 13:53:39 +0000 (13:53 +0000)] 
Fix a bug where the codecs of the called party leg were not properly sent back to the caller call leg when reinvited.

(closes issue #13569)
Reported by: bkw918

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

16 years agoDon't try to unlock a bogus channel.
Russell Bryant [Mon, 18 May 2009 12:57:46 +0000 (12:57 +0000)] 
Don't try to unlock a bogus channel.

(closes issue #15144)
Reported by: cristiandimache

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

16 years agoIAX2 REGAUTH loop
David Vossel [Fri, 15 May 2009 22:43:13 +0000 (22:43 +0000)] 
IAX2 REGAUTH loop

IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.

(Related to Security fix AST-2009-001)

(closes issue #14867)
Reported by: aragon
Tested by: dvossel

(closes issue #14717)
Reported by: mobeck
Patches:
      regauth_loop_update_patch.diff uploaded by dvossel (license 671)
Tested by: dvossel

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

16 years agoFix some spelling fail.
Russell Bryant [Fri, 15 May 2009 18:43:18 +0000 (18:43 +0000)] 
Fix some spelling fail.

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

16 years agoUpdate to previous IAX2 "Ghost" Channels patch.
David Vossel [Fri, 15 May 2009 15:40:37 +0000 (15:40 +0000)] 
Update to previous IAX2 "Ghost" Channels patch.

Fixed some comments made on reviewboard for the previous patch.

(issue #14207)

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

16 years agoIAX2 "Ghost" Channels
David Vossel [Thu, 14 May 2009 22:59:43 +0000 (22:59 +0000)] 
IAX2 "Ghost" Channels

There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.

(closes issue #14207)
Reported by: clive18

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

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

16 years agoUpdate URL to Reviewboard
Kevin P. Fleming [Thu, 14 May 2009 22:23:49 +0000 (22:23 +0000)] 
Update URL to Reviewboard

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