asterisk/asterisk.git
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

11 years agoMake sure register= line supports both port and expiry at the same time.
Olle Johansson [Thu, 29 Jan 2009 11:19:29 +0000 (11:19 +0000)]
Make sure register= line supports both port and expiry at the same time.
(closes issue #14185)
Reported by: Nick_Lewis
Patches:
      chan_sip.c-expiryrequest6.patch uploaded by Nick (license 657)
Tested by: Nick_Lewis

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

11 years agoMerged revisions 172169 via svnmerge from
Olle Johansson [Thu, 29 Jan 2009 09:18:01 +0000 (09:18 +0000)]
Merged revisions 172169 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r172169 | oej | 2009-01-29 09:48:18 +0100 (Tor, 29 Jan 2009) | 16 lines

Make sure that we always add the hangupcause headers. In some cases, the owner was disconnected before we checked for the cause.
This patch implements a temporary storage in the pvt and use that instead.

The code is based on ideas from code from Adomjan in issue #13385 (Add support for Reason: header)
Thanks to Klaus Darillion for testing!

(closes issue #14294)
related to issue #13385

Reported by: klaus3000 and adomjan
Patches:
      bug14294b.diff uploaded by oej (license 306)
      Based on 20080829_chan_sip.c-q850reason_header.patch uploaded by adomjan (license 487)
Tested by: oej, klaus3000

........

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

11 years agoA further correction: cast the sizeof to an int.
Steve Murphy [Wed, 28 Jan 2009 22:52:06 +0000 (22:52 +0000)]
A further correction: cast the sizeof to an int.

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

11 years agoFix how we skip fields (to avoid fields which don't exist) when doing an UPDATE.
Tilghman Lesher [Wed, 28 Jan 2009 22:48:01 +0000 (22:48 +0000)]
Fix how we skip fields (to avoid fields which don't exist) when doing an UPDATE.
(closes issue #14205)
 Reported by: maxgo
 Patches:
       20090128__bug14205__5.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage

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

11 years agomy gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2 didn't like the \%ld and issued a warning,...
Steve Murphy [Wed, 28 Jan 2009 21:48:37 +0000 (21:48 +0000)]
my gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2 didn't like the \%ld and issued a warning, breaking my dev-mode build. This fixes it.

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

11 years agoMerged revisions 172030 via svnmerge from
Steve Murphy [Wed, 28 Jan 2009 20:31:06 +0000 (20:31 +0000)]
Merged revisions 172030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r172030 | murf | 2009-01-28 11:51:16 -0700 (Wed, 28 Jan 2009) | 46 lines

  This patch fixes h-exten running misbehavior in manager-redirected
  situations.

  What it does:
  1. A new Flag value is defined in include/asterisk/channel.h,
   AST_FLAG_BRIDGE_HANGUP_DONT, which used as a messenge to the
   bridge hangup exten code not to run the h-exten there (nor
   publish the bridge cdr there). It will done at the pbx-loop
   level instead.
  2. In the manager Redirect code, I set this flag on the channel
   if the channel has a non-null pbx pointer. I did the same for the
   second (chan2) channel, which gets run if name2 is set...
   and the first succeeds.
  3. I restored the ending of the cdr for the pbx loop h-exten
   running code. Don't know why it was removed in the first place.
  4. The first attempt at the fix for this bug was to place code
     directly in the async_goto routine, which was called from a
     large number of places, and could affect a large number of
     cases, so I tested that fix against a fair number of transfer
     scenarios, both with and without the patch. In the process,
     I saw that putting the fix in async_goto seemed not to affect
     any of the blind or attended scenarios, but still, I was
     was highly concerned that some other scenarios I had not tested
     might be negatively impacted, so I refined the patch to
     its current scope, and jmls tested both. In the process, tho,
     I saw that blind xfers in one situation, when the one-touch
     blind-xfer feature is used by the peer, we got strange
     h-exten behavior.  So, I  inserted code to swap CDRs and
     to set the HANGUP_DONT field, to get uniform behavior.
  5. I added code to the bridge to obey the HANGUP_DONT flag,
     skipping both publishing the bridge CDR, and running
     the h-exten; they will be done at the pbx-loop (higher)
     level instead.
  6. I removed all the debug logs from the patch before committing.
  7. I moved the AUTOLOOP set/reset in the h-exten code in res_features
     so it's only done if the h-exten is going to be run. A very
     minor performance improvement, but technically correct.

  (closes issue #14241)
  Reported by: jmls
  Patches:
        14241_redirect_no_bridgeCDR_or_h_exten_via_transfer uploaded by murf (license 17)
  Tested by: murf, jmls
........

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

11 years agoMerged revisions 171963 via svnmerge from
Tilghman Lesher [Wed, 28 Jan 2009 17:27:40 +0000 (17:27 +0000)]
Merged revisions 171963 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r171963 | tilghman | 2009-01-28 11:25:18 -0600 (Wed, 28 Jan 2009) | 2 lines

  Clarify log message (suggested by manxpower on #asterisk-dev)
........

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

11 years agoYep. Documentation is important.
Olle Johansson [Wed, 28 Jan 2009 14:39:26 +0000 (14:39 +0000)]
Yep. Documentation is important.

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

11 years agoAdd final part of previously committed work for answered elsewhere in queue - the...
Olle Johansson [Wed, 28 Jan 2009 14:37:16 +0000 (14:37 +0000)]
Add final part of previously committed work for answered elsewhere in queue - the missing piece that started with app_dial() earlier on.

This is to avoid having the list and counter of missed calls being touched by queue calls. Add the C option to queue() and nothing
will be logged on phones that support the Reason: header on SIP cancel, like the SNOM phones.

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

11 years agoAdd some more notes about device matching.
Olle Johansson [Wed, 28 Jan 2009 13:26:31 +0000 (13:26 +0000)]
Add some more notes about device matching.

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

11 years agoMerged revisions 171837 via svnmerge from
Olle Johansson [Wed, 28 Jan 2009 13:11:44 +0000 (13:11 +0000)]
Merged revisions 171837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171837 | oej | 2009-01-28 14:07:27 +0100 (Ons, 28 Jan 2009) | 2 lines

Add a better explanation of the difference between the device namespace and the dialplan for newbies.

........

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

11 years agoFix some signedness problems in func_aes.c
Mark Michelson [Wed, 28 Jan 2009 00:17:55 +0000 (00:17 +0000)]
Fix some signedness problems in func_aes.c

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

11 years agoDon't complain about lack of D-channels on PTMP connections
Matthew Fredrickson [Tue, 27 Jan 2009 23:28:51 +0000 (23:28 +0000)]
Don't complain about lack of D-channels on PTMP connections

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

11 years agoAdding AES_ENCRYPT and AES_DECRYPT dialplan functions.
David Vossel [Tue, 27 Jan 2009 22:43:36 +0000 (22:43 +0000)]
Adding AES_ENCRYPT and AES_DECRYPT dialplan functions.

(closes issue #14301)
Reported by: amorsen

review: http://reviewboard.digium.com/r/128/

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

11 years agoMerged revisions 171689 via svnmerge from
Mark Michelson [Tue, 27 Jan 2009 21:58:39 +0000 (21:58 +0000)]
Merged revisions 171689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171689 | mmichelson | 2009-01-27 15:55:08 -0600 (Tue, 27 Jan 2009) | 39 lines

Fix devicestate problems for "always-on" agent channels

A revision to chan_agent attempted to "inherit" the device
state of the underlying channel in order to report the
device state of an agent channel more accurately.

The problem with the logic here is that it makes no sense to
use this for always-on agents. If the agent is logged in, then
to the underlying channel, the agent will always appear to be
"in use," no matter if the agent is on a call or not. The reason
is that to the underlying channel, the channel is currently in use
on a call to the AgentLogin application.

The most common cause that I found for this issue to occur was for
a SIP channel to be the underlying channel type for an Agent channel.
If the SIP phone re-registers, then the registration will cause the
device state core to query the device state of the SIP channel. Since the
SIP channel is in use, the Agent channel would also inherit this status.
Once the agent channel was set to "in use" there was no way that the device
state could change on that channel unless the agent logged out.

The solution for this problem is a bit different in 1.4 than it is in the
other branches. In 1.4, there will be a one-line fix to make sure that only
callback agents will inherit device state from their underlying channel type.
For the other branches of Asterisk, since callback support has been removed, there
is also no need for device state inheritance in chan_agent, so I will simply be
removing it from the code.

In addition, the 1.4 source is getting a new comment to help the next person who
edits chan_agent.c. I'm adding a comment that a agent_pvt's loginchan field may be
used to determine if the agent is a callback agent or not.

(closes issue #14173)
Reported by: nathan
Patches:
      14173.patch uploaded by putnopvut (license 60)
Tested by: nathan, aramirez

........

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

11 years agoMerged revisions 171621 via svnmerge from
Mark Michelson [Tue, 27 Jan 2009 20:11:30 +0000 (20:11 +0000)]
Merged revisions 171621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171621 | mmichelson | 2009-01-27 14:06:01 -0600 (Tue, 27 Jan 2009) | 18 lines

Prevent a crash from occurring when a jitter buffer interpolated frame is
removed from a slinfactory

slinfactory used the "samples" field of an ast_frame in order to determine
the amount of data contained within the frame. In certain cases, such as
jitter buffer interpolated frames, the frame would have a non-zero value for
"samples" but have NULL "data"

This caused a problem when a memcpy call in ast_slinfactory_read would attempt
to access invalid memory. The solution in use here is to never feed frames into
the slinfactory if they have NULL "data"

(closes issue #13116)
Reported by: aragon
Patches:
      13116.diff uploaded by putnopvut (license 60)

........

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

11 years agoFix queue crashes that would occur after the calling channel was masqueraded.
Mark Michelson [Tue, 27 Jan 2009 19:30:54 +0000 (19:30 +0000)]
Fix queue crashes that would occur after the calling channel was masqueraded.

The data passed to the end_bridge_callback was assumed to be data which was
still stack'd. The problem was that with some call features, attended transfers
in particular, a new bridge thread is started once the feature completes, meaning
that when the end_bridge_callback is called, the end_bridge_callback_data was
invalid.

To fix this problem, there are two measures taken

1. Instead of pointing to stacked data, we now used heap-allocated data for
passing to the end_bridge_callback in app_queue
2. Since bridges can end multiple times on a single logical call, we wait until
the final bridge is broken to actually set any queue variables. This is accomplished
through reference-counting and the use of an end_bridge_callback_data_fixup function
in app_queue.c

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

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

11 years agoHandle new VMWI ioctl structure (Now there are two VMWI ioctl calls.)
Doug Bailey [Tue, 27 Jan 2009 15:23:40 +0000 (15:23 +0000)]
Handle new VMWI ioctl structure (Now there are two VMWI ioctl calls.)

(issue #14104)
Reported by: alecdavis
Tested by: dbailey

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

11 years agoSolving the same issue, but a bit different in trunk...
Olle Johansson [Tue, 27 Jan 2009 15:00:19 +0000 (15:00 +0000)]
Solving the same issue, but a bit different in trunk...

Merged revisions 171527 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171527 | oej | 2009-01-27 15:33:20 +0100 (Tis, 27 Jan 2009) | 13 lines

Use the same branch tag in CANCEL as in INVITE

Originally putnopvut implemented some changes in revision 142079 that according to the bug report seemed to have worked then, but somehow fails now.
I guess code, as humans, get old and forget stuff. Anyway, this bug caused CANCEL not to work with picky systems.

Thanks Fredrik for pointing out where the bug in the SIP messaging was.

(closes issue #14346)
Reported by: oej
Patches:
      bug14346.diff uploaded by oej (license 306)
Tested by: oej

........

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

11 years agoBlocked revisions 171452 via svnmerge
Russell Bryant [Mon, 26 Jan 2009 21:32:52 +0000 (21:32 +0000)]
Blocked revisions 171452 via svnmerge

........
r171452 | russell | 2009-01-26 15:31:59 -0600 (Mon, 26 Jan 2009) | 13 lines

Resolve some synchronization issues in chan_iax2 scheduler handling.

The important changes here are related to the synchronization between threads
adding items into the scheduler and the scheduler handling thread.  By adjusting
the lock and condition handling, we ensure that the scheduler thread sleeps no
longer and no less than it is supposed to.  We also ensure that it does not
wake up more often than it has to.

There is no bug report associated with this.  It is just something that I found
while putting scheduler thread handling into a reusable form (review 129).

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

........

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

11 years agoMoving generic setting to friends
Olle Johansson [Mon, 26 Jan 2009 15:56:13 +0000 (15:56 +0000)]
Moving generic setting to friends

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

11 years agoContinue to move variables into the sip_cfg structure to make them easier to handle...
Olle Johansson [Mon, 26 Jan 2009 15:51:00 +0000 (15:51 +0000)]
Continue to move variables into the sip_cfg structure to make them easier to handle in the future as a group of settings for a group of devices.
At some point, I want one sip_cfg per domain handled, so we can have "group" settings.

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

11 years agoJust moving around variable declarations so that we have all globals in the same...
Olle Johansson [Mon, 26 Jan 2009 15:11:39 +0000 (15:11 +0000)]
Just moving around variable declarations so that we have all globals in the same place.
Default setting is set before we activate the channel or at reloads, not where we declare the variable.

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

11 years agoMerged revisions 171264 via svnmerge from
Olle Johansson [Mon, 26 Jan 2009 13:44:40 +0000 (13:44 +0000)]
Merged revisions 171264 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r171264 | oej | 2009-01-26 13:51:53 +0100 (MÃ¥n, 26 Jan 2009) | 9 lines

Don't retransmit 401 on REGISTER requests when alwaysauthreject=yes

(closes issue #14284)
Reported by: klaus3000
Patches:
      patch_chan_sip_unreliable_1.4.23_14284.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000

........

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

11 years agoAdd extensions and context on manager event when new channel is created.
Olle Johansson [Mon, 26 Jan 2009 12:32:30 +0000 (12:32 +0000)]
Add extensions and context on manager event when new channel is created.

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

11 years agoMerged revisions 171187 via svnmerge from
Tilghman Lesher [Sun, 25 Jan 2009 23:58:00 +0000 (23:58 +0000)]
Merged revisions 171187 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r171187 | tilghman | 2009-01-25 17:44:01 -0600 (Sun, 25 Jan 2009) | 6 lines

  Correctly track the hookstate
  (closes issue #13686)
   Reported by: itiliti
   Patches:
         20081013__bug13686.diff.txt uploaded by Corydon76 (license 14)
........

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

11 years agoBlocked revisions 171122 via svnmerge
Tilghman Lesher [Sun, 25 Jan 2009 20:41:19 +0000 (20:41 +0000)]
Blocked revisions 171122 via svnmerge

........
  r171122 | tilghman | 2009-01-25 14:40:44 -0600 (Sun, 25 Jan 2009) | 2 lines

  Err, yeah.
........

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

11 years agoBlocked revisions 171120 via svnmerge
Tilghman Lesher [Sun, 25 Jan 2009 20:31:57 +0000 (20:31 +0000)]
Blocked revisions 171120 via svnmerge

........
  r171120 | tilghman | 2009-01-25 14:30:41 -0600 (Sun, 25 Jan 2009) | 8 lines

  Add thread to kill zombies, when child processes don't die immediately on
  SIGHUP.
  (closes issue #13968)
   Reported by: eldadran
   Patches:
         20090114__bug13968.diff.txt uploaded by Corydon76 (license 14)
   Tested by: eldadran
........

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

11 years agodont segfault when a MWI event occurs on a line without a registered device
Michiel van Baak [Sun, 25 Jan 2009 16:50:53 +0000 (16:50 +0000)]
dont segfault when a MWI event occurs on a line without a registered device

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

11 years agoMake the sample skinny.conf work
Michiel van Baak [Sun, 25 Jan 2009 14:35:17 +0000 (14:35 +0000)]
Make the sample skinny.conf work

(closes issue #14325)
Reported by: DEA
Patches:
      skinny.conf.sample-trunk.txt uploaded by DEA (license 3)

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

11 years agoMerged revisions 170979 via svnmerge from
Sean Bright [Sun, 25 Jan 2009 13:35:48 +0000 (13:35 +0000)]
Merged revisions 170979 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170979 | seanbright | 2009-01-25 08:33:20 -0500 (Sun, 25 Jan 2009) | 9 lines

  Resolve a logic error that was causing Page() to crash when more than one
  channel was specified.

  (closes issue #14308)
  Reported by: bluefox
  Patches:
        20090124__bug14308.diff.txt uploaded by seanbright (license 71)
  Tested by: kc0bvu
........

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

11 years agoChange ARRAY_LEN() to be more C++ safe.
Russell Bryant [Sun, 25 Jan 2009 02:49:30 +0000 (02:49 +0000)]
Change ARRAY_LEN() to be more C++ safe.

When the second part of this macro is written as 0[a] instead of a[0], it will
force a failure if the macro is used on a C++ object that overloads the []
operator.

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

11 years agoAdd a todo to finish the XML docs in this module
Russell Bryant [Sat, 24 Jan 2009 19:33:15 +0000 (19:33 +0000)]
Add a todo to finish the XML docs in this module

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

11 years agoMerged revisions 170836 via svnmerge from
Tilghman Lesher [Sat, 24 Jan 2009 13:55:53 +0000 (13:55 +0000)]
Merged revisions 170836 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170836 | tilghman | 2009-01-24 07:55:02 -0600 (Sat, 24 Jan 2009) | 2 lines

  Remove superfluous implementation note (closes issue #14319)
........

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

11 years agoFix asterisk.pdf generation if branch name has an underscore in it.
Richard Mudgett [Fri, 23 Jan 2009 23:10:34 +0000 (23:10 +0000)]
Fix asterisk.pdf generation if branch name has an underscore in it.

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

11 years agoDon't blow up if a branch name has an underscore in it
Russell Bryant [Fri, 23 Jan 2009 22:58:37 +0000 (22:58 +0000)]
Don't blow up if a branch name has an underscore in it

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

11 years agoMerged revisions 170719 via svnmerge from
Mark Michelson [Fri, 23 Jan 2009 20:56:07 +0000 (20:56 +0000)]
Merged revisions 170719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r170719 | mmichelson | 2009-01-23 14:55:26 -0600 (Fri, 23 Jan 2009) | 8 lines

Add notes to the idlecheck explanation in res_odbc.conf.sample

(closes issue #14319)
Reported by: klaus3000
Patches:
      patch_idlecheck_res_odbc.conf.sample.txt uploaded by klaus3000 (license 65)

........

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

11 years agoMerged revisions 170671 via svnmerge from
Mark Michelson [Fri, 23 Jan 2009 20:23:00 +0000 (20:23 +0000)]
Merged revisions 170671 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r170671 | mmichelson | 2009-01-23 14:21:51 -0600 (Fri, 23 Jan 2009) | 14 lines

Update contrib/i18n.testsuite.conf to not use deprecated syntax

* Convert Wait,1 to Wait(1)
* Convert SetLanguage to Set(CHANNEL(language))
* Use 'n' for all priorities beyond the first

Also added test for Chinese numbers, too.

(closes issue #14320)
Reported by: dant
Patches:
      i18n.testsuite.conf.issue14320.v2.diff uploaded by dant (license 670)

........

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

11 years agoMerged revisions 170648 via svnmerge from
Joshua Colp [Fri, 23 Jan 2009 20:18:05 +0000 (20:18 +0000)]
Merged revisions 170648 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170648 | file | 2009-01-23 16:16:39 -0400 (Fri, 23 Jan 2009) | 4 lines

  When a channel is answered make sure any indications currently playing stop. Usually the phone would do this but if the channel was already answered then they are being generated by Asterisk and we darn well need to stop them.
  (closes issue #14249)
  Reported by: RadicAlish
........

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

11 years agoMerged revisions 170588 via svnmerge from
Tilghman Lesher [Fri, 23 Jan 2009 19:25:10 +0000 (19:25 +0000)]
Merged revisions 170588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170588 | tilghman | 2009-01-23 13:20:44 -0600 (Fri, 23 Jan 2009) | 2 lines

  Additions to AST-2009-001
........

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

11 years agoMerged revisions 170568 via svnmerge from
Joshua Colp [Fri, 23 Jan 2009 19:09:18 +0000 (19:09 +0000)]
Merged revisions 170568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170568 | file | 2009-01-23 15:06:54 -0400 (Fri, 23 Jan 2009) | 4 lines

  When a call is forwarded stop any active indications. The new channel will provide an indication, if need be, itself.
  (closes issue #14310)
  Reported by: RadicAlish
........

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

11 years agoMerged revisions 170504 via svnmerge from
Joshua Colp [Fri, 23 Jan 2009 18:09:45 +0000 (18:09 +0000)]
Merged revisions 170504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170504 | file | 2009-01-23 14:04:08 -0400 (Fri, 23 Jan 2009) | 4 lines

  Use the on hold flag to see if the call is on hold or not. It is possible that our address for them will still be valid even though they are on hold.
  (closes issue #14295)
  Reported by: klaus3000
........

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

11 years agolet's use SENTINEL where needed
Michiel van Baak [Fri, 23 Jan 2009 17:46:02 +0000 (17:46 +0000)]
let's use SENTINEL where needed

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

11 years agoReset the ast_str used for escape substitution. We need to do this since it is a...
Joshua Colp [Fri, 23 Jan 2009 17:32:26 +0000 (17:32 +0000)]
Reset the ast_str used for escape substitution. We need to do this since it is a thread local variable that may contain the value of a previous substitution.
(closes issue #14312)
Reported by: pj

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

11 years agoWe should not do restart messages if we're in PTMP mode
Matthew Fredrickson [Fri, 23 Jan 2009 17:03:41 +0000 (17:03 +0000)]
We should not do restart messages if we're in PTMP mode

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

11 years agoDont clear the display of skinny phones when not needed.
Michiel van Baak [Fri, 23 Jan 2009 16:57:07 +0000 (16:57 +0000)]
Dont clear the display of skinny phones when not needed.

(closes issue #13182)
Reported by: pj
Patches:
      2009011901_dontcleardisplay.diff.txt uploaded by mvanbaak (license 7)
Tested by: mvanbaak, pj

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

11 years agoMWI messages included in CID spill was not being properly handled and prevented the...
Doug Bailey [Fri, 23 Jan 2009 16:35:30 +0000 (16:35 +0000)]
MWI messages included in CID spill was not being properly handled and prevented the call from being processed
(issue #14313)
Reported by: seandarcy
Tested by: dbailey

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

11 years agoMerged revisions 170392 via svnmerge from
Mark Michelson [Fri, 23 Jan 2009 15:44:27 +0000 (15:44 +0000)]
Merged revisions 170392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r170392 | mmichelson | 2009-01-23 09:40:39 -0600 (Fri, 23 Jan 2009) | 28 lines

Fix broken call pickup

There was a subtle change in ast_do_masquerade which
resulted in failed attempts to pickup calls. The problem
was that the value of the AST_FLAG_OUTGOING flag was
copied from the clone to the original channel. In the case
of call pickup, this meant that the AST_FLAG_OUTGOING flag
ended up being cleared on the channel that was attempting
to execute the pickup.

Because this flag was not set, when ast_read came across
an answer frame, it ignored it. The result of this was that
the calling channel was never properly answered.

This fix changes the behavior in ast_do_masquerade to set
the flags on the original channel to the union of the flags
on the clone channel. This way, if the AST_FLAG_OUTGOING
flag is set on either of the two channels involved in the
masquerade, the resulting channel will have the flag set
as well.

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

........

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

11 years agoMake sure we don't set the channel to be inalarm for a D-channel drop on PTMP connections
Matthew Fredrickson [Thu, 22 Jan 2009 23:23:22 +0000 (23:23 +0000)]
Make sure we don't set the channel to be inalarm for a D-channel drop on PTMP connections

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

11 years agoCreate logfile safely.
Tilghman Lesher [Thu, 22 Jan 2009 21:25:46 +0000 (21:25 +0000)]
Create logfile safely.
(closes issue #14160)
 Reported by: tzafrir
 Patches:
       20090104__bug14160.diff.txt uploaded by Corydon76 (license 14)

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

11 years agoMerged revisions 170239 via svnmerge from
Joshua Colp [Thu, 22 Jan 2009 20:04:39 +0000 (20:04 +0000)]
Merged revisions 170239 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170239 | file | 2009-01-22 16:02:35 -0400 (Thu, 22 Jan 2009) | 7 lines

  Don't crash if RTCP is not enabled on an RTP structure but statistics are output.
  (closes issue #14234)
  Reported by: jcovert
  Patches:
        rtp.c.patch-1.6.0.3 uploaded by jcovert (license 551)
        rtp.c.patch-svn-165599 uploaded by jcovert (license 551)
........

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

11 years agoMerged revisions 170158 via svnmerge from
Tilghman Lesher [Thu, 22 Jan 2009 17:19:28 +0000 (17:19 +0000)]
Merged revisions 170158 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170158 | tilghman | 2009-01-22 11:18:07 -0600 (Thu, 22 Jan 2009) | 6 lines

  Allow global variables after substitution to be as long as other variables.
  (closes issue #14263)
   Reported by: markd
   Patches:
         20090120__bug14263.diff.txt uploaded by Corydon76 (license 14)
........

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

11 years agoMerged revisions 170147 via svnmerge from
Joshua Colp [Thu, 22 Jan 2009 16:52:21 +0000 (16:52 +0000)]
Merged revisions 170147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines

  If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
  (closes issue #14282)
  Reported by: cheesegrits
........

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

11 years agochange VMWI to use new DAHDI_VMWI ioctl call.
Doug Bailey [Thu, 22 Jan 2009 15:49:24 +0000 (15:49 +0000)]
change VMWI to use new DAHDI_VMWI ioctl call.
Change configure script to detect the new ioctl call data structure.
(issue #14104)
Reported by: alecdavis
Patches:
      mwiioctl_structure_asterisk.diff4.txt uploaded by dbailey (license )
Tested by: alecdavis, dbailey

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

11 years agoMerged revisions 170050 via svnmerge from
Joshua Colp [Thu, 22 Jan 2009 15:14:50 +0000 (15:14 +0000)]
Merged revisions 170050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170050 | file | 2009-01-22 11:13:56 -0400 (Thu, 22 Jan 2009) | 6 lines

  Do a string comparison instead of pointer comparison since some people specify the context they are actually in as an argument to get around some funkiness.
  (closes issue #14011)
  Reported by: dveiga
  Patches:
        pbx.c.patch uploaded by dveiga (license 665)
........

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

11 years agoClear the autoloop flag when parsing and setting the context/extension/priority to...
Joshua Colp [Thu, 22 Jan 2009 15:01:54 +0000 (15:01 +0000)]
Clear the autoloop flag when parsing and setting the context/extension/priority to go back to. When the channel executes a PBX again we want it to start out at the point we explicitly say and at that point it will not yet be doing autoloop.
(closes issue #14304)
Reported by: jcovert

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