Commit Graph

2467 Commits

Author SHA1 Message Date
Russell Bryant
a04b584272 Only start the SLA thread if SLA has actually been configured.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 22:51:23 +00:00
Tilghman Lesher
417e8fc754 Warn the user when a temporary greeting exists
(Closes issue #11409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 16:22:11 +00:00
Tilghman Lesher
56e908b787 Safely use the strncat() function.
(closes issue #11958)
 Reported by: norman
 Patches: 
       20080209__bug11958.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 06:36:33 +00:00
Joshua Colp
cd703523db Add a control frame to indicate the source of media has changed. Depending on the underlying technology it may need to change some things.
(closes issue #12148)
Reported by: jcomellas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@106235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-05 22:32:10 +00:00
Tilghman Lesher
8bf705f519 If the message file does not exist, just return harmlessly, instead of crashing.
(Closes issue #12108)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 14:34:34 +00:00
Joshua Colp
837d4676dd Bump up the size of the uniqueid variable.
(closes issue #12107)
Reported by: asgaroth


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 13:48:13 +00:00
Mark Michelson
c6387c3540 When using autofill, members who are in use should be counted towards the
number of available members to call if ringinuse is set to yes.

Thanks to jmls who brought this issue up on IRC



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@105059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-28 20:11:57 +00:00
Joshua Colp
fdb44349e9 Don't loop around infinitely trying to spy on our own channel, and don't forget to free/detach the datastore upon hangup of the spy.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 20:56:23 +00:00
Russell Bryant
750067bd1a Fix a problem in ChanSpy where it could get stuck in an infinite loop without
being able to detect that the calling channel hung up.
(closes issue #12076, reported by junky, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 17:33:04 +00:00
Russell Bryant
c882e6da6f Avoid some recursion in the cleanup code for the chanspy datastore
(closes issue #12076, reported by junky, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-27 01:15:02 +00:00
Russell Bryant
bc56a84c58 Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk.
There were a number of bugs in the current implementation, most notably being that
it was very likely on busy systems to pop off the wrong message from the SMDI message
queue.  So, this set of changes fixes the issues discovered as well as introducing
some new ways to use the SMDI support which are required to avoid the bugs with
grabbing the wrong message off of the queue.

This code introduces a new interface to SMDI, with two dialplan functions.  First,
you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access
details in the message using the SMDI_MSG() function.  A side benefit of this is that
it now supports more than just chan_zap.

For example, with this implementation, you can have some FXO lines being terminated 
on a SIP gateway, but the SMDI link in Asterisk.

Another issue with the current implementation is that it is quite common that the
station ID that comes in on the SMDI link is not necessarily the same as the Asterisk
voicemail box.  There are now additional directives in the smdi.conf configuration
file which let you map SMDI station IDs to Asterisk voicemail boxes.

Yet another issue with the current SMDI support was related to MWI reporting over
the SMDI link.  The current code could only report a MWI change when the change
was made by someone calling into voicemail.  If the change was made by some other
entity (such as with IMAP storage, or with a web interface of some kind), then the
MWI change would never be sent.  The SMDI module can now poll for MWI changes if
configured to do so.

This work was inspired by and primarily done for the University of Pennsylvania.

(also related to issue #9260)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-26 00:25:29 +00:00
Russell Bryant
f64df49235 This patch fixes some pretty significant problems with how app_chanspy handles
pointers to channels that are being spied upon.  It was very likely that a
crash would occur if the channel being spied upon hung up.  This was because
the current ast_channel handling _requires_ that the object is locked or else
it could disappear at any time (except in the owning channel thread).  So, this
patch uses some channel datastore magic on the spied upon channel to be able to
detect if and when the channel goes away.
(closes issue #11877)
(patch written by me, but thanks to kpfleming for the idea, and to file for review)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:42:42 +00:00
Tilghman Lesher
5184be27ed If the destination folder is full, don't delete a message when exiting.
(closes issue #12065)
 Reported by: selsky
 Patch by: (myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 21:31:47 +00:00
Mark Michelson
70b222e46f Clear up confusion when viewing the QUEUE_WAITING_COUNT of a
"dead" realtime queue. Since from the user's perspective, the queue
does exist, we shouldn't tell them we couldn't find the queue. Instead
since it is a dead queue, report a 0 waiting count

This issue was brought up on IRC by jmls



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-20 22:32:22 +00:00
Mark Michelson
638ef8c5d2 Change to the configure logic regarding IMAP. Prior to this commit, if you wished to configure
Asterisk with IMAP support, you would use the --with-imap configure switch in one of the following
two ways:
--with-imap=/some/directory would look in the directory specified for a UW IMAP source installation
--with-imap would assume that you had imap-2004g installed in .. relative to the Asterisk source

With this set of changes the two above options still work the same, but there are two new behaviors, too.
--with-imap=system will assume that you have -libc-client.so where you store your shared objects and will
            attempt to find c-client headers in your include path either in the imap or c-client directory.
If either of the two original methods of specifying the imap option should fail, then the check for --with-imap
=system will be performed in addition. It is only after this "system" check that failure can happen.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 23:30:17 +00:00
Mark Michelson
0d470a0525 Fix build for non-IMAP builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 21:03:02 +00:00
Mark Michelson
e70abb4a9e Fix the new message count if delete=yes when using IMAP storage.
(closes issue #11406)
Reported by: jaroth
Patches:
      deleteflag_v2.patch uploaded by jaroth (license 50)
	  Tested by: jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-14 20:55:48 +00:00
Tilghman Lesher
3e014ecd0b Refuse to load app_voicemail if res_adsi is not loaded (which is a symbol dependency)
(closes issue #11760)
 Reported by: non-poster
 Patches: 
       20080114__bug11760.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, non-poster, jamesgolovich


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-13 00:26:57 +00:00
Joshua Colp
0b110bb5e8 If entering a conference with the 'w' option ensure that we can't listen or speak until the marked user appears.
(closes issue #11835)
Reported by: alanmcmillan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-11 22:09:07 +00:00
Tilghman Lesher
42463c4bb2 Commit fix for being unable to send voicemail from VoiceMailMain
Reported by: William F Acker (via the -users mailing list)
 Patch by: Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09 06:23:49 +00:00
Mark Michelson
cb8ffc789e Prevent a potential three-thread deadlock. Also added a comment block
to explicitly state the locking order necessary inside app_queue.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@103120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-08 18:48:17 +00:00
Tilghman Lesher
c9bb4fc12a Move around some defines to unbreak ODBC storage.
(closes issue #11932)
 Reported by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@102576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-06 00:26:02 +00:00
Tilghman Lesher
5f7afc8678 Fix the VM_DUR variable for forwarded voicemail, and fixed several other bugs
while I'm in the area.
(closes issue #11615)
 Reported by: jamessan
 Patches: 
       20071226__bug11615__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, jamessan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 21:54:28 +00:00
Jason Parker
d80ecba23f Remove a needless (and incorrect) call to feof() after fgets().
This would have exited the loop early if you had an authentication file with no newline at the end.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 17:41:40 +00:00
Russell Bryant
aa58033acb off by one error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 17:27:02 +00:00
Russell Bryant
552f2e1b4c Don't overwrite the last character of a line if it's not a newline. This would
happen if the last line in the file doesn't have a newline.
(pointed out by Qwell)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 17:23:47 +00:00
Mark Michelson
a4c24a807c From bugtracker: "fix totalAnalysisTime to handle periods of no channel activity"
(closes issue #9256)
Reported by: cmaj
Patches:
      amd-dont-wait-too-long-for-frames-take3.diff.txt uploaded by cmaj (license 111)
Tested by: cmaj, skygreg, ZX81, rjain



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01 00:06:37 +00:00
Mark Michelson
2e4650c242 Fix a logic error with regards to autofill. Prior to this change, it was possible
for a caller to go out of turn if autofill were enabled and callers ahead in the queue were attempting
to call a member. This change fixes this.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-30 15:23:00 +00:00
Mark Michelson
da3e5f571a Remove a memory leak from updating realtime queues
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@101035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 23:02:03 +00:00
Mark Michelson
ad19e1c4b6 Fixing an erroneous return value returned when attempting to pause or unpause a queue member
fails.

Fixes BE-366, thanks to John Bigelow for writing the patch.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 19:39:00 +00:00
Joshua Colp
f665fa0556 Don't forget to record the channel so we know whether it is bridged or not later.
(closes issue #11811)
Reported by: slavon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-29 17:57:05 +00:00
Jason Parker
cec60d345d When using ODBC_STORAGE, make sure we put greeting files into the database like we do with the others.
Issue #11795
Reported by: dimas
Patches:
      vmgreet.patch uploaded by dimas (license 88)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@100672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-28 20:42:43 +00:00
Mark Michelson
1d9576115c Fixing a typo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 20:25:00 +00:00
Russell Bryant
ece4c9c40c ChanSpy issues a beep when it starts at the beginning of a list of channels to
potentially spy on.  However, if there were no matching channels, it would beep
at you over and over, which is pretty annoying.  Now, it will only beep once in
the case that there are no channels to spy on, but it will still beep again once
it reaches the beginning of the channel list again.

(closes issue #11738, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 17:46:55 +00:00
Tilghman Lesher
60c9fba58f When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take
effect).
(closes issue #11809)
 Reported by: davetroy
 Patches: 
       fix_externpass.diff uploaded by davetroy (license 384)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23 04:31:51 +00:00
Olle Johansson
48066f4cfd Add more dependencies on chan_local and add a note to the description of chan_local
so that people don't disable it in menuselect just to clean up.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:41:57 +00:00
Olle Johansson
3d434f14c3 Add dependency on chan_local to app_dial.
Dial still runs without chan_local, but will be missing forwarding functionality.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-22 17:31:17 +00:00
Joshua Colp
fa640604de Replace current spy architecture with backport of audiohooks. This should take care of current known spy issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 20:33:47 +00:00
Mark Michelson
d186a861cf Adding in appropriate unlocks for the locks I added. Thanks to joetester on IRC
for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 20:59:26 +00:00
Mark Michelson
8e3c058e44 Fixing another compilation error. I'm a bit off today :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:35:12 +00:00
Mark Michelson
1a95cfaf45 Oops. Last commit had compilation error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:30:33 +00:00
Mark Michelson
aa320d23a9 Adding explicit defaults for missing options to init_queue. This is necessary because
if a user either removes or comments one of these options and reloads their queues, the
option will not reset to its default, instead maintaining the value from prior to the 
reload. 

Thanks to John Bigelow for pointing this error out to me.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 16:21:28 +00:00
Joshua Colp
441b809159 Ensure the return value of ast_bridge_call is passed back up as the application return value. This is needed for transfers to function so the PBX core knows to continue execution.
(closes issue #10327)
Reported by: kkiely


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 17:22:53 +00:00
Mark Michelson
87a55d5882 Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen
to leave a message.

(closes issue #11735, reported and patched by jamessan)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:57:06 +00:00
Mark Michelson
2da89b6120 Part 2 of app_queue doxygen improvements. Some smaller functions this time
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 18:48:15 +00:00
Joshua Colp
7a3ee5a7fc Don't do conferencing totally in Zaptel if Monitor is running on the channel.
(closes issue #11709)
Reported by: BigJimmy
Patches:
      patch-meetmerec uploaded by BigJimmy (license 371)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 16:11:17 +00:00
Mark Michelson
34f994f017 use the \retval doxygen command properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 00:17:40 +00:00
Mark Michelson
2a0748b0fe Part 1 of N of adding doxygen comments to app_queue. I picked some of the most common functions
used (which also happen to be some the biggest/ugliest functions too) to document first. I'm pretty
new to doxygen so criticism is welcome.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 23:49:11 +00:00
Mark Michelson
fdd5c25103 Some coding guidelines-related cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 21:24:48 +00:00
Mark Michelson
b5ea488a1d Making some changes designed to not allow for a corrupted mailstream for a vm_state.
1. Add locking to the vm_state retrieval functions so that no linked list corruption occurs.
2. Make sure to always grab the persistent vm_state when mailstream access is necessary.
3. Correct an incorrect return value in the init_mailstream function.

(closes issue #11304, reported by dwhite)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 20:42:07 +00:00