Commit Graph

11317 Commits

Author SHA1 Message Date
Mark Michelson
ad4eb1b347 Added a membercount variable to call_queue struct which keeps track of the number of logged in members in a particular queue.
This makes it so that the 'n' option for Queue() can act properly depending on which strategy is used. If the strategy is
roundrobin, rrmemory, or ringall, we want to ring each phone once before moving on in the dialplan. However, if any other strategy is
used, we will only ring one phone since it cannot be guaranteed that a different phone will ring on subsequent attempts to ring a phone.

As a side effect of this, the QUEUE_MEMBER_COUNT dialplan function now just reads the membercount variable instead of traversing through
the member list to figure out how many members there are.

Special thanks to blitzrage for helping to test this out.

(closes issue #10127, reported by bcnit, patched by me, tested by blitzrage)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 16:26:58 +00:00
Tilghman Lesher
3630b5e477 It was our stated intention for 1.4 that files created in app_voicemail should
depend upon the umask.  Unfortunately, mkstemp() creates files with mode 0600,
regardless of the umask.  This corrects that deficiency.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 22:38:06 +00:00
Jason Parker
c92ba70e75 Fix some incorrect softkey labels in messages.
Don't try to play dialtone in some unimplemented features.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 18:59:28 +00:00
Joshua Colp
2c4fe2dc00 Merged revisions 76653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76653 | file | 2007-07-23 15:28:13 -0300 (Mon, 23 Jul 2007) | 4 lines

(closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 18:29:48 +00:00
Jason Parker
b0040e0361 Don't try to queue up hold/unhold frames on a non-existent channel.
Issue 10276.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 17:57:53 +00:00
Joshua Colp
1fc0771298 Allow app_morsecode to build on PPC Linux by putting the value of the digit char in an int.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 17:48:51 +00:00
Joshua Colp
91eec8f228 Merged revisions 76560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76560 | file | 2007-07-23 11:32:07 -0300 (Mon, 23 Jul 2007) | 6 lines

(closes issue #10236)
Reported by: homesick
Patches:
      rpid_1.4_75840.patch uploaded by homesick (license 91)
Accept Remote Party ID on guest calls.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:34:21 +00:00
Joshua Colp
bd0608a38f (closes issue #10268)
Reported by: mvanbaak
Patches:
      chan_skinny_openbsd.diff uploaded by mvanbaak (license 7)
Add another OS that has to use the Macros for byte ordering.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 13:23:09 +00:00
Russell Bryant
b838fcc22e Use a signed integer for storing the number of bytes in the packet read from
the network.  Using an unsigned value here made it impossible to handle an
error returned from recvfrom().  Furthermore, in the case that recvfrom()
did return an error, this would cause a crash due to a heap overflow.
(closes issue #10265, reported by and fix suggested by timrobbins)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 12:25:01 +00:00
Tilghman Lesher
a0ba47ec33 Blocked revisions 76409 via svnmerge
........
r76409 | tilghman | 2007-07-22 16:39:55 -0500 (Sun, 22 Jul 2007) | 2 lines

We should not use C++ reserved words in API headers (closes issue #10266)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 21:42:01 +00:00
Russell Bryant
b75f30bdd8 Merged revisions 76226 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76226 | russell | 2007-07-20 21:01:46 -0500 (Fri, 20 Jul 2007) | 4 lines

Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo.  The memory used for the localaddr list was not freed during a
configuration reload.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21 02:02:54 +00:00
Steve Murphy
54e80e7c46 This patch from 10249 is worth applying! It prevents downloading sound files if they are already downloaded. Darn Practical, if you ask me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 21:36:05 +00:00
Jason Parker
d0baa5500e Allow getting a call from an existing "sub" channel.
Cancel ringing if endpoint hangs up before answering.

Fixes were backported from trunk (there was apparently a bit of confusion during merge of a previous patch).
(closes issue #10241)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 21:03:57 +00:00
Jason Parker
24f0e6a947 Eliminate a compiler warning with gcc 4.2 by constifying a char *
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 20:54:10 +00:00
Jason Parker
73452d34a1 It's possible for sub->owner to be NULL here if you cancel the call immediately after/during sending a digit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 20:32:55 +00:00
Mark Michelson
7fd9d67e7a When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available
in the directory.

(closes issue #10200, reported by mrskippy, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 18:42:27 +00:00
Russell Bryant
7f9bf7e970 Use the define that specifies the default length of an artificially created
DTMF digit in the ast_senddigit() function.  The define is set to 100ms by
default, which is the same thing that this function was using.  But, using
the define lets changes take effect in this case, as well as the others where
it was already used.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 18:22:24 +00:00
Joshua Colp
24e7873766 Merged revisions 76080 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76080 | file | 2007-07-20 14:16:48 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue #10247)
Reported by: fkasumovic
Patches:
      chan_sip.patch uploaded by fkasumovic (license #101)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:20:09 +00:00
Joshua Colp
95be40cb27 (closes issue #10246)
Reported by: fkasumovic
Patches:
      res_conver.patch uploaded by fkasumovic (license #101)
Use the last occurance of . to find the extension, not the first occurance.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:10:17 +00:00
Joshua Colp
34b000a0e7 Move makeannouncement variable declaration to proper place.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 16:49:13 +00:00
Jason Parker
6fde7764dc Remove some duplicate code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 20:36:06 +00:00
Mark Michelson
049fb8d98e The diff on this looks pretty big but all I did was remove a pointless if statement (always evaluates true).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 18:59:30 +00:00
Mark Michelson
1f9e2457dd Changes in handling return values of several functions in app_queue. This all started as a fix for issue #10008
but now includes all of the following changes:

1. Simplifying the code to handle positive return values from ast API calls.
2. Removing the background_file function.
3. The fix for issue #10008

(closes issue #10008, reported and patched by dimas)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 16:26:10 +00:00
Russell Bryant
ee82ac13d6 Merged revisions 75927 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75927 | russell | 2007-07-19 10:49:42 -0500 (Thu, 19 Jul 2007) | 6 lines

When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 15:53:15 +00:00
Jason Parker
c6a174bd96 Need to make sure we set milliseconds and timestamp - pointed out by the recent ast_ time stuff from Tilghman
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 22:59:18 +00:00
Russell Bryant
5eedf74578 Merged revisions 75757 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75757 | russell | 2007-07-18 16:09:13 -0500 (Wed, 18 Jul 2007) | 5 lines

When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that 
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 21:09:46 +00:00
Tilghman Lesher
0b6bdf6bf3 Merged revisions 75748 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75748 | tilghman | 2007-07-18 15:31:36 -0500 (Wed, 18 Jul 2007) | 2 lines

Store prior to copy (closes issue #10193)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 20:40:18 +00:00
Jason Parker
48138cca9d Umm, why are we transmitting dialtone on cfwdall?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 20:17:27 +00:00
Joshua Colp
6d143d401f Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC 4.2.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 20:00:23 +00:00
Jason Parker
7d9778c9f8 Fixes for 7935/7936 conference phones.
Issue 9245, patch by slimey.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 19:54:32 +00:00
Jason Parker
2e7fe12cfb Fix issues with new 79x1 phones.
Issue 9887, patches by DEA


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 19:48:12 +00:00
Dwayne M. Hubbard
226a627244 Merged revisions 75657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75657 | dhubbard | 2007-07-18 12:48:33 -0500 (Wed, 18 Jul 2007) | 1 line

removed the word 'pissed' from ast_log(...) function call for BE-90
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 17:56:30 +00:00
Joshua Colp
55a12a986e Few more places that needs to check for onhold state.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 15:44:02 +00:00
Joshua Colp
f08e137283 (closes issue #10165)
Reported by: elandivar

It is possible for hold status to exist without call limits set, so we need to ensure update_call_counter is executed regardless.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 15:41:06 +00:00
Joshua Colp
dc9b640755 Don't bother reloading chan_h323 if it did not load successfully in the first place. This would otherwise cause a crash.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 15:25:45 +00:00
Joshua Colp
f836d642f9 (closes issue #10224)
Reported by: irroot

Record the threadid of each running thread before shutting them down as the thread themselves may change the value.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:18:53 +00:00
Tilghman Lesher
6cab645954 Using a freed frame causes crashes (closes issue #9317)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 12:29:41 +00:00
Russell Bryant
c6e2a119b7 Merged revisions 75449 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75449 | russell | 2007-07-17 15:57:09 -0500 (Tue, 17 Jul 2007) | 3 lines

Properly check for the length in the skinny packet to prevent an invalid memcpy.
(ASA-2007-016)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:57:56 +00:00
Russell Bryant
c83a0b2a3c cast arguments to ast_log so that it builds without warnings for me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:51:25 +00:00
Russell Bryant
89497599be Merged revisions 75444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75444 | russell | 2007-07-17 15:45:27 -0500 (Tue, 17 Jul 2007) | 5 lines

Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:48:21 +00:00
Russell Bryant
2193734456 Merged revisions 75440 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75440 | russell | 2007-07-17 15:41:41 -0500 (Tue, 17 Jul 2007) | 4 lines

After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:42:12 +00:00
Joshua Colp
396e723f17 Ensure that the pointer to STUN data does not go to unaccessible memory. (ASA-2007-017)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:40:57 +00:00
Russell Bryant
bdf09824c6 (issue #10210)
Reported by: juggie
Patches:
      10210-1.4-grr.patch uploaded by juggie (license #24)
Tested by: juggie, blitzrage

Log a warning if someone uses DeadAGI on a live channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:33:06 +00:00
Mark Michelson
e4cc4ef183 Fixing an error I made earlier. ast_fileexists can return -1 on failure, so I need to be sure that we only enter the if
statement if it is successful.

Related to my fix to issue #10186



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:03:48 +00:00
Russell Bryant
0a1a04137e (closes issue #10209)
Reported by: juggie
Patches:
      10209-trunk-2.patch uploaded by juggie
Tested by: juggie, blitzrage

In ast_pbx_run(), mark a channel as hung up after an application returned -1, 
or when it runs out of extensions to execute.  This is so that code can detect
that this channel has been hung up for things like making sure DeadAGI is used
on actual dead channels, and is beneficial for other things, like making sure
someone doesn't try to start spying on a channel that is about to go away.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:01:12 +00:00
Russell Bryant
6f40b0d2b4 Remove a duplicated newline character in AGI debug output.
(closes issue #10207, patch by seanbright)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:45:07 +00:00
Kevin P. Fleming
d0cb9b141d Merged revisions 75304 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75304 | kpfleming | 2007-07-16 15:46:58 -0500 (Mon, 16 Jul 2007) | 3 lines

provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago...


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 20:53:24 +00:00
Kevin P. Fleming
725f93c497 another fix that is not needed here (finishing up 75251)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:33:50 +00:00
Mark Michelson
402820c9e3 Restoring functionality from 1.2 wherein Retrydial will not exit if there is no announce file specified.
This change makes it so that if there is no announce file specified, the application will continue until finished (or caller hangs up).
If a bogus announce file is specified, then a warning message will be printed saying that the file could not be found, but execution will
still continue. 

(closes issue #10186, reported by jon, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:16:15 +00:00
Kevin P. Fleming
2efa8da290 block change that is not relevant here
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:12:31 +00:00