Commit Graph

2521 Commits

Author SHA1 Message Date
Jeff Peeler
0c0a5cdc73 (closes issue #12193)
Reported by: davidw
Patch by: Corydon76, modified by me to work properly with ParkAndAnnounce app



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 15:46:08 +00:00
Tilghman Lesher
3ca503066a Flipflop the sections for two options, since the section for 'X' (exit context)
may otherwise absorb keypresses meant for 's' (admin/user menu).
(closes issue #12836)
 Reported by: blitzrage
 Patches: 
       20080611__bug12836.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 15:18:39 +00:00
Steve Murphy
50449140e8 Arkadia tried to warn me, but the code added to ast_cdr_busy, _failed, and _noanswer was redundant. Didn't spot it until I was resolving conflicts in trunk. Ugh. Redundant code removed. It wasn't harmful. Just dumb.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 14:51:44 +00:00
Steve Murphy
5c2cf0f3c0 (closes issue #10668)
Reported by: arkadia
Tested by: murf, arkadia

Options added to forkCDR() app and the CDR() func to
remove some roadblocks for CDR applications.

The "show application ForkCDR" output was upgraded
to more fully explain the inner workings of forkCDR.

The A option was added to forkCDR to force the
CDR system to NOT change the disposition on the
original CDR, after the fork. This involves
ast_cdr_answer, _busy, _failed, and so on.

The T option was added to forkCDR to force 
obedience of the cdr LOCKED flag in the
ast_cdr_end, all the disposition changing
funcs (ast_cdr_answer, etc), and in the
ast_cdr_setvar func.

The CHANGES file was updated to explain ALL
the new options added to satisfy this bug report
(and some requests made verbally and via 
email, irc, etc, over the past months/year)

The 's' option was added to the CDR() func,
to force it to skip LOCKED cdr's in the
chain.

Again, the new options should be totally transparent
to existing apps! Current behavior of CDR,
forkCDR, and the rest of the CDR system should
not change one little bit. Until you add the
new options, at least!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@122046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 13:47:34 +00:00
Terry Wilson
c340004d76 Backport fix for 11520--for some reason I didn't do this back in February when I patched for trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@121992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-11 23:47:23 +00:00
Mark Michelson
d600851f16 Make sure that the string we set will survive the unref of
the queue member.

Thanks to Russell, who pointed this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@120513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-04 22:05:33 +00:00
Mark Michelson
f145259724 Tab completion when removing a member should give the member's interface,
not the name, since the interface is what is expected for the command.

(closes issue #12783)
Reported by: davevg



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@120285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-04 14:11:12 +00:00
Russell Bryant
c6c26f7c34 Fix another typo in documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 01:03:22 +00:00
Michiel van Baak
383a1ece6b small typo fix 'retires' => 'retries'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-01 20:47:55 +00:00
Tilghman Lesher
c9ddda2b1f When joinempty=strict, it only failed on join if there were busy members. If
all members were logged out OR paused, then it (incorrectly) let callers join
the queue.
(closes issue #12451)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 21:17:45 +00:00
Russell Bryant
e4f25aab4b - Fix a typo in the argument to Playtones
- use ast_safe_sleep() instead of calling the wait application
(thanks to tilghman for pointing these out!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 19:04:52 +00:00
Russell Bryant
ecc4690b4b - Mark app_milliwatt dependent on res_indications (thanks to jsmith)
- fix a typo in a log message (thanks to qwell)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:51:29 +00:00
Russell Bryant
e5b9da59e2 Change milliwatt to use the proper tone by default (1004 Hz) instead of 1000 Hz.
An option is there to use 1000 Hz for anyone that might want it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:38:38 +00:00
Steve Murphy
e58b5c63c6 (closes issue #10668)
(closes issue #11721)
(closes issue #12726)
Reported by: arkadia
Tested by: murf

These changes:

1. revert the changes made via bug 10668; 
   I should have known that such changes,
   even tho they made sense at the time,
   seemed like an omission, etc, were actually
   integral to the CDR system via forkCDR.
   It makes sense to me now that forkCDR didn't
   natively end any CDR's, but rather depended
   on natively closing them all at hangup time
   via traversing and closing them all, whether
   locked or not. I still don't completely 
   understand the benefits of setvar and answer
   operating on locked cdrs, but I've seen 
   enough to revert those changes also, and
   stop messing up users who depended on that
   behavior. bug 12726 found reverting the changes
   fixed his changes, and after a long review
   and working on forkCDR, I can see why.
2. Apply the suggested enhancements proposed
   in 10668, but in a completely compatible
   way. ForkCDR will behave exactly as before,
   but now has new options that will allow some
   actions to be taken that will slightly 
   modify the outcome and side-effects of
   forkCDR. Based on conversations I've had 
   with various people, these small tweaks
   will allow some users to get the behavior
   they need. For instance, users executing
   forkCDR in an AGI script will find the
   answer time set, and DISPOSITION set, 
   a situation not covered when the routines
  were first written.
3. A small problem in the cdr serializer
   would output answer and end times even
   when they were not set. This is now 
   fixed.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 00:25:28 +00:00
Mark Michelson
a7f2c5dbf9 Russell noted to me that in the case that separate threads use their
own addressing system, the fix I made for issue 12376 does not guarantee
uniqueness to the datastores' uids. Though I know of no system that works
this way, I am going to change this right now to prevent trying to track
down some future bug that may occur and cause untold hours of debugging
time to track down.

The change involves using a global counter which increases with each new
chanspy_ds which is created. This guarantees uniqueness.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 19:07:26 +00:00
Michiel van Baak
68589940b4 small update to the g() option of app_voicemail to
note that gain changes only work on zap channels right now.

issue #12578 shows it's not clear right now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 17:17:20 +00:00
Mark Michelson
9460de70ef Add a unique id to the datastore allocated in app_chanspy since
it is possible that multiple spies may be listening to the same
channel.

(closes issue #12376)
Reported by: DougUDI
Patches:
      12376_chanspy_uid.diff uploaded by putnopvut (license 60)
Tested by: destiny6628

(closes issue #12243)
Reported by: atis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 16:38:38 +00:00
Tilghman Lesher
aa32d71fcc Detect another way for a connection to have gone away.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 16:46:48 +00:00
Mark Michelson
1eee42a78a Don't consider a caller "handled" until the caller is bridged with
a queue member. There was too much of an opportunity for the member
to hang up (either during a delay, announcement, or overly long
agi) between the time that he answered the phone and the time when
he actually was bridged with the caller. The consequence of this
was that if the member hung up in that interval, then proper
abandonment details would not be noted in the queue log if the caller
were to hang up at any point after the member hangup.

(closes issue #12561)
Reported by: ablackthorn



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 21:41:34 +00:00
Mark Michelson
b066825d56 Use the MACRO_CONTEXT and MACRO_EXTEN channel variables instead of the channel's macrocontext
and macroexten fields. This is needed because if macros are daisy-chained, the incorrect 
context and extension are placed on the new channel. I also added locking to the channel prior
to accessing these variables as noted in trunk's janitor project file.


(closes issue #12549)
Reported by: darren1713
Patches:
      app_queue.c.macroextenpatch uploaded by darren1713 (license 116)
	       (with modifications from me)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 19:40:06 +00:00
Tilghman Lesher
a4732cfb3c When modules are embedded, they take on a different name, without the ".so"
extension.  Specifically check for this name, when we're checking if a module
is loaded.
(Closes issue #12534)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 04:47:39 +00:00
Mark Michelson
fcd288a33e Move the unlock of the spyee channel to outside the start_spying() function so that
the channel is not unlocked twice when using whisper mode.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 19:32:02 +00:00
Mark Michelson
44c157b36a Output of channel variables when eventwhencalled=vars was set
was being truncated two characters. This patch corrects the
problem.

(closes issue #12493)
Reported by: davidw



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-24 20:43:03 +00:00
Russell Bryant
74694c686d Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue #12498)
Reported by: jsmith
Patches:
      app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 20:49:18 +00:00
Tilghman Lesher
5955dbc3c1 Ensure that help text terminates with a newline
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-19 13:57:17 +00:00
Tilghman Lesher
9f6634f7c1 For consistency sake, ensure that the values that ${CALLINGPRES} returns are valid as an
input to SetCallingPres.  (Closes issue #12472)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-18 06:49:16 +00:00
Mark Michelson
2dbf0778b3 Declaration of the peer channel in this scope was making it so the peer variable defined
in the outer scope was never set properly, therefore making iterating through the channel
list always restart from the beginning. This bug would have affected anyone who called
chanspy without specifying a first argument.

(closes issue #12461)
Reported by: stever28



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 21:03:29 +00:00
Sean Bright
e7072918e0 Make sure we have enough room for the recording's filename.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 10:51:20 +00:00
Joshua Colp
c99280a59e Include the proper headers for using mkdir on FreeBSD.
(closes issue #12430)
Reported by: ys
Patches:
      app_meetme.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 14:10:46 +00:00
Jason Parker
e4d2e03956 Allow autofill to work in the general section of queues.conf.
Additionally, don't try to (re)set options when they have empty values in realtime (all unset columns would have an empty value).

(closes issue #12445)
Reported by: atis
Patches:
      12445-autofill.diff uploaded by qwell (license 4)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 16:18:08 +00:00
Mark Michelson
f1683753b8 If the datastore has been moved to another channel due to a masquerade, then
freeing the datastore here causes an eventual double free when the new channel
hangs up. We should only free the datastore if we were able to successfully remove
it from the channel we are referencing (i.e. the datastore was not moved).

(closes issue #12359)
Reported by: pguido



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 16:24:22 +00:00
Joshua Colp
da024e5196 Forgot the 1.4 branch for russian language fix.
(closes issue #12404)
Reported by: IgorG
Patches:
      voicemail_ru_hardcoded-v1.patch uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 15:58:39 +00:00
Joshua Colp
fb51aa974e Create the directory where name recordings will go if it does not exist.
(closes issue #12311)
Reported by: rkeene
Patches:
      12311-mkdir.diff uploaded by qwell (license 4)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 15:09:04 +00:00
Mark Michelson
e1e05ad198 Fix potential buffer overflow that could happen if more than 100 announce files
were specified when calling ParkAndAnnounce. This overflow is not exploitable remotely
and so there is no need for a security advisory.

(closes issue #12386)
Reported by: davidw



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@113507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-08 19:07:38 +00:00
Mark Michelson
63968e3d5d Ensure that there is no timeout if none is specified.
(closes issue #12349)
Reported by: johnlange



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@112393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 14:32:00 +00:00
Jason Parker
9ae694024e Fix a silly infinite loop when choosing an invalid option.
(closes issue #12315)
Reported by: jmls


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@112068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 21:48:05 +00:00
Steve Murphy
8a02ac6f79 These small documentation updates made in response to a query in
asterisk-users, where a user was using Playback, but needed the
features of Background, and had no idea that Background existed,
or that it might provide the features he needed. I thought the
best way to avert these kinds of queries was to provide "See Also"
references in all three of "Background", "Playback", "WaitExten".
Perhaps a project to do this with all related apps is in order.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@111391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 13:03:28 +00:00
Mark Michelson
df37925e23 This code change is made just for clarification. It does exactly
the same thing as before. It just doesn't look as wrong.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@111121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:37:36 +00:00
Mark Michelson
453209fd16 Add a lock to the vm_state structure and use the lock around mail_open calls
to prevent concurrent access of the same mailstream. This, along with trunk's
ability to configure TCP timeouts for IMAP storage will help to prevent
crashes and hangs when using voicemail with IMAP storage.

(closes issue #10487)
Reported by: ewilhelmsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@111049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:22:16 +00:00
Russell Bryant
f3274be612 Fix a bug where when calls on the trunk side hang up while on hold, the state
is not properly reflected.

(closes issue #11990, reported by anakaoka, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@110163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 22:57:59 +00:00
Mark Michelson
ebb67cf852 Add a missing unlock in the case that memory allocation fails in app_chanspy.
Thanks to Russell for confirming that this was an issue.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@110083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 20:33:03 +00:00
Russell Bryant
755933863f Fix one place where the chanspy datastore isn't removed from a channel.
(issue #12243, reported by atis, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@109763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 22:34:42 +00:00
Mark Michelson
89c3cd6842 This patch makes it so that all queue member status changes are handled through device state
code. This removes several problems people were seeing where their queue members would get into
an "unknown" state. Huge props go to atis on this one since he was the one who found the code
section that was causing the problem and proposed the solution. I just wrote what he suggested :)

(closes issue #12127)
Reported by: atis
Patches:
      12127v3.patch uploaded by putnopvut (license 60)
Tested by: atis, jvandal



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@109713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 20:52:15 +00:00
Mark Michelson
284f74997d Make sure that we release the lock on the spyee channel if the spyee or spy has hung up
(closes issue #12232)
Reported by: atis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@109012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-17 14:18:26 +00:00
Russell Bryant
efa3b46cdf Fix another issue that was causing crashes in chanspy. This introduces a new
datastore callback, called chan_fixup().  The concept is exactly like the
fixup callback that is used in the channel technology interface.  This callback
gets called when the owning channel changes due to a masquerade.  Before this
was introduced, if a masquerade happened on a channel being spyed on, the
channel pointer in the datastore became invalid.

(closes issue #12187)
(reported by, and lots of testing from atis)
(props to file for the help with ideas)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 21:38:16 +00:00
Russell Bryant
269d0aa7e8 Fix a couple uses of sprintf. The second one could actually cause an overflow
of a stack buffer.  It's not a security issue though, it only depends on your
configuration.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-13 20:26:28 +00:00
Russell Bryant
a169524ff6 (closes issue #12187, reported by atis, fixed by me after some brainstorming
on the issue with mmichelson)

- Update copyright info on app_chanspy.

- Fix a race condition that caused app_chanspy to crash.  The issue was that
  the chanspy datastore magic that was used to ensure that spyee channels did
  not disappear out from under the code did not completely solve the problem.
  It was actually possible for chanspy to acquire a channel reference out of
  its datastore to a channel that was in the middle of being destroyed.  That
  was because datastore destruction in ast_channel_free() was done near the
  end.  So, this left the code in app_chanspy accessing a channel that was
  partially, or completely invalid because it was in the process of being free'd
  by another thread.  The following sort of shows the code path where the race 
  occurred:

  =============================================================================
  Thread 1 (PBX thread for spyee chan)  ||   Thread 2 (chanspy)
  --------------------------------------||-------------------------------------
  ast_channel_free()                    ||
    - remove channel from channel list  ||
    - lock/unlock the channel to ensure ||
      that no references retrieved from ||
      the channel list exist.           ||
  --------------------------------------||-------------------------------------
                                        || channel_spy()
    - destroy some channel data         ||  - Lock chanspy datastore
                                        ||  - Retrieve reference to channel
                                        ||  - lock channel
                                        ||  - Unlock chanspy datastore
  --------------------------------------||-------------------------------------
     - destroy channel datastores       ||
        - call chanspy datastore d'tor  ||  
          which NULL's out the ds'      ||  - Operate on the channel ...
          reference to the channel      ||     
                                        ||
    - free the channel                  || 
                                        ||
                                        ||  - unlock the channel
  --------------------------------------||-------------------------------------
  =============================================================================



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 19:57:42 +00:00
Joshua Colp
4a8d87fe98 Add a trigger mode that triggers on both read and write. The actual function that returns the combined audio frame though will wait until both sides have fed in audio, or until one side stops (such as the case when you call Wait).
(closes issue #11945)
Reported by: xheliox


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@108083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-12 18:26:37 +00:00
Jason Parker
48523e3596 Add a newline on a log
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 20:47:53 +00:00
Joshua Colp
d9e83f85a6 Add an additional check for setting conference parameter when using the marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened.
(closes issue #12136)
Reported by: aragon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@107637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 18:47:33 +00:00