Russell Bryant [Mon, 26 Feb 2007 20:43:18 +0000 (20:43 +0000)]
Merged revisions 56888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r56888 | russell | 2007-02-26 14:42:21 -0600 (Mon, 26 Feb 2007) | 4 lines
Restore the behavior of Asterisk 1.2 where if a device was not specified in
alsa.conf, then we just use the system default, instead of creating our own
default of hw:0,0. (issue #9139)
Use ast_strlen_zero to see if the language and/or context argument is not present for Background instead of just checking if it is NULL. (issue #9141 reported by mjagdis)
Jason Parker [Sat, 24 Feb 2007 02:23:43 +0000 (02:23 +0000)]
Allow a Skinny device to monitor a dialplan hint (w00t!).
See skinny.conf.sample for configuration example.
Note: Some devices (seen on 12SP+/30VIP) will lock up if they monitor too many hints.
This seems to be a hardware limitation - there isn't anything we can do about it.
Make sure to set a speeddials parent on creation.
Don't crash if hold is pressed when no call is active.
Don't return in places that we shouldn't..
Update softkey map when call is connected
Russell Bryant [Fri, 23 Feb 2007 23:25:22 +0000 (23:25 +0000)]
Merged revisions 56505 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r56505 | russell | 2007-02-23 17:24:18 -0600 (Fri, 23 Feb 2007) | 16 lines
Merged revisions 56504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r56504 | russell | 2007-02-23 17:20:55 -0600 (Fri, 23 Feb 2007) | 8 lines
Fix up a couple more signal handlers to not do bad things that could cause
various undesirable results. The other day, I made Asterisk deadlock by
hitting Control-C because of a bad signal handler. Now, signal handlers
just set a flag and write to an alert pipe for the flag to be handled. Then,
there is another thread that is monitoring for these flags. If being run in
console mode, it is just the main thread. If Asterisk is in the background,
a thread is created to do it.
Change log notice to debug. It is possible for a scheduled item to execute and be deleted at close to the same time and unavoidable. If this happens this message creeps up.
Russell Bryant [Fri, 23 Feb 2007 21:20:33 +0000 (21:20 +0000)]
Merge team/russell/iax2_performance.
There is not a large amount of code here and the changes are not very invasive.
However, they should significantly improve performance of chan_iax2 under load.
IAX2 media frames only carry the *source* call number. So, when one arrives,
the correct session that it is a part of has to be matched on IP address, port
number, and call number, instead of just a call number. Had these frames
carried the *destination* call number, this would not be an issue, because that
would be a unique identifier that would make it easy to immediately identify
the correct session.
The way that chan_iax2 did this matching was extremely inefficient. It starts
at the first available call number and traverses each call number sequentially,
locking and unlocking a mutex for each one, to try to match against it. It
would do this regardless of whether the call number was in use or not. So,
for a call with a local call number of 25000, every single incoming media
frame would require a traversal that required 25000 mutex lock and unlock
operations. (Note that the max call number is about 32k).
I have introduced a hash table of active IAX2 calls to improve this lookup
process. The hash is done on the IP address, port number, and call number.
So, for the previous example, a few lock/unlock operations may be done versus
25000 for each frame.
Russell Bryant [Fri, 23 Feb 2007 20:21:35 +0000 (20:21 +0000)]
Merged revisions 56407 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r56407 | russell | 2007-02-23 14:20:00 -0600 (Fri, 23 Feb 2007) | 12 lines
Merged revisions 56406 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r56406 | russell | 2007-02-23 14:17:56 -0600 (Fri, 23 Feb 2007) | 4 lines
Don't destroy mutexes before unregistering all of the entry points from the core.
Also, fix a potential memory leak from not destroying the locks for all of the
possible call numbers (about 32k of them).
Russell Bryant [Fri, 23 Feb 2007 18:01:11 +0000 (18:01 +0000)]
Merged revisions 56341 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r56341 | russell | 2007-02-23 11:58:57 -0600 (Fri, 23 Feb 2007) | 8 lines
The IMAP storage code uses the same code to build the email that is used when
voicemail is sent via email using something like sendmail. In the patch from
bug 8033 to fix various IMAP storage problems, the line endings in the email
file were changed in the code from "\n" to "\r\n". However, this breaks
sending regular voicemail to email. So, this change conditionally sets line
endings to "\r\n" only if IMAP_STORAGE is enabled.
(issue #9128, patch by jarjarbinks, modified by me to not break IMAP storage)
Russell Bryant [Fri, 23 Feb 2007 00:45:04 +0000 (00:45 +0000)]
Introduce a new manager action, GetConfigJSON, which is intended to improve
performance of the GUI. This encodes the configuration into the JSON format
in a manager header, "JSON: ". The encoded information can be directly used
as a javascript object, so no parsing is needed. For large configuration
files, this can greatly improve loading times in the GUI. Furthermore, the
encoding takes up a lot less space when being transmitted than the other
alternatives. (Inspired by discussion with Pari)
Here is an example of what you get:
http://localhost:8088/asterisk/rawman?action=getconfigjson&filename=users.conf
Russell Bryant [Thu, 22 Feb 2007 23:12:26 +0000 (23:12 +0000)]
Merged revisions 56277 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r56277 | russell | 2007-02-22 17:08:36 -0600 (Thu, 22 Feb 2007) | 18 lines
Merge changes from team/russell/sla_updates.
This batch of changes to the SLA code does a few different things.
* I made the SLA code event driven instead of having to act in a lot of busy
loops while dialing things to wait for state changes. This makes the code
more efficient and readable at the same time.
* I have implemented a couple of new features. The first is inbound trunk
ringing timeouts. This is an option that defines how long to let an incoming
call on a trunk to ring.
* I have also implemented ring timeouts for stations. They may be specified
for the entire station, meaning it is how long to let the station ring before
giving up. You can also specify a ring timeout for a specific trunk on a
station. So, you can say that you only want a specific station to ring 5
seconds if it is line1 ringing, but otherwise, there is no timeout.
Kevin P. Fleming [Thu, 22 Feb 2007 17:36:46 +0000 (17:36 +0000)]
move the ast_module_info structure into the special section as well, otherwise when restore_globals() is called it will lose its pointer to the ast_module structure that the loader put there
Russell Bryant [Thu, 22 Feb 2007 16:25:22 +0000 (16:25 +0000)]
Fix some compilation problems in app_voicemail. There was a parenthesis missing
in a function prototype, and "#elifdef" is not a valid preprocessor directive.
(issue #9122, akohlsmith)
disable unloading of embedded modules... there is a fundamental problem with doing so that will not be fixed in this version of Asterisk due to its invasiveness
Joshua Colp [Thu, 22 Feb 2007 00:05:00 +0000 (00:05 +0000)]
Make filename on email follow subject message number, purely for cosmetic purposes for individuals like *cough* jsmith *cough*. (issue #9111 reported by sshah)
Change naughty warning message to provide useful information. If a write now fails on a channel in meetme it will tell you the channel name instead of spitting out the wrong error message.
Add a flag that indicates whether a SIP dialog is an outgoing call or not. SIP_OUTGOING originally did it but it was repurposed to the direction of the last transaction, which can cause update_call_counter to falsely decrease the wrong counters. (please don't hurt me oej) (issue #8943 reported by mdu113)
Don't test our own address against the localnet settings. At least one person has had issues as a result of this from #7051 so I'm reversing it. (issue #8821 reported by kokoskarokoska)
Defer clearing callback information if channels are up until they are hung up. This ensures the hangup process goes smoothly and no channels get hung in limbo. (issue #8088 reported by kebl0155)
Changed iax2 process thread to detached to correct memory leak due to left over thread context on thread exit.
Modified module unload process to avoid deadlocks on pthread cancels
Kevin P. Fleming [Sun, 18 Feb 2007 15:03:42 +0000 (15:03 +0000)]
add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught
convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important)
Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated
Allow chan_sip to handle attended transfers from a SIP phone that is sitting behind chan_agent. Yes folks, all it took was one line of code. (issue #8784 reported by pzieba)
Russell Bryant [Fri, 16 Feb 2007 22:50:22 +0000 (22:50 +0000)]
Merged revisions 55006 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r55006 | russell | 2007-02-16 16:49:42 -0600 (Fri, 16 Feb 2007) | 17 lines
Merged revisions 55005 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r55005 | russell | 2007-02-16 16:48:22 -0600 (Fri, 16 Feb 2007) | 9 lines
Revert the change I did in revisions 54955, 54969, and 54970, in 1.2, 1.4,
and trunk. I decided that once a conference is created from meetme.conf,
it is acceptable behavior that the pin can not be changed until the
conference goes away. I also added a note in meetme.conf to describe this
behavior.
We still have another issue in 1.4 and trunk where some conferences with no
users don't go away. That is the real bug that needs to be addressed here.
Do not send indications through ast_indicate in chan_agent but instead go directly to the technology. This way when indications are emulated they happen on the Agent channel and do not screw up formats on the channels. (issue #8439 reported by punkgode)
Russell Bryant [Fri, 16 Feb 2007 21:13:51 +0000 (21:13 +0000)]
Merged revisions 54969 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r54969 | russell | 2007-02-16 15:12:18 -0600 (Fri, 16 Feb 2007) | 13 lines
Merged revisions 54955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r54955 | russell | 2007-02-16 14:56:58 -0600 (Fri, 16 Feb 2007) | 5 lines
For conferences that are configured in meetme.conf, check the configuration
file every time someone joins the conference instead of only when the
conference is first created. This is to ensure that changes to the pin
numbers in the config file are always honored. (issue #9073)
Russell Bryant [Fri, 16 Feb 2007 18:04:34 +0000 (18:04 +0000)]
Merged revisions 54898 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r54898 | russell | 2007-02-16 12:03:41 -0600 (Fri, 16 Feb 2007) | 4 lines
Fix setting "autofallthrough" to yes by default. It was set to enabled in
pbx.c. However, if the option was not present in extensions.conf, then
pbx_config.c would set it back to disabled.