improve static Realtime config loading from PostgreSQL:
don't request sorting on fields that are pointless to sort on
use ast_build_string() instead of snprintf()
don't request the list of fieldnames that resulted from the query when we both knew what they were before we ran the query _AND_ we aren't going to do anything with them anyway
(patch by me, inspired by blitzrage's bug report about res_config_odbc)
increase reliability and efficiency of static Realtime config loading via ODBC:
don't request fields we aren't going to use
don't request sorting on fields that are pointless to sort on
explicitly request the fields we want, because we can't expect the database to always return them in the order they were created
(reported by blitzrage in person (!), patch by me)
Russell Bryant [Wed, 2 May 2007 23:50:07 +0000 (23:50 +0000)]
When a conference is created, the UNIQUEID of the channel that caused it to be
created will now be stored. Then, every channel that joins the conference will
have the MEETMEUNIQUEID channel variable set with this ID. This can be used to
relate callers that come and go from long standing conferences.
(issue #7295, patch by softins)
Russell Bryant [Wed, 2 May 2007 23:00:07 +0000 (23:00 +0000)]
Merged revisions 62789 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r62789 | russell | 2007-05-02 17:59:09 -0500 (Wed, 02 May 2007) | 20 lines
Merge changes from team/russell/inband_dtmf ...
Fix some issues related to generating inband DTMF. There are two changes here:
1) The list of DTMF tones in the senddigit_begin() function explicitly
specified 100ms of the tone followed by 100ms of silence. This really
broke things with the way that Asterisk now wants complete control
over when the digit begins and ends. So, regardless of what Asterisk
really wanted to do, this was going to play out the tone at the length it
wanted to. This caused various problems like DTMF translation to inband to
be extremely unreliable.
The list of tones has been changed so that the correct DTMF tone is played
indefinitely until Asterisk tells it to stop.
2) ast_write() had to be modified to let a DTMF_END frame get processed even
when a generator is present. This is how the tone will finally get stopped.
(issues #8944, #9250, #9348, maybe others. Thanks to mdu113 from #8944 for
the testing and feedback!)
Issue 9638 - if a text frame is sent with no terminating NULL through a bridged
IAX connection, the remote end will receive garbage characters tacked onto the
end.
Steve Murphy [Wed, 2 May 2007 17:24:03 +0000 (17:24 +0000)]
Merged revisions 62689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r62689 | murf | 2007-05-02 11:10:50 -0600 (Wed, 02 May 2007) | 1 line
a)In chan_zap, set the clid, src fields in channel_alloc call. b)in the channel_alloc func, set the cid_num and name fields from the arglist[blush]. c) don't update the channel app & app data fields if you are in the 'h' extension. d)the load_module func in cdr_radius needs to return DECLINE, SUCCESS.
........
Russell Bryant [Wed, 2 May 2007 15:46:49 +0000 (15:46 +0000)]
Update the device state functionality of chan_local such that it will return
NOT_INUSE or INUSE when Local channels are in use as opposed to just UNKNOWN.
It will still return INVALID if the extension doesn't exist at all.
(issue #8048, patch from tim_ringenbach)
Russell Bryant [Tue, 1 May 2007 22:24:51 +0000 (22:24 +0000)]
In addition to making it so attended transfers don't fail unnecessarily,
add some new options to control what happens when you hangup on an attended
transfer before the target extension answers the transferred channel. You
can now have it send the transferee back to the transferer.
(issue #8413, patch from sergee with very minor modifications by me)
Russell Bryant [Tue, 1 May 2007 21:57:58 +0000 (21:57 +0000)]
Merged revisions 62548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r62548 | russell | 2007-05-01 16:57:10 -0500 (Tue, 01 May 2007) | 12 lines
Merged revisions 62547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r62547 | russell | 2007-05-01 16:55:19 -0500 (Tue, 01 May 2007) | 4 lines
Remove an unnecessary check that makes it so if you hang up after doing an
attended transfer before the target extension answers the channel, the transfer
is not successful. (issue #9338, patch by svanlund)
Russell Bryant [Mon, 30 Apr 2007 16:46:49 +0000 (16:46 +0000)]
This patch adds additional information to the EXITWITHKEY and EXITWITHTIMEOUT
entries in the queue log.
(issue #7561, reported and originally patched by fkasumovic, patch slightly
modified and updated to trunk by me)
Russell Bryant [Mon, 30 Apr 2007 16:16:26 +0000 (16:16 +0000)]
Add support for setting the CoS for VLAN traffic (802.1p) in Linux. The
file doc/qos.tex has been updated to document the new functionality.
(issue #9540, patch submitted by IgorG)
This patch fixes an issue where depending on the cause code, when the network
sends a PRI disconnect, the call may not be properly hung up.
(issue #9588, reported and patched by softins)
Russell Bryant [Mon, 30 Apr 2007 15:37:23 +0000 (15:37 +0000)]
Don't crash when invalid arguments are provided to the CHANNEL() function
for a SIP channel.
(issue #9619, reported by jtodd, original patch by Corydon76, committed patch
slightly modified by me)
When serving dynamic content, include a Cache-Control header to instruct the
browsers to not store the resulting content.
(issue #9621, reported by Pari, patch by me)
Russell Bryant [Sat, 28 Apr 2007 21:01:44 +0000 (21:01 +0000)]
Merge changes from team/russell/events
This set of changes introduces a new generic event API for use within Asterisk.
I am still working on a way for events to be shared between servers, but this
part is ready and can already be used inside of Asterisk.
This set of changes introduces the first use of the API, as well. I have
restructured the way that MWI (message waiting indication) is handled. It is
now event based instead of polling based. For example, if there are a bunch
of SIP phones subscribed to mailboxes, then chan_sip will not have to
constantly poll the mailboxes for changes. app_voicemail will generate events
when changes occur.
See UPGRADE.txt and CHANGES for some more information on the effects of these
changes from the user perspective. For developer information, see the text in
include/asterisk/event.h.
As always, additional feedback is welcome on the asterisk-dev mailing list.
Russell Bryant [Sat, 28 Apr 2007 19:53:12 +0000 (19:53 +0000)]
Update the DUNDi section of the documentation with example usage of DUNDIQUERY
and DUNDIRESULT. Also, update the automatically generated application docs.
Russell Bryant [Sat, 28 Apr 2007 19:52:37 +0000 (19:52 +0000)]
Merge changes from team/russell/dundi_results
This introduces two new dialplan functions: DUNDIQUERY and DUNDIRESULT.
DUNDIQUERY lets you intitiate a DUNDi query from the dialplan. Then,
DUNDIRESULT will let you find out how many results there are, and access each
one without having to the query again.
Russell Bryant [Fri, 27 Apr 2007 22:08:54 +0000 (22:08 +0000)]
Add a min-announce-frequency option to queues.conf which allows you to control the
minimum amount of time between queue announcements for use when the caller's queue
position changes frequently.
(issue #9604, patch by Matthew Roth)
Fix a weird problem where when a caller talking to someone sitting behind an
agent channel sent a digit, the digit would be played to the agent for forever.
This is because chan_agent always returned -1 from its send_digit_begin and _end
callbacks. This non-zero return value indicates to the Asterisk core that it
would like an inband DTMF generator put on the channel. However, this is the
wrong thing to do. It should *always* return 0, instead. When the digit begin
and end functions are called on the proxied channel, the underlying channel
will indicate whether inband DTMF is needed or not, and the generator will be
put on that one, and not the Agent channel.
(issue #9615, #9616, reported by jiddings and BigJimmy, and fixed by me)
If no variables were passed into pbx_substitute_variables_helper_full(), then
don't even bother creating a temporary bogus channel, since that is only for
allowing certain functions to operate on the variables as if they were on a
channel. Most importantly, this fixes a crash.
(issue #9613, reported by callguy, fixed by me)
Issue #7351 - SIP Cancel fails due to the wrong contact uri. Reported by PPYY, failed to fix by OEJ
final fix by wojtekka - THANKS!!!! THis was a hard one to catch.
Revert previous fix for when the IAX2 channel goes funky (that's the technical term). This is causing legit calls to be prematurely hung up. (issue #9600 reported by justdave)
Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)
Don't crash if a manager connection provides a username that exists in
manager.conf but does not have a password, and also requests MD5
authentication. (ASA-2007-012)
Improve DTMF handling in ast_read() even more in response to a discussion on
the asterisk-dev mailing list. I changed the enforced minimum length of a
digit from 100ms to 80ms. Furthermore, I made it now enforce a gap of 45ms in
between digits. These values are not configurable in a configuration file
right now, but they can be easily changed near the top of main/channel.c.
Add a few more state changes in handle_frame_ownerless() so that the SLA code
will get notified of these changes even when an owner channel is not provided.
This isn't from a specific bug report, it's just something I noticed while
poking around.
Russell Bryant [Mon, 23 Apr 2007 18:49:19 +0000 (18:49 +0000)]
When building a JSON encoded string in the GetConfigJSON manager action, escape
the '\' and '"' characters. (issue #9475, reported by pari, patch by me)
Some dialplan functions, such as CUT(), expect to operate on variables on a
channel. So, this little hack lets them work in places where a channel doesn't
exist, such as within DUNDi configuration.
(issue #9465, reported and patched by Corydon76, testing by blitzrage)
Ensure that digits passing through Asterisk have a reasonable minimum length.
It is currently 100 ms. If someone thinks this should be different, feel free
to speak up. (related to issues #8944, #9250, and #9348)
Russell Bryant [Fri, 20 Apr 2007 21:12:53 +0000 (21:12 +0000)]
Merge changes from team/russell/iax2_osp
This set of changes adds OSP support to chan_iax2. However, I have modified
the patch a bit from what was submitted. You now use the CHANNEL() function
to get and set the OSP token for IAX2.
(issue #8531, reported by and original patch by homesick, patch updated by me)
If the '* to hangup' option is not enabled, we don't need to disable * as a valid exit key.
If it was enabled, this statement would've never been checked in the first place.
Fix the UpdateConfig manager action to properly treat "variables" and "objects"
differently (a=b versus a=>b).
(issue #9568, reported by pari, patch by me)
Bug 9557 - Specifying the GetVar AMI action without a Channel parameter can
cause Asterisk to crash. The reason this needs to be fixed in the functions
instead of in AMI is because Channel can legitimately be NULL, such as when
retrieving global variables.
Olle Johansson [Wed, 18 Apr 2007 07:57:18 +0000 (07:57 +0000)]
Mini-voicemail - an embryo for a new voicemail system based on building
blocks instead of one large monolithic app. Supports multiple templates
and is designed mostly for voicemail delivery over e-mail.
There's a todo with a list of ideas in the source code if you want
to contribute. Feedback is appreciated!
Add OUTBOUND_GROUP_ONCE variable to app_dial. This behaves the same as OUTBOUND_GROUP except it will get unset after use so it won't get accidentally inherited. (issue #BE-140)
For those very verbose SIP implementations that attach tons of info to the Contact header... let's increase our variable sizes. (issue #9535 reported by jeffg)
added option_minmemfree for use in asterisk.conf to specify the amount of minimum free memory prior to accepting calls. added CLI 'core show sysinfo' to display system information
If someone sets the "useragent" option in sip.conf to be empty, then don't add
the User-Agent header at all. It is an optional header, anyway. Also, the bug
report says that some of Japan's SIP providers don't allow it for some weird
reason. (issue #9488, reported by makoto, fixed by me)
Fix a bug with switching between host=dynamic and using specific hosts for
peers. The code would only reset the peer's address when it is dynamic if
it was a new peer structure. Now, it will also reset the address if it was
already in the peer list, but before the reload, it was not dynamic.
(issue #9515, reported by caio1982, fixed by me)