asterisk/asterisk.git
11 years agodocument G.722.1/.1C support
Kevin P. Fleming [Fri, 13 Feb 2009 13:41:52 +0000 (13:41 +0000)]
document G.722.1/.1C support

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

11 years agoAdd basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also...
Kevin P. Fleming [Fri, 13 Feb 2009 13:35:24 +0000 (13:35 +0000)]
Add basic (passthrough, playback, record) support for ITU G.722.1 and G.722.1C (also known as Siren7 and Siren14)

This patch adds passthrough, file recording and file playback support for the codecs listed above, with negotiation over SIP/SDP supported. Due to Asterisk's current limitation of treating a codec/bitrate combination as a unique codec, only G.722.1 at 32 kbps and G.722.1C at 48 kbps are supported.

Along the way, some related work was done:

1) The rtpPayloadType structure definition, used as a return result for an API call in rtp.h, was moved from rtp.c to rtp.h so that the API call was actually usable. The only previous used of the API all was chan_h323.c, which had a duplicate of the structure definition instead of doing it the right way.

2) The hardcoded SDP sample rates for various codecs in chan_sip.c were removed, in favor of storing these sample rates in rtp.c along with the codec definitions there. A new API call was added to allow retrieval of the sample rate for a given codec.

3) Some basic 'a=fmtp' parsing for SDP was added to chan_sip, because chan_sip *must* decline any media streams offered for these codecs that are not at the bitrates that we support (otherwise Bad Things (TM) would result).

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

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

11 years agoadd 'faxbuffers' configuration option information to CHANGES
Dwayne M. Hubbard [Fri, 13 Feb 2009 04:22:35 +0000 (04:22 +0000)]
add 'faxbuffers' configuration option information to CHANGES

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

11 years agoAdd dynamic fax buffer configuration option to chan_dahdi.conf
Dwayne M. Hubbard [Fri, 13 Feb 2009 00:13:38 +0000 (00:13 +0000)]
Add dynamic fax buffer configuration option to chan_dahdi.conf

When the 'faxdetect' configuration option is used, one may also want to use
the 'faxbuffers' configuration option in chan_dahdi.conf.  This option will
dynamically use the configured 'faxbuffers' buffer policy on a channel for
the life of the call following the detection of fax tones.  The faxbuffers
buffer policy will be reverted during call teardown.

An example use of 'faxbuffers' is below.  This example would switch to using
6 buffers with a full buffer policy.

faxbuffers=>6,full

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

11 years agoBlocked revisions 175407 via svnmerge
Mark Michelson [Thu, 12 Feb 2009 23:23:47 +0000 (23:23 +0000)]
Blocked revisions 175407 via svnmerge

........
  r175407 | mmichelson | 2009-02-12 17:22:44 -0600 (Thu, 12 Feb 2009) | 12 lines

  Fix a place where filestreams were not refcounted properly

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

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

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

11 years agoRemove useless string copy, and make sscanf safe again
Russell Bryant [Thu, 12 Feb 2009 21:41:01 +0000 (21:41 +0000)]
Remove useless string copy, and make sscanf safe again

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

11 years agoAdds force encryption option to iax.conf
David Vossel [Thu, 12 Feb 2009 21:27:11 +0000 (21:27 +0000)]
Adds force encryption option to iax.conf

This patch adds forceencryption=yes as an iax.conf option.  When force encryption is enabled, no unencrypted connections are allowed.  This insures all connections are encrypted.  This is a new feature, so CHANGES and iax.conf.sample are updated as well.

(closes issue #13285)
Reported by: sgofferj
Tested by: russell
Review: http://reviewboard.digium.com/r/150/

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

11 years agoMerged revisions 175311 via svnmerge from
Tilghman Lesher [Thu, 12 Feb 2009 21:25:14 +0000 (21:25 +0000)]
Merged revisions 175311 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175311 | tilghman | 2009-02-12 15:19:40 -0600 (Thu, 12 Feb 2009) | 9 lines

  Fix crashes when receiving certain T.38 packets.  Also, increase the maximum
  size of T.38 packets and warn users when they try to set the limits above those
  maximums.
  (closes issue #13050)
   Reported by: schern
   Patches:
         20090212__bug13050.diff.txt uploaded by Corydon76 (license 14)
   Tested by: schern
........

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

11 years agoMerged revisions 175294 via svnmerge from
Jeff Peeler [Thu, 12 Feb 2009 20:48:56 +0000 (20:48 +0000)]
Merged revisions 175294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175294 | jpeeler | 2009-02-12 14:34:36 -0600 (Thu, 12 Feb 2009) | 9 lines

  Fix ParkedCall event information for From field in the case of a blind transfer

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

  Closes AST-189
........

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

11 years agoAvoid using ast_strdupa() in a loop.
Russell Bryant [Thu, 12 Feb 2009 20:45:47 +0000 (20:45 +0000)]
Avoid using ast_strdupa() in a loop.

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

11 years agoDon't enable something by default that has a dependency on something _not_ enabled...
Russell Bryant [Thu, 12 Feb 2009 19:11:08 +0000 (19:11 +0000)]
Don't enable something by default that has a dependency on something _not_ enabled by default.

menuselect was not happy with this.

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

11 years agocorrect warning message to not refer specifically to DAHDI
Kevin P. Fleming [Thu, 12 Feb 2009 18:48:52 +0000 (18:48 +0000)]
correct warning message to not refer specifically to DAHDI

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

11 years agoMerged revisions 175187 via svnmerge from
Jeff Peeler [Thu, 12 Feb 2009 18:00:11 +0000 (18:00 +0000)]
Merged revisions 175187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r175187 | jpeeler | 2009-02-12 11:57:10 -0600 (Thu, 12 Feb 2009) | 6 lines

  Fix crash in event of failed attempt to transfer to parking

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

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

11 years agoSetting key rotation to be off by default
David Vossel [Thu, 12 Feb 2009 17:07:17 +0000 (17:07 +0000)]
Setting key rotation to be off by default

Key rotation breaks compatibility between (trunk/1.6.1) and (1.2/1.4/1.6.0).  As a follow up to this, I am investigating possible ways to allow key rotation to be on by default and not affect the other branches, but for now it must be turned off.

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

11 years agoMerged revisions 175124 via svnmerge from
Russell Bryant [Thu, 12 Feb 2009 16:57:25 +0000 (16:57 +0000)]
Merged revisions 175124 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r175124 | russell | 2009-02-12 10:51:13 -0600 (Thu, 12 Feb 2009) | 27 lines

Don't send DTMF for infinite time if we do not receive an END event.

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

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

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

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

Code from svn/asterisk/team/russell/issue_14460

(closes issue #14460)
Reported by: moliveras

........

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

11 years agoMake lock information for ao2_trylock be more useful and gnarly
Mark Michelson [Thu, 12 Feb 2009 16:28:06 +0000 (16:28 +0000)]
Make lock information for ao2_trylock be more useful and gnarly

Core show locks information involving an ao2_trylock did not
show the function that called ao2_trylock, but would instead
show ao2_trylock as the source of the lock. This is not useful
when trying to debug locking issues.

One bizarre note is that this logic is already in 1.4 but somehow
did not get merged to trunk or the 1.6.X branches.

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

11 years agoIssue a warning message if our candidate's IP is the loopback address.
Philippe Sultan [Thu, 12 Feb 2009 14:25:03 +0000 (14:25 +0000)]
Issue a warning message if our candidate's IP is the loopback address.

(closes issue #13985)
Reported by: jcovert
Tested by: phsultan

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

11 years agoMerged revisions 175029 via svnmerge from
Philippe Sultan [Thu, 12 Feb 2009 10:31:36 +0000 (10:31 +0000)]
Merged revisions 175029 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r175029 | phsultan | 2009-02-12 11:16:21 +0100 (Thu, 12 Feb 2009) | 12 lines

Set the initiator attribute to lowercase in our replies when receiving calls.

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

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

........

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

11 years agoFix a bit of odd logic for announcing position. Sync with 1.6.0's logic
Mark Michelson [Wed, 11 Feb 2009 23:12:57 +0000 (23:12 +0000)]
Fix a bit of odd logic for announcing position. Sync with 1.6.0's logic

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

11 years agoFix odd "thank you" sound playing behavior in app_queue.c
Mark Michelson [Wed, 11 Feb 2009 23:03:08 +0000 (23:03 +0000)]
Fix odd "thank you" sound playing behavior in app_queue.c

If someone has configured the queue to play an position or holdtime
announcement, then it is odd and potentially unexpected to hear a
"Thank you for your patience" sound when no position or holdtime
was actually announced.

This fixes the announcement so that the "thanks" sound is only played
in the case that a position or holdtime was actually announced.

There is a way that the "thank you" sound can be played without a
position or holdtime, and that is to set announce-frequency to a value
but keep announce-position and announce-holdtime both turned off.

(closes issue #14227)
Reported by: caspy
Patches:
      14227_v3.patch uploaded by putnopvut (license 60)
Tested by: caspy

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

11 years agoFix 'd' option for app_dial and add new option to Answer application
Mark Michelson [Wed, 11 Feb 2009 22:41:01 +0000 (22:41 +0000)]
Fix 'd' option for app_dial and add new option to Answer application

The 'd' option would not work for channel types which use RTP to transport
DTMF digits. The only way to allow for this to work was to answer the channel
if we saw that this option was enabled.

I realized that this may cause issues with CDRs, specifically with giving false
dispositions and answer times. I therefore modified ast_answer to take another
parameter which would tell if the CDR should be marked answered.

I also extended this to the Answer application so that the channel may be answered
but not CDRified if desired.

I also modified app_dictate and app_waitforsilence to only answer the channel if it
is not already up, to help not allow for faulty CDR answer times.

All of these changes are going into Asterisk trunk. For 1.6.0 and 1.6.1, however, all
the changes except for the change to the Answer application will go in since we do
not introduce new features into stable branches

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

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

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

11 years agoBlocked revisions 174885 via svnmerge
Tilghman Lesher [Wed, 11 Feb 2009 20:55:46 +0000 (20:55 +0000)]
Blocked revisions 174885 via svnmerge

........
  r174885 | tilghman | 2009-02-11 14:54:18 -0600 (Wed, 11 Feb 2009) | 13 lines

  Restore a behavior that was recently changed, when we fixed issue #13962 and
  issue #13363 (related to issue #6176).  When a hangup occurs during a Macro
  execution in earlier 1.4, the h extension would execute within the Macro
  context, whereas it was always supposed to execute only within the main context
  (where Macro was called).  So this fix checks for an "h" extension in the
  deepest macro context where a hangup occurred; if it exists, that "h" extension
  executes, otherwise the main context "h" is executed.
  (closes issue #14122)
   Reported by: wetwired
   Patches:
         20090210__bug14122.diff.txt uploaded by Corydon76 (license 14)
   Tested by: andrew
........

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

11 years agoTell the device state core a change happened when a channel is freed but not a specif...
Joshua Colp [Wed, 11 Feb 2009 14:44:47 +0000 (14:44 +0000)]
Tell the device state core a change happened when a channel is freed but not a specific state.
We need to do this because while we know that the freeing of the channel may cause something to become
not in use we do not know this for sure. There may be another channel that is still up which would cause
it to be in use.
(closes issue #13238)
Reported by: kowalma
Patches:
      20090121__bug13238.diff.txt uploaded by Corydon76 (license 14)
Tested by: alecdavis

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

11 years agoFix potential for stack overflows in app_chanspy.c
Mark Michelson [Tue, 10 Feb 2009 23:17:03 +0000 (23:17 +0000)]
Fix potential for stack overflows in app_chanspy.c

When using the 'g' or 'e' options, the stack allocations that
were used could cause a stack overflow if a spyer stayed on the
line long enough without actually successfully spying on anyone.

The problem has been corrected by using static buffers and copying
the contents of the appropriate strings into them instead of using
functions like alloca or ast_strdupa

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

11 years agoFix an fd leak that would occur in HTTP AMI sessions
Mark Michelson [Tue, 10 Feb 2009 21:45:14 +0000 (21:45 +0000)]
Fix an fd leak that would occur in HTTP AMI sessions

The explanation behind this fix is a bit complicated, and I've already
typed it up in the code as a huge comment inside of manager.c, so I'll
give the abridged version here.

We needed a way to separate action-specific data from session-specific data.
Unfortunately, the only way to maintain API compatibility and to not have to
change every single manager action was to rename the current mansession structure
and wrap it inside a new mansession structure which actually contains action-
specific data.

(closes issue #14364)
Reported by: awk
Patches:
      14364_better.patch uploaded by putnopvut (license 60)
Tested by: putnopvut

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

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

11 years agoOnly decrease inringing count if above zero.
Joshua Colp [Tue, 10 Feb 2009 20:15:43 +0000 (20:15 +0000)]
Only decrease inringing count if above zero.
(issue #13238)
Reported by: kowalma

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

11 years agoimprove slinfactory API to remove implicit sample rate and require explicit sample...
Kevin P. Fleming [Tue, 10 Feb 2009 19:38:26 +0000 (19:38 +0000)]
improve slinfactory API to remove implicit sample rate and require explicit sample rate selection by creator of the slinfactory

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

11 years agoBlocked revisions 174644 via svnmerge
Joshua Colp [Tue, 10 Feb 2009 18:57:30 +0000 (18:57 +0000)]
Blocked revisions 174644 via svnmerge

........
  r174644 | file | 2009-02-10 14:50:50 -0400 (Tue, 10 Feb 2009) | 6 lines

  Go off hold when we get an empty reinvite telling us to.
  (closes issue #14448)
  Reported by: frawd
  Patches:
        hold_invite_nosdp.patch uploaded by frawd (license 610)
........

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

11 years agoMerged revisions 174583 via svnmerge from
Matthew Nicholson [Tue, 10 Feb 2009 18:16:31 +0000 (18:16 +0000)]
Merged revisions 174583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r174583 | mnicholson | 2009-02-10 11:52:42 -0600 (Tue, 10 Feb 2009) | 18 lines

  Improve behavior of jitterbuffer when maxjitterbuffer is set.

  This change improves the way the jitterbuffer handles maxjitterbuffer and
  dramatically reduces the number of frames dropped when maxjitterbuffer is
  exceeded.  In the previous jitterbuffer, when maxjitterbuffer was exceeded, all
  new frames were dropped until the jitterbuffer is empty.  This change modifies
  the code to only drop frames until maxjitterbuffer is no longer exceeded.

  Also, previously when maxjitterbuffer was exceeded, dropped frames were not
  tracked causing stats for dropped frames to be incorrect, this change also
  addresses that problem.

  (closes issue #14044)
  Patches:
        bug14044-1.diff uploaded by mnicholson (license 96)
  Tested by: mnicholson
  Review: http://reviewboard.digium.com/r/144/
........

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

11 years agoSet the type for the peer structure to be a peer as the default.
Joshua Colp [Tue, 10 Feb 2009 17:48:29 +0000 (17:48 +0000)]
Set the type for the peer structure to be a peer as the default.
(closes issue #14447)
Reported by: triccyx

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

11 years agoMake the logic for inuse and inringing manipluation match that of 1.4. The old broken...
Joshua Colp [Tue, 10 Feb 2009 15:37:07 +0000 (15:37 +0000)]
Make the logic for inuse and inringing manipluation match that of 1.4. The old broken logic would reset the values back to 0 during certain scenarios causing the wrong state to be reported.
(closes issue #14399)
Reported by: caspy
(issue #13238)
Reported by: kowalma

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

11 years agoFix0ring build
Tilghman Lesher [Tue, 10 Feb 2009 07:06:29 +0000 (07:06 +0000)]
Fix0ring build

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

11 years agoRemove the usage of the KeepAlive app, as it no longer exists.
Tilghman Lesher [Tue, 10 Feb 2009 05:39:33 +0000 (05:39 +0000)]
Remove the usage of the KeepAlive app, as it no longer exists.

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

11 years agoThis patch removes the use of AST_PBX_KEEPALIVE
Steve Murphy [Tue, 10 Feb 2009 04:49:02 +0000 (04:49 +0000)]
This patch removes the use of AST_PBX_KEEPALIVE
from app_rpt.c.

(closes issue #14435)
Reported by: D_McNaul

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

11 years agoMore intptr_t work.
Steve Murphy [Tue, 10 Feb 2009 04:36:22 +0000 (04:36 +0000)]
More intptr_t work.

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

11 years agoMerged revisions 174369 via svnmerge from
Steve Murphy [Tue, 10 Feb 2009 02:45:56 +0000 (02:45 +0000)]
Merged revisions 174369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r174369 | murf | 2009-02-09 19:27:40 -0700 (Mon, 09 Feb 2009) | 5 lines

  This patch solves some compiler complaints
  in both 32 and 64-bit environments.
........

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

11 years agoFix something I messed up in the merge I just did
Mark Michelson [Mon, 9 Feb 2009 17:27:32 +0000 (17:27 +0000)]
Fix something I messed up in the merge I just did

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

11 years agoFixes issue with hangups not being sent and external process never terminating.
David Vossel [Mon, 9 Feb 2009 17:26:02 +0000 (17:26 +0000)]
Fixes issue with hangups not being sent and external process never terminating.

The ignore_hangup, run_dead, and noanswer flags were never initilized to zero causing hangups to never be issued.  If the external script expects to be notified of a hangup and never receives one, it runs indefinitely.

(closes issue #14251)
Reported by: chris-mac
Tested by: dvossel

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

11 years agoMerged revisions 174282 via svnmerge from
Mark Michelson [Mon, 9 Feb 2009 17:20:55 +0000 (17:20 +0000)]
Merged revisions 174282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r174282 | mmichelson | 2009-02-09 11:11:05 -0600 (Mon, 09 Feb 2009) | 12 lines

Don't do an SRV lookup if a port is specified

RFC 3263 says to do A record lookups on a hostname
if a port has been specified, so that's what we're
going to do. See section 4.2.

(closes issue #14419)
Reported by: klaus3000
Patches:
      patch_chan_sip_nosrvifport_1.4.23.txt uploaded by klaus3000 (license 65)

........

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

11 years agoMerged revisions 174218 via svnmerge from
Joshua Colp [Mon, 9 Feb 2009 14:49:24 +0000 (14:49 +0000)]
Merged revisions 174218 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r174218 | file | 2009-02-09 10:48:21 -0400 (Mon, 09 Feb 2009) | 4 lines

  Don't overwrite our pointer to the music class when music on hold stops. We will use this if it starts again to see if we can resume the music where it left off.
  (closes issue #14407)
  Reported by: mostyn
........

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

11 years agoMerged revisions 174148 via svnmerge from
Russell Bryant [Sat, 7 Feb 2009 16:16:50 +0000 (16:16 +0000)]
Merged revisions 174148 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r174148 | russell | 2009-02-07 10:15:07 -0600 (Sat, 07 Feb 2009) | 2 lines

Fix a race condition that could cause a crash.

........

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

11 years agoMerged revisions 174082 via svnmerge from
Dwayne M. Hubbard [Fri, 6 Feb 2009 23:51:56 +0000 (23:51 +0000)]
Merged revisions 174082 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r174082 | dhubbard | 2009-02-06 17:36:03 -0600 (Fri, 06 Feb 2009) | 5 lines

check ast_strlen_zero() before calling ast_strdupa() in sip_uri_headers_cmp()
and sip_uri_params_cmp()

The reporter didn't actually upload a properly-formed patch, instead a
modified chan_sip.c file was uploaded.  I created a patch to determine the
changes, then modified the suggested changes to create a proper fix.  The
summary above is a complete description of the changes.

(closes issue #13547)
Reported by: tecnoxarxa
Patches:
      chan_sip.c.gz uploaded by tecnoxarxa (license 258)
Tested by: tecnoxarxa

........

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

11 years agoAdds immediate yes/no option to iax.conf
David Vossel [Fri, 6 Feb 2009 20:12:33 +0000 (20:12 +0000)]
Adds immediate yes/no option to iax.conf

This is very similar to the DAHDI immediate=yes option.  When the phone is picked up, instead of giving a dialtone it connects directly to the "s" extension.  Changes where implemented in chan_iax2.c to directly connect to the "s" extension in the appropriate context when this option is enabled.  Examples explaining its use are added to iax2.conf.sample.  CHANGES has been updated as well.

(closes issue #14266)
Reported by: jcovert
Patches:
      chan_iax2.c.patch-trunk uploaded by jcovert (license 551)
      iax.conf.sample.patch uploaded by jcovert (license 551)
Tested by: jcovert, dvossel
Review: http://reviewboard.digium.com/r/143/

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

11 years agoDon't subscribe to a mailbox on pseudo channels. It is futile. This solves an issue...
Joshua Colp [Fri, 6 Feb 2009 19:28:53 +0000 (19:28 +0000)]
Don't subscribe to a mailbox on pseudo channels. It is futile. This solves an issue where duplicated pseudo channels would cause a crash because the first one would unsubscribe and the next one would also try to unsubscribe the same subscription.
(closes issue #14322)
Reported by: amessina

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

11 years agoMerged revisions 173967-173968 via svnmerge from
Joshua Colp [Fri, 6 Feb 2009 17:18:35 +0000 (17:18 +0000)]
Merged revisions 173967-173968 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173967 | file | 2009-02-06 13:14:15 -0400 (Fri, 06 Feb 2009) | 4 lines

  Some clients do not put the call-id for replaces at the beginning, so support it being anywhere in the string.
  (closes issue #14350)
  Reported by: fhackenberger
........
  r173968 | file | 2009-02-06 13:15:01 -0400 (Fri, 06 Feb 2009) | 2 lines

  Remove a debug message I put in by accident.
........

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

11 years agoMerged revisions 173917 via svnmerge from
Matthew Nicholson [Fri, 6 Feb 2009 16:28:19 +0000 (16:28 +0000)]
Merged revisions 173917 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173917 | mnicholson | 2009-02-06 10:20:23 -0600 (Fri, 06 Feb 2009) | 7 lines

  Limit the addition of the Contact header in SIP responses according to various
  SIP RFCs.

  (closes issue #13602)
  Reported by: hjourdain
  Tested by: mnicholson
........

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

11 years agoAlways detach and destroy the whisper and barge audiohooks. Additionally also allow...
Joshua Colp [Fri, 6 Feb 2009 15:59:17 +0000 (15:59 +0000)]
Always detach and destroy the whisper and barge audiohooks. Additionally also allow an audiohook to be detached if it has not been attached.
(closes issue #14414)
Reported by: bluecrow76

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

11 years agoBlocked revisions 173900 via svnmerge
Tilghman Lesher [Fri, 6 Feb 2009 15:44:23 +0000 (15:44 +0000)]
Blocked revisions 173900 via svnmerge

........
  r173900 | tilghman | 2009-02-06 09:43:32 -0600 (Fri, 06 Feb 2009) | 3 lines

  Backport OS X fix from trunk
  (AGAIN, closes issue #14360)
........

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

11 years agoAdd a common implementation of a scheduler context with a dedicated thread.
Russell Bryant [Fri, 6 Feb 2009 10:55:35 +0000 (10:55 +0000)]
Add a common implementation of a scheduler context with a dedicated thread.

This commit expands the Asterisk scheduler API to include a common implementation
of a scheduler context being processed by a dedicated thread.  chan_iax2 has been
updated to use this new code.  Also, as a result, this resolves some race
conditions related to the previous chan_iax2 scheduler handling.

Related to rev 171452 which resolved the same issues in 1.4.

Code from team/russell/sched_thread2

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

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

11 years agoResolve a memory leak that would occur on an invalid channel given to Action: Status
Russell Bryant [Fri, 6 Feb 2009 10:25:09 +0000 (10:25 +0000)]
Resolve a memory leak that would occur on an invalid channel given to Action: Status

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

11 years agoUpdate extensions.conf.sample to be correct.
Mark Michelson [Thu, 5 Feb 2009 23:48:48 +0000 (23:48 +0000)]
Update extensions.conf.sample to be correct.

In trunk, the only necessary change pointed out was that the call
to ChanIsAvail uses an option that has been removed.

For the 1.6.1 branch, however, it appears that the sample file is
badly in need of updating since there are |'s used all over the place
there. My tentative plan is just to copy trunk's sample config file
to those branches since the info there is most up-to-date and should
be correct for use in 1.6.1

Thanks to macli in #asterisk-dev for bringing this up

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

11 years agoProperly set "seen" and "unseen" flags when moving messages from the new to the old...
Mark Michelson [Thu, 5 Feb 2009 23:28:19 +0000 (23:28 +0000)]
Properly set "seen" and "unseen" flags when moving messages from the new to the old folder when using IMAP for voicemail storage

(closes issue #13905)
Reported by: jaroth
Patches:
      foldermove_v2.patch uploaded by jaroth (license 50)

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

11 years agoBlocked revisions 173770 via svnmerge
Mark Michelson [Thu, 5 Feb 2009 23:19:51 +0000 (23:19 +0000)]
Blocked revisions 173770 via svnmerge

........
r173770 | mmichelson | 2009-02-05 17:19:16 -0600 (Thu, 05 Feb 2009) | 20 lines

Fix logic regarding when to perform an SRV lookup for outgoing REGISTER requests

With this fix, we only will perform an SRV lookup at the following times:

* The first time we register with a remote registrar
* If we send a REGISTER but do not receive a response
* If the sendto() function returns an error

While I wrote the patch that fixes this issue, a huge amount of credit is due
to Brett Bryant, who wrote the initial patch on which I based this one.

(closes issue #12312)
Reported by: jrast
Patches:
      12312.patch uploaded by putnopvut (license 60)
Tested by: blitzrage

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

........

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

11 years agoMerged revisions 173696 via svnmerge from
Jeff Peeler [Thu, 5 Feb 2009 21:00:26 +0000 (21:00 +0000)]
Merged revisions 173696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173696 | jpeeler | 2009-02-05 14:47:51 -0600 (Thu, 05 Feb 2009) | 12 lines

  Add new configuration option to make shared IMAP mailboxes function as expected.

  The new option is "imapvmshareid" which is an ID to tag multiple mailboxes
  using the same IMAP storage location to function as one mailbox. This allows
  all messages to be retrieved for any user in the group. The patch alters the
  'X-Asterisk-VM-Extension' header that is responsible for matching voicemails
  for a given user.

  (closes issue #13673)
  Reported by: howardwilkinson
........

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

11 years agoMerged revisions 173692 via svnmerge from
Mark Michelson [Thu, 5 Feb 2009 20:30:45 +0000 (20:30 +0000)]
Merged revisions 173692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173692 | mmichelson | 2009-02-05 14:29:09 -0600 (Thu, 05 Feb 2009) | 12 lines

Fix situations where queue members could be autopaused unexpectedly

Specifically, this patch prevents us from autopausing members when
we receive a busy or congestion frame from them.

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

........

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

11 years agoChange the first field, or we don't get the necessary field separation.
Tilghman Lesher [Thu, 5 Feb 2009 19:36:29 +0000 (19:36 +0000)]
Change the first field, or we don't get the necessary field separation.

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

11 years agoMerged revisions 173592 via svnmerge from
Mark Michelson [Thu, 5 Feb 2009 18:48:55 +0000 (18:48 +0000)]
Merged revisions 173592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173592 | mmichelson | 2009-02-05 12:47:24 -0600 (Thu, 05 Feb 2009) | 3 lines

Add some missing cleanup to app_mixmonitor

........

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

11 years agoMerged revisions 173559 via svnmerge from
Mark Michelson [Thu, 5 Feb 2009 18:34:06 +0000 (18:34 +0000)]
Merged revisions 173559 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173559 | mmichelson | 2009-02-05 11:34:33 -0600 (Thu, 05 Feb 2009) | 25 lines

Fix a problem where a channel pointer becomes invalid due to masquerading or hanging up.

app_mixmonitor runs its own thread to monitor the channel's activity and write the mixed
audio to a file. Since this thread runs independently of the channel, it is possible that
the mixmonitor thread's channel pointer will point to freed memory when the channel either
is masqueraded or hangs up (technically, both cases are hangups, but we need to handle the
cases slightly differently).

The solution for this is to employ a datastore, which has the nice benefit of allowing us
to hook into channel masquerades and hangups and update our pointer as necessary. If this
looks familiar, this same technique is employed in app_chanspy. app_chanspy is a bit more
involved since it does a lot more operations on the channel that is being spied upon.

app_mixmonitor does have an extra touch that app_chanspy doesn't have, though. Since there
is a thread race between the channel's thread and the mixmonitor thread on a hangup, we em-
ploy a condition-and-boolean combination to ensure that the channel thread finishes with
our structure before the mixmonitor thread attempts to free it. No crashes!

(closes issue #14374)
Reported by: aragon
Patches:
  14374.patch uploaded by putnopvut (license 60)
Tested by: aragon, putnopvut

........

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

11 years agoFix some areas where the incorrect interface was passed to ast_device_state
Mark Michelson [Wed, 4 Feb 2009 22:16:19 +0000 (22:16 +0000)]
Fix some areas where the incorrect interface was passed to ast_device_state

I swear it feels like I already did this once...

(closes issue #14359)
Reported by: francesco_r

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

11 years agoAdd XML documentation for the applications and functions in res_jabber
Tilghman Lesher [Wed, 4 Feb 2009 21:26:15 +0000 (21:26 +0000)]
Add XML documentation for the applications and functions in res_jabber
(closes issue #14405)
 Reported by: snuffy
 Patches:
       xml_jabber.diff uploaded by snuffy (license 35)

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

11 years agoFixes issue with IAX2 transfer not handing off calls. Reverts changes in 116884
David Vossel [Wed, 4 Feb 2009 21:25:14 +0000 (21:25 +0000)]
Fixes issue with IAX2 transfer not handing off calls. Reverts changes in 116884

Fixes issue with IAX2 transfers not taking place. As it was, a call that was being transfered would never be handed off correctly to the call ends because of how call numbers were stored in a hash table. The hash table, "iax_peercallno_pvt", storing all the current call numbers did not take into account the complications associated with transferring a call, so a separate hash table was required. This second hash table "iax_transfercallno_pvt" handles calls being transfered, once the call transfer is complete the call is removed from the transfer hash table and added to the peer hash table resuming normal operations. Addition functions were created to handle storing, removing, and comparing items in the iax_transfercallno_pvt table. The changes reverted in 116884 caused backwards compatibility issues involving iax2 transfer with 1.6.0, 1.4, and 1.2.

(closes issue #13468)
Reported by: nicox
Tested by: dvossel

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

11 years agoMerged revisions 173211 via svnmerge from
Jeff Peeler [Wed, 4 Feb 2009 21:17:53 +0000 (21:17 +0000)]
Merged revisions 173211 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173211 | jpeeler | 2009-02-03 15:57:01 -0600 (Tue, 03 Feb 2009) | 17 lines

  Parking attempts made to one end of a bridge no longer will hang up due to a
  parking failure.

  Parking attempts made using either one-touch, or doing either a blind or
  assisted transfer to the parking extension now keep up the bridge instead of
  hanging up the attempted parked party. Normal causes for the parking attempt
  to fail includes the specific specified extension (via PARKINGEXTEN) not being
  available or if all the parking spaces are currently in use. To avoid having
  to reverse a masquerade park_space_reserve was made to provide foresight if
  a parking attempt will succeed and if so reserve the parking space.

  (closes issue #13494)
  Reported by: mdu113

  Reviewed by Russell: http://reviewboard.digium.com/r/133/
........

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

11 years agoWhen using a socket as a FILE *, the stdio functions will sometimes try to do
Tilghman Lesher [Wed, 4 Feb 2009 18:48:06 +0000 (18:48 +0000)]
When using a socket as a FILE *, the stdio functions will sometimes try to do
an fseek() on the stream, which is an invalid operation for a socket.  Turning
off buffering explicitly lets the stdio functions know they cannot do this,
thus avoiding a potential error.
(closes issue #14400)
 Reported by: fnordian
 Patches:
       tcptls.patch uploaded by fnordian (license 110)

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

11 years agoMerged revisions 173396 via svnmerge from
Mark Michelson [Wed, 4 Feb 2009 17:45:14 +0000 (17:45 +0000)]
Merged revisions 173396 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173396 | mmichelson | 2009-02-04 11:44:48 -0600 (Wed, 04 Feb 2009) | 3 lines

Revert my previous change because it was stupid

........

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

11 years agoMerged revisions 173392 via svnmerge from
Mark Michelson [Wed, 4 Feb 2009 17:41:02 +0000 (17:41 +0000)]
Merged revisions 173392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r173392 | mmichelson | 2009-02-04 11:40:29 -0600 (Wed, 04 Feb 2009) | 3 lines

Add a missing unlock. Extremely unlikely to ever matter, but it's needed.

........

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

11 years agoFix a problem where file playback would cause fds to remain open forever
Mark Michelson [Wed, 4 Feb 2009 15:30:12 +0000 (15:30 +0000)]
Fix a problem where file playback would cause fds to remain open forever

The problem came from the fact that a frame read from a format interpreter
was not freed. Adding a call to ast_frfree fixed this. The explanation for
why this caused the problem is a bit complex, but here goes:

There was a problem in all versions of Asterisk where the embedded frame
of a filestream structure was referenced after the filestream was freed. This
was fixed by adding reference counting to the filestream structure. The refcount
would increase every time that a filestream's frame pointer was pointing to an
actual frame of data. When the frame was freed, the refcount would decrease. Once
the refcount reached 0, the filestream was freed, and as part of the operation,
the open files were closed as well.

Thus it becomes more clear why a missing ast_frfree would cause a reference leak
and cause the files to not be closed. You may ask then if there was a frame leak
before this patch. The answer to that is actually no! The filestream code was
"smart" enough to know that since the frame we received came from a format interpreter,
the frame had no malloced data and thus didn't need to be freed. Now, however, there
is cleanup that needs to be done when we finish with the frame, so we do need to
call ast_frfree on the frame to be sure that the refcount for the filestream is
decremented appropriately.

(closes issue #14384)
Reported by: fiddur
Patches:
      14384.patch uploaded by putnopvut (license 60)
Tested by: fiddur, putnopvut

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

11 years agoEnsure that commas placed in the middle of extension character classes do not
Tilghman Lesher [Wed, 4 Feb 2009 00:43:52 +0000 (00:43 +0000)]
Ensure that commas placed in the middle of extension character classes do not
interfere with correct parsing of the extension.  Also, if an unterminated
character class DOES make its way into the pbx core (through some other
method), ensure that it does not crash Asterisk.
(closes issue #14362)
 Reported by: Nick_Lewis
 Patches:
       20090129__bug14362.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

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

11 years agoBlocked revisions 173248 via svnmerge
David Vossel [Tue, 3 Feb 2009 23:39:14 +0000 (23:39 +0000)]
Blocked revisions 173248 via svnmerge

........
  r173248 | dvossel | 2009-02-03 17:35:55 -0600 (Tue, 03 Feb 2009) | 6 lines

  Fixes issue with IAX2 transfer not handing off calls.

  Fixes issue with IAX2 transfers not taking place.  As it was, a call that was being transfered would never be handed off correctly to the call ends because of how call numbers were stored in a hash table.  The hash table, "iax_peercallno_pvt", storing all the current call numbers did not take into account the complications associated with transferring a call, so a separate hash table was required.  This second hash table "iax_transfercallno_pvt" handles calls being transfered, once the call transfer is complete the call is removed from the transfer hash table and added to the peer hash table resuming normal operations. Addition functions were created to handle storing, removing, and comparing items in the iax_transfercallno_pvt table.

  (issue #13468)
Review: http://reviewboard.digium.com/r/140/
........

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

11 years agoBroke up the large conditional blocks so it is easy to see if a function is compiled.
Richard Mudgett [Tue, 3 Feb 2009 17:35:37 +0000 (17:35 +0000)]
Broke up the large conditional blocks so it is easy to see if a function is compiled.

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

11 years ago1. Make OS X compile cleanly with app_stack.
Tilghman Lesher [Tue, 3 Feb 2009 00:29:49 +0000 (00:29 +0000)]
1. Make OS X compile cleanly with app_stack.
2. Use curl to download sound files, as curl is installed natively on OS X,
whereas wget and fetch are not.
(closes issue #14332)
 Reported by: oej
 Tested by: Corydon76

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

11 years agoMerged revisions 173070 via svnmerge from
Tilghman Lesher [Tue, 3 Feb 2009 00:24:52 +0000 (00:24 +0000)]
Merged revisions 173070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173070 | tilghman | 2009-02-02 18:15:59 -0600 (Mon, 02 Feb 2009) | 5 lines

  Add warning to standard config, that globals may be overridden by other
  dialplan configuration files.
  (closes issue #14388)
   Reported by: macli
........

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

11 years agoMerged revisions 173066 via svnmerge from
Terry Wilson [Mon, 2 Feb 2009 23:57:25 +0000 (23:57 +0000)]
Merged revisions 173066 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r173066 | twilson | 2009-02-02 17:48:06 -0600 (Mon, 02 Feb 2009) | 2 lines

  Fix a feature inheritance bug I added after code review
........

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

11 years agoReverting commit number 173028 as there are some
Mark Michelson [Mon, 2 Feb 2009 23:21:33 +0000 (23:21 +0000)]
Reverting commit number 173028 as there are some
potential issues

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

11 years agoAdd a CLI command to log out a manager user
Mark Michelson [Mon, 2 Feb 2009 23:10:47 +0000 (23:10 +0000)]
Add a CLI command to log out a manager user

(closes issue #13877)
Reported by: eliel
Patches:
      cli_manager_logout.patch.txt uploaded by eliel (license 64)
Tested by: eliel, putnopvut

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

11 years agoRecorded merge of revisions 172962 via svnmerge from
Richard Mudgett [Mon, 2 Feb 2009 20:40:27 +0000 (20:40 +0000)]
Recorded merge of revisions 172962 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172962 | rmudgett | 2009-02-02 14:28:54 -0600 (Mon, 02 Feb 2009) | 11 lines

  channels/chan_dahdi.c
  *  Added doxygen comments to the major dahdi structures.
  *  Fixed PRI using an incorrect string value if the extension
  delimiter is not present in the Dial() function.
  *  Fixed some uninitialized string variables on FXS ports.

  configs/chan_dahdi.conf.sample
  *  Updated some documentation.

  These changes are already in trunk -r172400
........

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

11 years agoThis reverts the changes I made for 11583; will
Steve Murphy [Mon, 2 Feb 2009 19:02:24 +0000 (19:02 +0000)]
This reverts the changes I made for 11583; will
reviewboard this before committing again...
reopened 11583 until all Russell's issues are
resolved.

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

11 years agoUpdate the res_ldap.conf file with a better working example.
Leif Madsen [Mon, 2 Feb 2009 18:13:40 +0000 (18:13 +0000)]
Update the res_ldap.conf file with a better working example.

(closes issue #13861)
Reported by: scramatte
Patches:
      __20080110-res_ldap.conf-2.patch uploaded by blitzrage (license 10)
Tested by: jcovert

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

11 years agoThis change allows the disconnect feature (as in "one-touch" in features.c)
Steve Murphy [Mon, 2 Feb 2009 17:37:15 +0000 (17:37 +0000)]
This change allows the disconnect feature (as in "one-touch" in features.c)
to be used within the dial app, before a call is bridged.

Many thanks to sobomax for submitting this patch.

Quoting from bug 11582:

  "So the goal of the patch was to use the user configured feature code during the
   call setup phase. The original ast_feature_interpret() function is not well suited
   for this purpose as it uses much call bridge specific data and doesn't separate a
   detection of feature from a feature handler call. So a new function ast_feature_detect()
   has been extracted off the ast_feature_interpret() function but keeping the original
   logic intact except some insignificant changes to locking.

  "Having created the ast_feature_detect() function the possibility to use feature detection
   in almost any place of the asterisk code. So a call to this function has been added to
   wait_for_answer() function of app_dial.so module. This code doesn't call the feature handler
   however and uses old call leg disconnect logic to make the changes as small and simple as
   possible to prevent unexpected problems. A disconnect feature currently is the only one
   supported during call setup as other features as call parking and call transfer don't make much
   sense during call setup. However if need in some of the features would arise it is much easier to
   implement as the infrastructure changes are already in place with this patch."

I have cleaned up the patch somewhat, and verified that the existing functionality is not
harmed, and that the new functionality works. Terry has committed his stuff, and there were
no conflicts (see 14274).

(closes issue #11583)
Reported by: sobomax
Patches:
      patch-apps__app_dial.c uploaded by sobomax (license 359)
      patch-include__asterisk__features.h uploaded by sobomax (license 359)
      patch-res__res_features.c uploaded by sobomax (license 359)
      enable-features-during-call-setup.diff uploaded by sobomax (license 359)
      11583.newdiff uploaded by murf (license 17)
      enable-features-during-call-setup-1.diff uploaded by sobomax (license 359)
      11583.latest-patch uploaded by murf (license 17)
Tested by: sobomax, murf

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

11 years agoFix a spelling mistake.
Russell Bryant [Mon, 2 Feb 2009 16:42:58 +0000 (16:42 +0000)]
Fix a spelling mistake.

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

11 years agoAdd a todo. I do need to really check what's going on with this kill-the-user busines...
Olle Johansson [Mon, 2 Feb 2009 10:46:19 +0000 (10:46 +0000)]
Add a todo. I do need to really check what's going on with this kill-the-user business ;-)
Why do we suddenly have two flags to set peer type?

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

11 years agoSmall formatting change
Olle Johansson [Mon, 2 Feb 2009 10:44:48 +0000 (10:44 +0000)]
Small formatting change

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

11 years agoAdd some well-needed improvements to the wishlist in the code, so that we can close
Olle Johansson [Mon, 2 Feb 2009 10:29:07 +0000 (10:29 +0000)]
Add some well-needed improvements to the wishlist in the code, so that we can close
some bug reports.

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

11 years agoThe CID lookup feature wasn't actually working properly with dialog-info+xml
Sean Bright [Mon, 2 Feb 2009 01:41:29 +0000 (01:41 +0000)]
The CID lookup feature wasn't actually working properly with dialog-info+xml
supporting devices.  The devices (snoms, specifically) need to receive a SIP
URI instead of just an extension.  This adds that functionality.

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

11 years agoBlank argument crashes Asterisk
Tilghman Lesher [Sun, 1 Feb 2009 02:44:23 +0000 (02:44 +0000)]
Blank argument crashes Asterisk
(closes issue #14377)
 Reported by: amorsen

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

11 years agoDon't increment the loop, now that incrementing is taken care of by the
Tilghman Lesher [Sat, 31 Jan 2009 16:40:59 +0000 (16:40 +0000)]
Don't increment the loop, now that incrementing is taken care of by the
decoder function.
(closes issue #14363)
 Reported by: andrew53
 Patches:
       func_strings_filter.patch uploaded by andrew53 (license 519)

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

11 years agoBlocked revisions 172639 via svnmerge
Terry Wilson [Sat, 31 Jan 2009 00:16:46 +0000 (00:16 +0000)]
Blocked revisions 172639 via svnmerge

........
  r172639 | twilson | 2009-01-30 18:15:09 -0600 (Fri, 30 Jan 2009) | 5 lines

  Rename new parkedcallparking option to parkedcallreparking

  Since this option actually already existed in 1.6.0+, use the same name so as
  not to confuse people when they upgrade
........

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

11 years agoFix redefinition of flag in channel.h
Mark Michelson [Fri, 30 Jan 2009 22:22:04 +0000 (22:22 +0000)]
Fix redefinition of flag in channel.h

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

11 years agoRemove incorrect line from sample config
Terry Wilson [Fri, 30 Jan 2009 21:50:03 +0000 (21:50 +0000)]
Remove incorrect line from sample config

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

11 years agoMerged revisions 172517 via svnmerge from
Terry Wilson [Fri, 30 Jan 2009 21:29:12 +0000 (21:29 +0000)]
Merged revisions 172517 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines

  Fix feature inheritance with builtin features

  When using builtin features like parking and transfers, the AST_FEATURE_* flags
  would not be set correctly for all instances when either performing a builtin
  attended transfer, or parking a call and getting the timeout callback.  Also,
  there was no way on a per-call basis to specify what features someone should
  have on picking up a parked call (since that doesn't involve the Dial() command).
  There was a global option for setting whether or not all users who pickup a
  parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT,
  AUTOMON, or PARKCALL.

  This patch:
  1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the
  dialplan or with setvar in channels that support it.  This variable can be set
  to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the
  equivalent dial options), to set what features should be activated on this
  channel.  The patch moves the setting of the features datastores into the
  bridging code instead of app_dial to help facilitate this.

  2) adds global options parkedcallparking, parkedcallhangup, and
  parkedcallrecording to be similar to the parkedcalltransfers option for
  globally setting features.

  3) has builtin_atxfer call builtin_parkcall if being transfered to the parking
  extension since tracking everything through multiple masquerades, etc. is
  difficult and error-prone

  4) attempts to fix all cases of return calls from parking and completed builtin
  transfers not having the correct permissions
  (closes issue #14274)
  Reported by: aragon
  Patches:
        fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396)
  Tested by: aragon, otherwiseguy

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

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

11 years agoParameter position reversed in documentation
Tilghman Lesher [Fri, 30 Jan 2009 18:36:56 +0000 (18:36 +0000)]
Parameter position reversed in documentation

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

11 years agoMerged revisions 172438 via svnmerge from
Tilghman Lesher [Thu, 29 Jan 2009 23:15:40 +0000 (23:15 +0000)]
Merged revisions 172438 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172438 | tilghman | 2009-01-29 16:54:29 -0600 (Thu, 29 Jan 2009) | 9 lines

  Lose the CAP_NET_ADMIN at every fork, instead of at startup.  Otherwise, if
  Asterisk runs as a non-root user and the administrator does a 'restart now',
  Asterisk loses the ability to set QOS on packets.
  (closes issue #14004)
   Reported by: nemo
   Patches:
         20090105__bug14004.diff.txt uploaded by Corydon76 (license 14)
   Tested by: Corydon76
........

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

11 years agoRemove tabs from comment
Richard Mudgett [Thu, 29 Jan 2009 23:15:20 +0000 (23:15 +0000)]
Remove tabs from comment

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

11 years agochannels/chan_dahdi.c
Richard Mudgett [Thu, 29 Jan 2009 20:38:34 +0000 (20:38 +0000)]
channels/chan_dahdi.c
*  Added doxygen comments to the major dahdi structures.
*  Fixed PRI and SS7 using an incorrect string value if the extension
delimiter is not present in the Dial() function.
*  Fixed SS7 not checking if the dialed extension is at least as long
as the stripmsd option.
*  Fixed PRI not handling unknown TON/NPI prefix letters correctly.
*  Fixed some uninitialized string variables on FXS ports.

configs/chan_dahdi.conf.sample
*  Updated some documentation.

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

11 years agoFixed some doxygen comments
Richard Mudgett [Thu, 29 Jan 2009 19:34:09 +0000 (19:34 +0000)]
Fixed some doxygen comments

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

11 years agoRevert two lines that was extra, but only on fridays.
Olle Johansson [Thu, 29 Jan 2009 17:10:43 +0000 (17:10 +0000)]
Revert two lines that was extra, but only on fridays.

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

11 years agoFix "cancel answered elsewhere" through app_queue with members in chan_local.
Olle Johansson [Thu, 29 Jan 2009 17:08:22 +0000 (17:08 +0000)]
Fix "cancel answered elsewhere" through app_queue with members in chan_local.
Also, implement a private cause code (as suggested by Tilghman). This works with
chan_sip, but doesn't propagate through chan_local.

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

11 years agoBetter document mode=multirow, based upon a conversation with Jared.
Tilghman Lesher [Thu, 29 Jan 2009 16:48:25 +0000 (16:48 +0000)]
Better document mode=multirow, based upon a conversation with Jared.

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

11 years agoThe realtime_pgsql.sql script is missing a couple of fields.
Leif Madsen [Thu, 29 Jan 2009 13:47:27 +0000 (13:47 +0000)]
The realtime_pgsql.sql script is missing a couple of fields.
closes issue #14339)
Reported by: fiddur
Patches:
      realtime_pgsql.sql.diff uploaded by fiddur (license 678)

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

11 years agoUpdate documentation
Olle Johansson [Thu, 29 Jan 2009 13:24:01 +0000 (13:24 +0000)]
Update documentation

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

11 years ago- Make sure we set setvar= variables on outbound calls too, not only inbound calls.
Olle Johansson [Thu, 29 Jan 2009 13:21:31 +0000 (13:21 +0000)]
- Make sure we set setvar= variables on outbound calls too, not only inbound calls.
- Also, change a function in app.c to return a userful value instead of always returning 0.

Patch by fnordian, changed by Corydon76 and myself.

This does not close the bug report, as fnordian had an additional change we're still discussing.

(related to issue #14059)
Reported by: fnordian
Patches:
      chan_sip_hfield.patch uploaded by fnordian (license 110)
      20090116__bug14059.diff.txt uploaded by Corydon76 (license 14)
Tested by: fnordian, Corydon76, oej

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