Mark Michelson [Tue, 8 Jul 2008 21:09:10 +0000 (21:09 +0000)]
Backport TCP-related timeouts to IMAP voicemail in 1.4
since it should solve bugs people are experiencing. Specifically,
there are times where communication with the IMAP server causes
system calls to block forever. If this should happen when querying
the mailbox so that chan_sip's do_monitor thread can send MWI to
a phone, it means that SIP calls cannot be processed any more.
The timeout options are outlined in doc/imapstorage.txt. Defaults
for the timeouts are sixty seconds.
Cause SIP to return a 480 instead of a 404 when a sip peer exists, but is not
registered.
(closes issue #12885)
Reported by: ibc
Patches:
20080701__bug12885__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: ibc
Timestamp decoding for video mini-frames is bogus, because the timestamp only
includes 15 bits, unlike voice frames, which contain a 16-bit timestamp.
(closes issue #13013)
Reported by: jpgrayson
Patches:
chan_iax2_unwrap_ts.patch uploaded by jpgrayson (license 492)
Olle Johansson [Tue, 8 Jul 2008 09:52:21 +0000 (09:52 +0000)]
Don't hangup the call if we can't resolve the Contact if there's a proxy
route set for the call.
----
This comment was added a while ago and today it hit me badly.
/* OEJ: Possible issue that may need a check:
If we have a proxy route between us and the device,
should we care about resolving the contact
or should we just send it?
*/
Olle Johansson [Tue, 8 Jul 2008 09:06:08 +0000 (09:06 +0000)]
Fix issues where repeated messages where ignored, but retransmitted reliably instead of unreliably.
Reported by: johan
Patches:
12746.txt uploaded by oej (license 306)
Tested by: johan
(issue #12746)
Mark Michelson [Mon, 7 Jul 2008 17:02:28 +0000 (17:02 +0000)]
By using the iaxdynamicthreadcount to identify a thread, it was possible
for thread identifiers to be duplicated. By using a globally-unique monotonically-
increasing integer, this is now avoided.
Fix the 'dialplan remove extension' logic, so that it a) works with cidmatch,
and b) completes contexts correctly when the extension is ambiguous.
(closes issue #12980)
Reported by: licedey
Patches:
20080703__bug12980.diff.txt uploaded by Corydon76 (license 14)
Tested by: Corydon76
As to 11849, I think these changes fix the core problems
brought up in that bug, but perhaps not the more global
problems created by the limitations of CDR's themselves
not being oriented around transfers.
Reopen if necc, but bug reports are not the best
medium for enhancement discussions. We need to start
a second-generation CDR standardization effort to cover
transfers.
Mark Michelson [Tue, 1 Jul 2008 23:36:40 +0000 (23:36 +0000)]
Add error message to failed open(2) calls inside the copy() function of
app_voicemail. This idea came as part of my work in helping to resolve
issue #12764.
Change around how we schedule pings and lagrqs, and fix a reason why the
jobs were not getting properly cancelled.
(closes issue #12903)
Reported by: stevedavies
Patches:
20080620__bug12903__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: stevedavies
Russell Bryant [Mon, 30 Jun 2008 16:05:08 +0000 (16:05 +0000)]
Fix a typo in the non-DEBUG_THREADS version of the recently added DEADLOCK_AVOIDANCE()
macro. This caused the lock to not actually be released, and as a result, not
avoid deadlocks at all. This resolves the issues reported in the last while about
Asterisk locking up all over the place (and most commonly, in chan_iax2).
Olle Johansson [Mon, 30 Jun 2008 12:50:55 +0000 (12:50 +0000)]
Send all responses to an INVITE reliably, so that we retransmit if we don't get an ACK and
also fail if we don't get the very same precious ACK. Based on patch by tsearle, with
my own additions.
(closes issue #12951)
Reported by: tsearle
Patches:
busy_retransmit.patch uploaded by tsearle (license 373)
Tilghman Lesher [Fri, 27 Jun 2008 16:46:05 +0000 (16:46 +0000)]
Since HAVE_DAHDI is defined to HAVE_ZAPTEL in dahdi_compat.h, we must first
check for HAVE_ZAPTEL.
(closes issue #12938)
Reported by: opticron
Patches:
tonezone_compat.diff uploaded by opticron (license 267)
Mark Michelson [Thu, 26 Jun 2008 22:52:39 +0000 (22:52 +0000)]
Add the interface of a queue member to the output of the "queue show" command
so that it can easily be associated with a queue member's name. This helps
so that the appropriate queue member can be removed or paused since the
interface is required, not the member's name.
(closes issue #12783)
Reported by: davevg
Patches:
app_queue.diff uploaded by davevg (license 209) with small mod from me
Mark Michelson [Thu, 26 Jun 2008 20:56:01 +0000 (20:56 +0000)]
Prior to this patch, the "queue show" command used cached
information for realtime queues instead of giving up-to-date
info. Now realtime is queried for the latest and greatest in
queue info.
Kevin P. Fleming [Thu, 26 Jun 2008 15:30:33 +0000 (15:30 +0000)]
ensure that (whenever possible) if we generate a log message because an ioctl() call to DAHDI/Zaptel failed, that we include the reason it failed by including the stringified error number
Kevin P. Fleming [Wed, 25 Jun 2008 22:21:30 +0000 (22:21 +0000)]
allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places
don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it
get app_rpt building again after the DAHDI changes
Tilghman Lesher [Tue, 24 Jun 2008 21:08:52 +0000 (21:08 +0000)]
Occasionally control characters find their way into CallerID. These need to
be stripped prior to placing CallerID in the headers of an email.
(closes issue #12759)
Reported by: RobH
Patches:
20080602__bug12759__2.diff.txt uploaded by Corydon76 (license 14)
Tested by: RobH
Tilghman Lesher [Tue, 24 Jun 2008 20:52:43 +0000 (20:52 +0000)]
Don't access the pvt structure if unable to acquire the lock.
(closes issue #12162)
Reported by: norman
Patches:
12162-lockfail.diff uploaded by qwell (license 4)
Steve Murphy [Sun, 22 Jun 2008 02:54:52 +0000 (02:54 +0000)]
(closes issue #12910)
Reported by: chris-mac
Sorry, my testing did not contain the simple case of forkCDR(v),
I am much embarrassed to admit. If I had, I would have
more solidly initialized the opts element for varset.
Tilghman Lesher [Fri, 20 Jun 2008 23:12:33 +0000 (23:12 +0000)]
usleep with a value over 1,000,000 is nonportable. Changing to use sleep()
instead. (closes issue #12814)
Reported by: pputman
Patches:
app_rtp_sleep.patch uploaded by pputman (license 81)
Tilghman Lesher [Fri, 20 Jun 2008 20:16:02 +0000 (20:16 +0000)]
When using a Local channel, started by a call file, with a destination of an
AGI script, the AGI script does not always get notified of a hangup if the
underlying channel hangs up early.
(closes issue #11833)
Reported by: IgorG
Patches:
local_hangup-v1.diff uploaded by IgorG (license 20)
Tilghman Lesher [Thu, 19 Jun 2008 22:53:22 +0000 (22:53 +0000)]
It's possible for a hangup to be received, even just after the initial cid
spill.
(closes issue #12453)
Reported by: Alex728
Patches:
20080604__bug12453.diff.txt uploaded by Corydon76 (license 14)
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()).