Steve Murphy [Mon, 16 Jun 2008 20:43:46 +0000 (20:43 +0000)]
(closes issue #12689)
Reported by: ys
Many thanks to ys for doing the research on this problem.
I didn't think it would be best to unlock the contexts
and then relock them after the remove_extension2() call,
so I added an extra arg to remove_extension2() and set it
appropriately in each call. There were not that many.
I considered forcing the code to lock the contexts before
the call to remove_extension2(), but that would require
a slightly greater degree of changes, especially since
the find_context_locked is local to pbx.c
I did a simple sanity test to make sure the code doesn't
mess things up in general.
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
Russell Bryant [Mon, 16 Jun 2008 13:08:13 +0000 (13:08 +0000)]
Merge res_timing_pthread. This is a timing interface for Asterisk that
does not require DAHDI. It's called "pthread" because it uses a pthread
API call in the timing thread for sleeping and ensuring we wake up at
an appropriate time. I wasn't sure what else to call it. :)
The timing API requires a file descriptor that can be polled on. So,
when you open a timer, this module creates a pipe and returns the read
end of the pipe. There is a background thread that wakes up every 10ms
and checks to see if any of the currently open timers need a 'tick' and
writes to the appropriate pipe.
Russell Bryant [Mon, 16 Jun 2008 13:03:40 +0000 (13:03 +0000)]
Add a "timing test" CLI command. It opens a timer and configures it for
50 ticks per second, and then counts to see how many ticks it actually
gets in a second.
Russell Bryant [Mon, 16 Jun 2008 12:48:11 +0000 (12:48 +0000)]
- Fix a typo in a timing API call
- Convert the last part of channel.c over to use the timing API. This would
not have made a difference when using the dahdi timing module. I noticed
it when trying to use another timing source. Oops. :)
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)
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)
Tilghman Lesher [Sun, 15 Jun 2008 15:21:16 +0000 (15:21 +0000)]
Add some more IAX2-specific information about the channel to the CHANNEL()
function and begin the transition from SIPCHANINFO() to just using CHANNEL().
(closes issue #12856)
Reported by: mostyn
Patches:
iax_and_sip_channel_info.patch uploaded by mostyn (license 398)
(with some additional cleanup by me)
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.
Tilghman Lesher [Fri, 13 Jun 2008 14:15:07 +0000 (14:15 +0000)]
Convert one more delimiter to use comma.
(closes issue #12850)
Reported by: bcnit
Patches:
20080613__bug12850.diff.txt uploaded by Corydon76 (license 14)
Tested by: bcnit
Russell Bryant [Fri, 13 Jun 2008 12:45:50 +0000 (12:45 +0000)]
Merge changes from timing branch
- Convert chan_iax2 to use the timing API
- Convert usage of timing in the core to use the timing API instead of
using DAHDI directly
- Make a change to the timing API to add the set_rate() function
- change the timing core to use a rwlock
- merge a timing implementation, res_timing_dahdi
Basic testing was successful using res_timing_dahdi
Mark Michelson [Thu, 12 Jun 2008 23:58:01 +0000 (23:58 +0000)]
Fix a segfault by not trying to store a stack address for
long-term use. Instead use the heap. I can't believe this
never happened *once* in my developer branch when I was testing.
Jeff Peeler [Thu, 12 Jun 2008 17:39:38 +0000 (17:39 +0000)]
Make sure we hangup any calls we have and NULL out the ss7call value when we get a reset circuit message. Fixes crash bug. (from mattf r121857, moving from chan_zap to chan_dahdi)
Jeff Peeler [Thu, 12 Jun 2008 17:27:55 +0000 (17:27 +0000)]
Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
Mark Michelson [Thu, 12 Jun 2008 16:25:09 +0000 (16:25 +0000)]
Merging the work done in the queue-log-atxfer branch. The
net result of this work is that attended transfers made
by queue members will now show up in the queue_log as a
TRANSFER message instead of COMPLETECALLER as it had been.
As far as the details go, I created a datastore which is
attached to the calling channel just prior to when the caller
is bridged with the queue member. If the calling channel
is masqueraded, then during the "fixup" portion, the TRANSFER
will be logged and the datastore will be removed.
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
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:56:26 +0000 (14:56 +0000)]
Merged revisions 122127 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r122127 | murf | 2008-06-12 08:51:44 -0600 (Thu, 12 Jun 2008) | 1 line
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!
Kevin P. Fleming [Thu, 12 Jun 2008 14:21:32 +0000 (14:21 +0000)]
add infrastructure so that timing source can be a loadable module... next steps are to convert channel.c and chan_iax2.c to use this new API, and to move all the DAHDI-specific timing source code into a new res_timing_dahdi module
Russell Bryant [Thu, 12 Jun 2008 14:06:38 +0000 (14:06 +0000)]
Don't log not being able to set a default EID. Most people don't care, and
those that do can check their setup using CLI commands.
(closes issue #12839)
Russell Bryant [Tue, 10 Jun 2008 15:12:17 +0000 (15:12 +0000)]
Merge another big set of changes from team/russell/events
This commit merges in the rest of the code needed to support distributed device
state. There are two main parts to this commit.
Core changes:
- The device state handling in the core has been updated to understand device
state across a cluster of Asterisk servers. Every time the state of a device
changes, it looks at all of the device states on each node, and determines the
aggregate device state. That resulting device state is what is provided to
modules in Asterisk that take actions based on the state of a device.
New module, res_ais:
- A module has been written to facilitate the communication of events between
nodes in a cluster of Asterisk servers. This module uses the SAForum AIS
(Service Availability Forum Application Interface Specification) CLM and EVT
services (Cluster Management and Event) to handle this task. This module
currently supports sharing Voicemail MWI (Message Waiting Indication) and
device state events between servers. It has been tested with openais, though
other implementations of the spec do exist.
For more information on testing distributed device state, see the following doc:
- doc/distributed_devstate.txt
Russell Bryant [Tue, 10 Jun 2008 14:53:40 +0000 (14:53 +0000)]
Merge some more changes from team/russell/events
This commit pulls in a batch of improvements and additions to the event API.
Changes include:
- the ability to dynamically build a subscription. This is useful if you're
building a subscription based on something you receive from the network,
or from options in a configuration file.
- Add tables of event types and IE types and the corresponding string
representation for implementing text based protocols that use these
events, for showing events on the CLI, reading configuration that
references event information, among other things.
- Add a table that maps IE types and the corresponding payload type.
- an API call to get the total size of an event
- an API call to get all events from the cache that match a subscription
- a new IE payload type, raw, which I used for transporting the Entity ID in
my code for handling distributed device state.
- Code improvements to reduce code duplication
- Include the Entity ID of the server that originated the event in every event
- an additional event type, DEVICE_STATE_CHANGE, to help facilitate distributed
device state. DEVICE_STATE is a state change on one server, DEVICE_STATE_CHANGE
is the aggregate device state change across all servers.
Joshua Colp [Tue, 10 Jun 2008 14:11:16 +0000 (14:11 +0000)]
Fix issue where session timer headers were present when they should not have been.
(closes issue #12706)
Reported by: falves11
Patches:
chan_sip.c.diff uploaded by rjain (license 226)
Tested by: falves11
Russell Bryant [Tue, 10 Jun 2008 14:06:29 +0000 (14:06 +0000)]
Merge another change from team/russell/events
This commit breaks out some logic from pbx.c into a simple API. The hint
processing code had logic for taking the state from multiple devices and
turning that into the state for a single extension. So, I broke this out
and made an API that lets you take multiple device states and determine
the aggregate device state. I needed this for some core device state changes
to support distributed device state.
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
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 [Tue, 10 Jun 2008 12:48:50 +0000 (12:48 +0000)]
Merge another change from team/russell/events ...
DUNDi uses a concept called the Entity ID for unique server identifiers. I have
pulled out the handling of EIDs and made it something available to all of Asterisk.
There is now a global Entity ID that can be used for other purposes as well, such
as code providing distributed device state, which is why I did this. The global
Entity ID is set automatically, just like it was done in DUNDi, but it can also be
set in asterisk.conf. DUNDi will now use this global EID unless one is specified
in dundi.conf.
The current EID for the system can be seen in the "core show settings" CLI command.
It is also available in the dialplan via the ENTITYID variable.
Russell Bryant [Tue, 10 Jun 2008 00:43:06 +0000 (00:43 +0000)]
Merge a couple of configure script checks in from team/russell/events. This adds
the checks for the CLM and EVT services from the SAForum AIS. I'm going to work
on merging in changes from this branch in pieces.
Russell Bryant [Mon, 9 Jun 2008 16:37:08 +0000 (16:37 +0000)]
Merged revisions 121280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r121280 | russell | 2008-06-09 11:35:40 -0500 (Mon, 09 Jun 2008) | 10 lines
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
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()).
add a new argument to PrivacyManager to specify a context
where the entered phone number is checked.
You can now define a set of extensions/exten patterns that describe
valid phone numbers. PrivacyManager will check that context for a match
with the given phone number.
This way you get better control. For example people blindly hitting
10 digits just to get past privacymanager
Example line in extensions.conf:
exten => incoming,n,PrivacyManager(3,10,,route-outgoing)
Jeff Peeler [Sun, 8 Jun 2008 01:41:59 +0000 (01:41 +0000)]
This was accidentally reverted.
Fixes a bug where if a stream monitor thread was not created (caused from failure of opening or starting the stream) pthread_cancel was called with an invalid thread ID.
Jeff Peeler [Sun, 8 Jun 2008 01:16:25 +0000 (01:16 +0000)]
Fixes segfault when using ParkAndAnnounce. Also, loop made more efficient as announce template only needs to be checked until the number of colon separated arguments run out, not the entire pointer storage array. Was done in a similiar fashion in 1.4, but here we're using less variables.
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:39:25 +0000 (16:39 +0000)]
Blocked revisions 120671 via svnmerge
........
r120671 | russell | 2008-06-05 11:38:52 -0500 (Thu, 05 Jun 2008) | 5 lines
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.
Brett Bryant [Thu, 5 Jun 2008 16:24:19 +0000 (16:24 +0000)]
This patch adds more detailed statistics for RTP channels, and provides an API call to access it, including maximums, minimums, standard deviatinos,
and normal deviations. Currently this is implemented for chan_sip, but could be added to the func_channel_read callbacks for the CHANNEL function
for any channel that uses RTP.
(closes issue #10590)
Reported by: gasparz
Patches:
chan_sip_c.diff uploaded by gasparz (license 219)
rtp_c.diff uploaded by gasparz (license 219)
rtp_h.diff uploaded by gasparz (license 219)
audioqos-trunk.diff uploaded by snuffy (license 35)
rtpqos-trunk-r119891.diff uploaded by sergee (license 138)
Tested by: jsmith, gasparz, snuffy, marsosa, chappell, sergee