Tilghman Lesher [Thu, 19 Jun 2008 16:26:03 +0000 (16:26 +0000)]
Only process 40 arguments (20 files) at once with xargs, because some older
shells may force xargs to separate on an odd boundary.
(Closes issue #12883)
Reported by Nik Soggia
Tilghman Lesher [Thu, 19 Jun 2008 16:07:23 +0000 (16:07 +0000)]
The RDTSC instruction was introduced on the Pentium line of microprocessors,
and is not compatible with certain 586 clones, like Cyrix. Hence, asking for
i386 compatibility was always incorrect. See http://en.wikipedia.org/wiki/RDTSC
(Closes issue #12886)
Reported by tecnoxarxa
Tilghman Lesher [Wed, 18 Jun 2008 22:08:30 +0000 (22:08 +0000)]
Add support for saying numbers in Hebrew.
(closes issue #11662)
Reported by: greenfieldtech
Patches:
say.c.patch-12042008 uploaded by greenfieldtech (license 369)
Hebrew-Sounds.ods uploaded by greenfieldtech
(with signficant changes to the spreadsheet by me)
Tilghman Lesher [Wed, 18 Jun 2008 20:22:42 +0000 (20:22 +0000)]
Set the variables top-down, so that if a script sets a variable more than once,
the last one will take precedence.
(closes issue #12673)
Reported by: phber
Patches:
20080519__bug12673.diff.txt uploaded by Corydon76 (license 14)
Mark Michelson [Tue, 17 Jun 2008 18:09:16 +0000 (18:09 +0000)]
Cisco BTS sends SIP responses with a tab between the Cseq number and
SIP request method in the Cseq: header. Asterisk did not handle this
properly, but with this patch, all is well.
Mark Michelson [Tue, 17 Jun 2008 15:56:55 +0000 (15:56 +0000)]
davidw pointed out that the holdtime calculation used by
app_queue does not use "boxcar" filtering as the comments
say. The term "boxcar" means that the number of samples used
to calculate stays constant, with new samples replacing the
oldest ones. The queue holdtime calculation uses all holdtime
samples collected since the queue was loaded, so the comment
has been changed to be accurate.
Russell Bryant [Tue, 17 Jun 2008 15:48:31 +0000 (15:48 +0000)]
Fix a memory leak in astobj2 that was pointed out by seanbright. When a container
got destroyed, the underlying bucket list entry for each object that was in the
container at that time did not get free'd.
Tilghman Lesher [Mon, 16 Jun 2008 19:21:58 +0000 (19:21 +0000)]
People expect that if "hasvoicemail" is set in users.conf, even if "mailbox"
isn't set, that SIP will detect a mailbox.
(closes issue #12855)
Reported by: PLL
Patches:
20080614__bug12855__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: PLL
Joshua Colp [Mon, 16 Jun 2008 12:31:09 +0000 (12:31 +0000)]
Only compare the first 15 characters so that even if the charset is specified we still accept it as SDP.
(closes issue #12803)
Reported by: lanzaandrea
Patches:
chan_sip.c.diff uploaded by lanzaandrea (license 496)
Joshua Colp [Mon, 16 Jun 2008 12:08:28 +0000 (12:08 +0000)]
Don't send a BYE on a dialog that is already gone during a REFER.
(closes issue #12865)
Reported by: flefoll
Patches:
chan_sip.c.br14.121495.patch-ALREADYGONE uploaded by flefoll (license 244)
Mark Michelson [Fri, 13 Jun 2008 21:44:53 +0000 (21:44 +0000)]
Short circuit the loop in autoservice_run if there are no channels to poll.
If we continued, then the result would be calling poll() with a NULL
pollfd array. While this is fine with POSIX's poll(2) system call, those
who use Asterisk's internal poll mechanism (Darwin systems) would have
a failed assertion occur when poll is called.
Terry Wilson [Fri, 13 Jun 2008 16:29:07 +0000 (16:29 +0000)]
This should fix the behavior of the 'T' dial feature being passed incorrectly to the transferee when builtin_atxfers are used.
Also, doing a builtin_atxfer to parking was broken and is fixed here as well.
Tilghman Lesher [Thu, 12 Jun 2008 15:18:39 +0000 (15:18 +0000)]
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
Tilghman Lesher [Thu, 12 Jun 2008 15:11:30 +0000 (15:11 +0000)]
Occasionally, the alertpipe loses its nonblocking status, so detect and correct
that situation before it causes a deadlock. (Reported and tested by ctooley
via #asterisk-dev)
Steve Murphy [Thu, 12 Jun 2008 14:51:44 +0000 (14:51 +0000)]
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.
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!
Joshua Colp [Tue, 10 Jun 2008 13:34:27 +0000 (13:34 +0000)]
If we are destroying a dialog only set the MWI dialog pointer on the related peer to NULL if it is the dialog currently being destroyed.
(closes issue #12828)
Reported by: ramonpeek
Joshua Colp [Tue, 10 Jun 2008 12:52:06 +0000 (12:52 +0000)]
Update BRIDGEPEER variable before we do a generic bridge in case we just broke out of a native bridge and fell through to generic.
(closes issue #12815)
Reported by: ramonpeek
Russell Bryant [Mon, 9 Jun 2008 16:35:40 +0000 (16:35 +0000)]
Do not attempt to do emulation if an END digit is received and the length is
less than the defined minimum digit length, and the other end only wants END
digits (SIP INFO, for example).
(closes issue #12778)
Reported by: tsearle
Patches:
12778.rev1.txt uploaded by russell (license 2)
Tested by: tsearle
Mark Michelson [Mon, 9 Jun 2008 15:02:37 +0000 (15:02 +0000)]
A unique situation of timeouts brought forth a failure situation for
autologoff in chan_agent. If using AgentCallbackLogin-style agents,
then if the timeout specified by the Dial() to reach the agent's phone
was shorter than the timeout specified in queues.conf, then autologoff
would only work if the caller hung up while the agent's phone was ringing.
This patch allows autologoff to work in this situation when the call in
queue transfers to the next available agent (as it would have if the timeout
in queues.conf were less than the timeout in the Dial()).
Jeff Peeler [Fri, 6 Jun 2008 15:33:15 +0000 (15:33 +0000)]
This fixes a crash when LOW_MEMORY is turned on. Two allocations of the ast_rtp struct that were previously allocated on the stack have been modified to use thread local storage instead.
Russell Bryant [Thu, 5 Jun 2008 16:38:52 +0000 (16:38 +0000)]
It turns out that searching on the forwarding station isn't very useful for
most people, so pull in the changes that allow searching for SMDI messages
based on other components of the SMDI message. Also, update the SMDI
documentation.
Tilghman Lesher [Wed, 4 Jun 2008 18:35:47 +0000 (18:35 +0000)]
If we fail to setup the PRI request channel, don't continue, exit with an error.
(closes issue #11989)
Reported by: Corydon76
Patches:
20080213__zap_memleak.diff.txt uploaded by Corydon76 (license 14)
Russell Bryant [Wed, 4 Jun 2008 16:26:43 +0000 (16:26 +0000)]
Make the "dialplan remove include" CLI command actually work. Also, tweak
some formatting, and make the success message a little bit more clear.
(closes AST-52)
Joshua Colp [Wed, 4 Jun 2008 13:31:09 +0000 (13:31 +0000)]
Fix a log message and add a message for when the dialplan is done reloading.
(closes issue #12716)
Reported by: chappell
Patches:
dialplan_reload_2.diff uploaded by chappell (license 8)
Tilghman Lesher [Tue, 3 Jun 2008 22:41:04 +0000 (22:41 +0000)]
Due to incorrect use of the AST_LIST_INSERT_HEAD() macro the loopback switch
cannot perform any translation on the extension number before searching for it
in the target context.
(closes issue #12473)
Reported by: chappell
Patches:
pbx_loopback.c.diff uploaded by chappell (license 8)
This change decreases the buffer size allocated on the stack substantially in config_text_file_load when LOW_MEMORY is turned on. This change combined with the fix from revision 117462 (making mkintf not copy the zt_chan_conf structure) was enough to prevent the crash.
Russell Bryant [Tue, 3 Jun 2008 21:34:55 +0000 (21:34 +0000)]
Fix another place where peer->callno could change at a very bad time, and also
fix a place where a peer was used after the reference was released.
(inspired by rev 120001)
Tilghman Lesher [Tue, 3 Jun 2008 18:23:32 +0000 (18:23 +0000)]
When listing the manager users, managers in users.conf are not shown, even
though they are allowed to connect.
(closes issue #12594)
Reported by: bkruse
Patches:
12594-managerusers-2.diff uploaded by qwell (license 4)
Tested by: bkruse
Tilghman Lesher [Tue, 3 Jun 2008 16:10:53 +0000 (16:10 +0000)]
Save the callno when we're poking, because our peer structure could change
during destruction (and thus we unlock the wrong callno, causing a
cascade failure).
(closes issue #12717)
Reported by: gewfie
Patches:
20080525__bug12717.diff.txt uploaded by Corydon76 (license 14)
Tested by: gewfie
Steve Murphy [Tue, 3 Jun 2008 15:26:56 +0000 (15:26 +0000)]
Updated the regressions on AEL. Hadn't updated
this for the changes I made to preserve ${EXTEN}
in switches, which affected several tests because
it adds extra priorities, and at least one needed to be updated
because of the removal of the empty extension warning
message.
Steve Murphy [Tue, 3 Jun 2008 14:49:46 +0000 (14:49 +0000)]
as per http://lists.digium.com/pipermail/asterisk-users/2008-June/212934.html,
which is a message from Philipp Kempgen, requesting that the WARNING
that an extension is empty be reduced to a NOTICE or less, as empty
extensions are syntactically possible, and no big deal.
With which I agree, and have removed that WARNING message entirely.
I think it is not necessary to see this message. It didn't
state that a NoOp() was inserted automatically on your behalf,
and really, as users, who cares? Why freak out dialplan writers
with unnecessary warnings? The details of the machinations a compiler goes
thru to produce working assembly code is of little interest
to most programmers-- we will follow the unix principal of
doing our work silently.
Russell Bryant [Mon, 2 Jun 2008 20:08:04 +0000 (20:08 +0000)]
Revert a change made for issue #12479. This change caused a regression such that
a dial string such as (IAX2/foo) did not automatically fall back to dialing the 's'
extension anymore.
Russell Bryant [Mon, 2 Jun 2008 14:39:45 +0000 (14:39 +0000)]
Improve CLI command blacklist checking for the command manager action. Previously,
it did not handle case or whitespace properly. This made it possible for blacklisted
commands to get executed anyway.
(closes issue #12765)
Added counter for unhandled_bmsg Print, this prevents the logs to be flooded to fast and save CPU in this error scenario. Added 'last_used' element to bc structure, when a bchannel changes from used to free this exact time will be marked in last_used. When a new channel is requested the find_free_chan function will check if the new empty channel was used within the last second, if yes it will search for the next channel, if no it will return this channel. This simple mechanism has prooven to prevent race conditions where the NT and TE tried to allocate the exact same channel at the same time (RELEASE cause: 44).
Tilghman Lesher [Fri, 30 May 2008 21:17:45 +0000 (21:17 +0000)]
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
Michiel van Baak [Fri, 30 May 2008 16:44:39 +0000 (16:44 +0000)]
dont use a bashism way to check the $VERSION variable.
The rc/init.d scripts, and safe_asterisk work on normal sh now again.
Tested on:
OpenBSD 4.2 (me)
Debian etch (me)
Ubuntu Hardy (me and loloski)
FC9 (loloski)
Russell Bryant [Fri, 30 May 2008 12:55:36 +0000 (12:55 +0000)]
Merged revisions 119237 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r119237 | russell | 2008-05-30 07:49:39 -0500 (Fri, 30 May 2008) | 7 lines
- Instead of only enforcing destination call number checking on an ACK, check
all full frames except for PING and LAGRQ, which may be sent by older versions
too quickly to contain the destination call number.
(As suggested by Tim Panton on the asterisk-dev list)
- Merge changes from team/russell/iax2-frame-race, which prevents PING and LAGRQ
from being sent before the destination call number is known.
Russell Bryant [Thu, 29 May 2008 22:24:29 +0000 (22:24 +0000)]
Fix a race condition in channel autoservice. There was still a small window of opportunity
for a DTMF frame, or some other deferred frame type, to come in and get dropped.
(closes issue #12656)
(closes issue #12656)
Reported by: dimas
Patches:
v3-12656.patch uploaded by dimas (license 88)
-- with some modifications by me
Tilghman Lesher [Thu, 29 May 2008 20:24:11 +0000 (20:24 +0000)]
Call waiting tone occurs too often, because it's getting serviced by both
subchannels.
(closes issue #11354)
Reported by: cahen
Patches:
20080512__bug11354.diff.txt uploaded by Corydon76 (license 14)
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.
Brett Bryant [Wed, 28 May 2008 16:10:48 +0000 (16:10 +0000)]
merge revision 118702 from trunk to 1.4 -- Fixes a bug in chan_iax that uses send_command to poke a peer while a channel is unlocked in some cases, and because it can cause seemingly random failures could be related to some bugs in the tracker...
Joshua Colp [Wed, 28 May 2008 14:23:34 +0000 (14:23 +0000)]
Add an option to use the source IP address of RTP as the destination IP address of UDPTL when a specific option is enabled. If the remote side is properly configured (ports forwarded) then UDPTL will flow.
(closes issue #10417)
Reported by: cstadlmann
Joshua Colp [Tue, 27 May 2008 19:32:38 +0000 (19:32 +0000)]
Fix an issue where codec preferences were not set on dialogs that were not authenticated via a user or peer and allow framing to work without rtpmap in the SDP.
(closes issue #12501)
Reported by: slimey
Tilghman Lesher [Tue, 27 May 2008 19:15:27 +0000 (19:15 +0000)]
When showing an error message for a command, don't shorten the command output,
as it tends to confuse the user (it's fine for suggesting other commands,
however).
Reported by: seanbright (on #asterisk-dev)
Fixed by: me
Mark Michelson [Tue, 27 May 2008 19:07:26 +0000 (19:07 +0000)]
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.
Tilghman Lesher [Tue, 27 May 2008 18:58:09 +0000 (18:58 +0000)]
NULL character should terminate only commands back to the core, not log
messages to the console.
(closes issue #12731)
Reported by: seanbright
Patches:
20080527__bug12731.diff.txt uploaded by Corydon76 (license 14)
Tested by: seanbright
Tilghman Lesher [Sun, 25 May 2008 16:02:04 +0000 (16:02 +0000)]
Realtime flag affects construction in multiple ways, so consulting whether
rtcachefriends was set was done too soon (needed to be done inside build_peer,
not just as a flag to build_peer).
Also, fullcontact needed to be reconstructed, because realtime separates the
embedded ';' into multiple fields.
(closes issue #12722)
Reported by: barthpbx
Patches:
20080525__bug12722.diff.txt uploaded by Corydon76 (license 14)
Tested by: barthpbx
(Much of the discussion happened on #asterisk-dev for diagnosing this issue)
Tilghman Lesher [Thu, 22 May 2008 16:47:03 +0000 (16:47 +0000)]
Take into account the length of delimiters when calculating result string length.
(closes issue #12696)
Reported by: adomjan
Patches:
func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487)