Mark Michelson [Tue, 16 Feb 2010 21:15:38 +0000 (21:15 +0000)]
Add some clarifying documentation to the ast_str_set and ast_str_append functions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246985
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 16 Feb 2010 21:03:34 +0000 (21:03 +0000)]
swap openssl with OpenSSL in warning message.
(issue #16673)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246981
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 16 Feb 2010 20:54:48 +0000 (20:54 +0000)]
warning message if openssl support is missing while attempting tls connection
(closes issue #16673)
Reported by: michaesc
Patches:
tls_error_msg.diff uploaded by dvossel (license 671)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246980
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Tue, 16 Feb 2010 18:29:42 +0000 (18:29 +0000)]
Add unit test for dialplan pattern matching.
This test works by reading input from arrays to build a sample
dialplan. From there, patterns are attempted to be matched against
said dialplan, with the expected match given. We then search in our
example dialplan to see if we find a match and if what we find matches
what we expected it to match.
(closes issue #16809)
Reported by: lmadsen
Tested by: mmichelson
Review: https://reviewboard.asterisk.org/r/504/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246942
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 16 Feb 2010 17:07:41 +0000 (17:07 +0000)]
fixes sample rate conversion issue with Monitor application
When using ast_seekstream with the read/write streams of a monitor,
the number of samples we are seeking must be of the same rate as the
stream or the jump calculation will be incorrect. This patch adds logic
to correctly convert the number of samples to jump to the sample rate
the read/write stream is using.
For example, if the call is G722 (16khz) and the read/write stream is
recording a 8khz wav, seeking 320 samples of 16khz audio is not the
same as seeking 320 samples of 8khz audio when performing the ast_seekstream
on the stream.
ABE-2044
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246899
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 16 Feb 2010 15:36:53 +0000 (15:36 +0000)]
Revert changes for now, pending discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246863
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 16 Feb 2010 05:25:11 +0000 (05:25 +0000)]
Add a few more targets for DEBUG_THREADLOCALS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246827
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 16 Feb 2010 00:52:45 +0000 (00:52 +0000)]
Change the blanket rules to delete .lastclean on all CFLAGS menuselect targets to be more particular.
This change builds upon the recent change to menuselect to add 'touch_on_change'
as an attribute of both categories and members. This should allow only the most
invasive defines to cause a complete rebuild, while defines which only affect a
subset of modules will only cause a rebuild of that smaller set.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246789
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 16 Feb 2010 00:19:38 +0000 (00:19 +0000)]
Allow Timer B to be set on the peer, and ensure SIP rules are followed (or warn) in comparison to Timer T1.
(closes issue #16643)
Reported by: nahuelgreco
Patches:
20100204__issue16643.diff.txt uploaded by tilghman (license 14)
Tested by: oej
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246724
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 15 Feb 2010 23:43:28 +0000 (23:43 +0000)]
Merged revisions 246709 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r246709 | tilghman | 2010-02-15 17:42:33 -0600 (Mon, 15 Feb 2010) | 5 lines
Make the menuselect instructions correct by allowing 'make menuselect' to actually solve dependency problems.
(Previously, it would fail out again with the same message about running
'make menuselect', which was NOT at all helpful.)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246710
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Mon, 15 Feb 2010 22:08:23 +0000 (22:08 +0000)]
Restore triedtopribridge flag code removed in -r211197.
Ooops. Failed to note that we were inside a for loop and
pri_channel_bridge() needs to be executed only once.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246669
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 15 Feb 2010 21:37:58 +0000 (21:37 +0000)]
Instead of just automatically filtering out in the Makefile, give an indication of dependencies in menuselect.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246667
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Mon, 15 Feb 2010 15:45:02 +0000 (15:45 +0000)]
chan_sip parse code refactoring plus two new unit tests
Code Refactoring Changes
- read_to_parts() moved to reqresp_parser.c and has been renamed as
get_name_and_number()
- get_in_brackets() moved to reqresp_parser.c
- find_closing_quotes() added to sip_utils.h
Logic Changes
- get_name_and_number() now uses parse_uri() and get_calleridname()
for parsing. Before this change only names within quotes were
found, when names not within quotes are possible.
New Unit Tests
-sip_get_name_and_number_test
-sip_get_in_brackets_test
(closes issue #16707)
Reported by: Nick_Lewis
Patches:
issue16706.diff uploaded by dvossel (license 671)
Review: https://reviewboard.asterisk.org/r/499/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246627
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 12 Feb 2010 23:32:33 +0000 (23:32 +0000)]
Merged revisions 246545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r246545 | dvossel | 2010-02-12 17:30:17 -0600 (Fri, 12 Feb 2010) | 16 lines
lock channel during datastore removal
On channel destruction the channel's datastores are removed and
destroyed. Since there are public API calls to find and remove
datastores on a channel, a lock should be held whenever datastores are
removed and destroyed. This resolves a crash caused by a race
condition in app_chanspy.c.
(closes issue #16678)
Reported by: tim_ringenbach
Patches:
datastore_destroy_race.diff uploaded by tim ringenbach (license 540)
Tested by: dvossel
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246546
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Fri, 12 Feb 2010 18:54:19 +0000 (18:54 +0000)]
Blocked revisions 246460 via svnmerge
........
r246460 | qwell | 2010-02-12 12:52:28 -0600 (Fri, 12 Feb 2010) | 1 line
Fix some silly formatting, and remove unnecessary option_debug checks
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246461
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 12 Feb 2010 17:59:39 +0000 (17:59 +0000)]
fixes areas where port should be removed from domain during parsing
A patch was committed recently that converted duplicate uri parsing
code to use the parse_uri function. There were two instances where
this conversion did not mimic previous behavior exactly because the
port was not being parsed off the end of the domain. In order to do
this, a dummy pointer argument needs to be passed into parse_uri so
it will know it must parse out the port from the domain. If a port
output paramenter is not present, the domain is returned with the
port still attached.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246420
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
TransNexus OSP Development [Fri, 12 Feb 2010 08:30:05 +0000 (08:30 +0000)]
Updated doc for OSP lookup application.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246382
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Thu, 11 Feb 2010 21:57:37 +0000 (21:57 +0000)]
fixes some test description formatting inconsistencies so log file looks nice
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246338
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Thu, 11 Feb 2010 18:42:25 +0000 (18:42 +0000)]
astobj2 unit test and bug fix
A bug was discovered during the creation of the astobj2 unit test.
When OBJ_MULTIPLE | OBJ_UNLINK is used, the objects being returned
had a ref count issue. This patch resolves that.
Review: https://reviewboard.asterisk.org/r/496/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246299
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Wed, 10 Feb 2010 23:19:16 +0000 (23:19 +0000)]
Add a test module for the event API, test_event.c.
This module includes a single test so far that creates events using two
different methods and does some verification on the result to make sure
the correct data can be retrieved from the event that was created.
One bug was found in the event API while developing this test, which makes
me happy. :-)
Review: https://reviewboard.asterisk.org/r/495/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246260
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Wed, 10 Feb 2010 23:13:49 +0000 (23:13 +0000)]
additional parse_uri test and documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246249
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 21:55:42 +0000 (21:55 +0000)]
res_pktccops needs to be able to export a symbol for chan_mgcp
(closes issue #16782)
Reported by: nahuelgreco
Patches:
res_pktccops.exports uploaded by nahuelgreco (license 162)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246208
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 21:24:10 +0000 (21:24 +0000)]
Fussy compiler on another machine...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246204
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 21:19:35 +0000 (21:19 +0000)]
Fix weird issue with unit tests on optimized build - turned out to be a signing issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246200
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Wed, 10 Feb 2010 17:49:34 +0000 (17:49 +0000)]
Merged revisions 246115 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines
fixes random deadlock in app_queue with use_weight during reload
(closes issue #16677)
Reported by: tim_ringenbach
Patches:
app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246116
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 10 Feb 2010 16:47:37 +0000 (16:47 +0000)]
Change channel state on local channels for busy,answer,ring.
Previously local channels channel state never changed. This became problematic
when the state of the other side of the local channel was lost, for example
during a masquerade. Changing the state of the local channel allows for the
scenario to be detected when the channel state is set to ringing, but the peer
isn't ringing. The specific problem scenario is described in 164201. Although
this was noted on one of the issues, here is the tested dialplan verified to
work:
exten => 9700,1,Dial(Local/*9700@default&Local/0009700@default)
exten => *9700,1,Set(GLOBAL(TESTCHAN)=${CHANNEL:0:${MATH(${LEN(${CHANNEL})}-1):0:2}}1)
exten => *9700,n,wait(3) ;3 works, 1 did not
exten => *9700,n,Dial(SIP/5001)
exten => 0009700,1,Wait(1) ;1 works, 3 did not
exten => 0009700,n,ChannelRedirect(${TESTCHAN},parkedcalls,701,1)
(closes issue #14992)
Reported by: davidw
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246070
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 16:01:28 +0000 (16:01 +0000)]
Solaris doesn't like outputting a NULL to a %s in format strings.
Detect all platforms that don't like that, either, and ensure that when documentation is
missing, we pass a non-NULL pointer when outputting the corresponding documentation.
(closes issue #16689)
Reported by: bklang
Patches:
20100209__issue16689__with_tests.diff.txt uploaded by tilghman (license 14)
Review: https://reviewboard.asterisk.org/r/497/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246030
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 15:36:57 +0000 (15:36 +0000)]
Enable warnings on atypical conditions for the FILTER function (suggested by mmichelson on the -dev list).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@246022
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 10 Feb 2010 14:06:12 +0000 (14:06 +0000)]
Merged revisions 245944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r245944 | tilghman | 2010-02-10 07:37:13 -0600 (Wed, 10 Feb 2010) | 2 lines
Include examples of FILTER usage in extension patterns where a "." may be a risk.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245945
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 9 Feb 2010 23:32:14 +0000 (23:32 +0000)]
Various updates to the unit test API.
1) It occurred to me that the difference in usage between the error ast_str and
the ast_test_update_status() usage has turned out to be a bit ambiguous in
practice. In a lot of cases, the same message was being sent to both.
In other cases, it was only sent to one or the other. My opinion now is that
in every case, I think it makes sense to do both; we should output it to the
CLI as well as save it off for logging purposes.
This change results in most of the changes in this diff, since it required
changes to all existing unit tests. It also allowed for some simplifications
of unit test API implementation code.
2) Update ast_test_status_update() to include the file, function, and line
number for the code providing the update.
3) There are some formatting tweaks here and there. Hopefully they aren't too
distracting for code review purposes. Reviewboard's diff viewer seems to do a
pretty good job of pointing out when something is a whitespace change.
4) I moved the md5_test and sha1_test into the test_utils module. It seemed
like a better approach since these tests are so tiny.
5) I changed the number of nodes used in heap_test_2 from 1 million to
100 thousand. The only reason for this was to reduce the time it took
for this test to run.
6) Remove an unused function prototype that was at the bottom of utils.h.
7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro. The one
minor difference in behavior is that it no longer checks for a test registered
with the same name.
8) Expand the code in test_alloc() to provide specific error messages for each
failure case, to clearly inform developers if they forget to set the name,
summary, description, etc.
9) Tweak the output of the "test show registered" CLI command. I swapped the
name and category to have the category first. It seemed more natural since
that is the sort key.
10) Don't output the status ast_str in the "test show results" CLI command.
This is going to tend to be pretty verbose, so just leave that for the
detailed test logs (test generate results).
Review: https://reviewboard.asterisk.org/r/493/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245864
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 9 Feb 2010 23:18:58 +0000 (23:18 +0000)]
fixes a merging error for the iaxs and iaxsl off by one fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245804
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 9 Feb 2010 23:07:17 +0000 (23:07 +0000)]
Merged revisions 245792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r245792 | dvossel | 2010-02-09 16:55:38 -0600 (Tue, 09 Feb 2010) | 12 lines
Fixes iaxs and iaxsl size off by one issue.
2^15 = 32768 which is the maximum allowed iax2 callnumber.
Creating the iaxs and iaxsl array of size 32768 means the maximum
callnumber is actually out of bounds. This causes a nasty crash.
(closes issue #15997)
Reported by: exarv
Patches:
iax_fix.diff uploaded by dvossel (license 671)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245793
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 9 Feb 2010 18:06:30 +0000 (18:06 +0000)]
Ensure frames are only freed once.
(closes issue #16361)
Reported by: vlad
Patches:
20100208__issue16361.diff.txt uploaded by tilghman (license 14)
Tested by: kenny, bloodoff, misaksen
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245729
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Matthew Nicholson [Tue, 9 Feb 2010 17:40:04 +0000 (17:40 +0000)]
This commit removes an extra newline in T.38 generated SDP packets. This bug was caused by the fix introduced in r243860.
(closes issue #16766)
Reported by: raivisr
Patches:
t38-sdp-newline-fix1.diff uploaded by mnicholson (license 96)
Tested by: raivisr
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245727
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Kevin P. Fleming [Tue, 9 Feb 2010 16:24:52 +0000 (16:24 +0000)]
Don't offer MMR or JBIG transcoding during T.38 negotiation.
After further discussion with Steve Underwood, we should not (yet) be offering
to receive MMR or JBIG transcoded streams from T.38 endpoints. A future spandsp
release will support those features, and then they can be enabled during
negotiation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245680
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 23:43:00 +0000 (23:43 +0000)]
Fix return value of get_ie_str() and get_ie_str_hash() for non-existent IE.
I found this bug while developing a unit test for event allocation. Testing
is awesome.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245624
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 23:34:01 +0000 (23:34 +0000)]
UNREGISTER instead of REGISTER in unload_module().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245623
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 23:23:45 +0000 (23:23 +0000)]
Use memmove() instead of memcpy() for a case where the buffers overlap.
Once again, valgrind is freaking awesome. That is all.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245610
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 23:20:43 +0000 (23:20 +0000)]
Remove object files from the channels/sip/ directory on make clean.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245597
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 8 Feb 2010 22:31:40 +0000 (22:31 +0000)]
Actually use _ASTLDFLAGS in the main/ and channels/ Makefiles.
They were previously passed correctly, but they simply weren't used. This
caused issues with various platforms whose builds needed to pass special
linker flags via the configure script.
(closes issue #16596)
Reported by: pprindeville
Patches:
asterisk-1.6-astldflags.patch uploaded by pprindeville (license 347)
Tested by: tilghman
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245578
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jason Parker [Mon, 8 Feb 2010 20:41:05 +0000 (20:41 +0000)]
Merged revisions 245496 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r245496 | qwell | 2010-02-08 14:39:50 -0600 (Mon, 08 Feb 2010) | 4 lines
Remove reference of documentation in source directory.
People don't always build Asterisk from source (distro packages, anybody?).
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245497
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Olle Johansson [Mon, 8 Feb 2010 11:59:10 +0000 (11:59 +0000)]
Blocked revisions 245422 via svnmerge
........
r245422 | oej | 2010-02-08 12:57:52 +0100 (Mån, 08 Feb 2010) | 2 lines
Res_features depends on res_adsi in 1.4
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245423
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 04:51:00 +0000 (04:51 +0000)]
Add the libvpb-dev package as a dependency.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245385
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 04:43:55 +0000 (04:43 +0000)]
Add a todo for pbx_gtkconsole for updating to gtk2.
This module needs to be converted to gtk2, or we will eventually have to just
remove it from the tree. gtk1 isn't even packaged anymore in the distro I'm
using. I suspect nobody uses this and that nobody would notice if we removed
it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245384
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 04:40:16 +0000 (04:40 +0000)]
Add more packages required for building Asterisk modules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245383
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 04:31:03 +0000 (04:31 +0000)]
Make chan_usbradio compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245382
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 00:42:21 +0000 (00:42 +0000)]
Add a SHA1 test module.
Review: https://reviewboard.asterisk.org/r/492/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245345
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Mon, 8 Feb 2010 00:24:54 +0000 (00:24 +0000)]
Remove unnecessary include, ast_md5_hash() comes from utils.h.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245344
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Sun, 7 Feb 2010 21:56:04 +0000 (21:56 +0000)]
Add an MD5 test module.
Review: https://reviewboard.asterisk.org/r/491/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245307
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Sun, 7 Feb 2010 21:43:11 +0000 (21:43 +0000)]
Fix a couple of spelling errors, and add format module dependencies.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245306
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Sun, 7 Feb 2010 20:57:42 +0000 (20:57 +0000)]
Tweak formatting and add minor updates to some comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245269
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Sun, 7 Feb 2010 20:56:57 +0000 (20:56 +0000)]
Remove an extra space.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245268
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Sun, 7 Feb 2010 19:51:54 +0000 (19:51 +0000)]
Remove parsing of constantssrc from reload_config.
This config option is already handled by the function handle_common_options
and it is unnecessary to parse the value again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245230
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Sat, 6 Feb 2010 14:43:03 +0000 (14:43 +0000)]
Remove useless sip options related to hash table size.
First off, these options weren't actually doing anything.
By the time the options were parsed, the peer and dialog
containers had already been allocated with their default
values.
Second, hash table size is something that doesn't really
make sense to change in a config file. If a user is that
interested in changing the hashtable size, he can modify
the source itself.
I have removed the parsing of the hash_peer, hash_user,
and hash_dialog options. I have removed the hash_user_size
variable altogether since it is not used at all. I also
changed hash_peer_size and hash_dialog_size to be constant,
and have changed the symbols to be in all caps as constants
typically are. I have also removed the entire section in
sip.conf.sample regarding configurable hashtable sizes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245192
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 5 Feb 2010 21:21:05 +0000 (21:21 +0000)]
fixes astobj2 unlinking of multiple objects when OBJ_MULTIPLE was disabled
When OBJ_MULTIPLE was off but OBJ_UNLINK was on, all the items in a bucket
were being unlinked instead of just the first match. This fixes that.
Review: https://reviewboard.asterisk.org/r/490/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245147
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Fri, 5 Feb 2010 19:26:22 +0000 (19:26 +0000)]
Merged revisions 245044 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r245044 | kpfleming | 2010-02-05 12:32:29 -0600 (Fri, 05 Feb 2010) | 5 lines
Remove contrib/firmware directory as it is empty
Remove explicit license for IAXy firmware as it is no longer included in the tree
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245090
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Fri, 5 Feb 2010 19:07:18 +0000 (19:07 +0000)]
Merge tests that verify the same thing. (Oops.)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245046
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 5 Feb 2010 18:12:41 +0000 (18:12 +0000)]
adds total call numbers available to 'iax2 show callnumber usage' cli output
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245006
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Terry Wilson [Fri, 5 Feb 2010 17:20:24 +0000 (17:20 +0000)]
Fix crash on 32-bit for users not using https
(closes issue #16778)
Reported by: pitel
Patches:
diff.txt uploaded by twilson (license 396)
Tested by: twilson, pitel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244945
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Sean Bright [Fri, 5 Feb 2010 17:05:32 +0000 (17:05 +0000)]
Merged revisions 244926 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r244926 | seanbright | 2010-02-05 12:03:35 -0500 (Fri, 05 Feb 2010) | 1 line
Update main copyright date.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244927
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 5 Feb 2010 16:59:06 +0000 (16:59 +0000)]
fixes issue with sip registry not having correct default expiry
default expiry was not being set correctly for a registry object.
Thanks to ebroad for reporting the issue and testing the patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244924
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Fri, 5 Feb 2010 04:22:15 +0000 (04:22 +0000)]
fixes memory leak in astobj2 test
ao2_iterator_destroy was not being used on the
iterator during the test. This resulted in the
container never actually being destroyed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244887
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Thu, 4 Feb 2010 23:21:49 +0000 (23:21 +0000)]
Blocked revisions 244785 via svnmerge
........
r244785 | jpeeler | 2010-02-04 17:20:21 -0600 (Thu, 04 Feb 2010) | 22 lines
Change channel state on local channels for busy,answer,ring.
Previously local channels channel state never changed. This became problematic
when the state of the other side of the local channel was lost, for example
during a masquerade. Changing the state of the local channel allows for the
scenario to be detected when the channel state is set to ringing, but the peer
isn't ringing. The specific problem scenario is described in 164201. Although
this was noted on one of the issues, here is the tested dialplan verified to
work:
exten => 9700,1,Dial(Local/*9700@default&Local/#9700@default)
exten => *9700,1,Set(GLOBAL(TESTCHAN)=${CHANNEL:0:${MATH(${LEN(${CHANNEL})}-1):0:2}}1)
exten => *9700,n,wait(3) ;3 works, 1 did not
exten => *9700,n,Dial(SIP/5001)
exten => #9700,1,Wait(1) ;1 works, 3 did not
exten => #9700,n,ChannelRedirect(${TESTCHAN},parkedcalls,701,1)
(closes issue #14992)
Reported by: davidw
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244792
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Thu, 4 Feb 2010 23:16:30 +0000 (23:16 +0000)]
parse_moved_contact tries to parse contact_name twice
parse_moved_contact attempts to remove a quoted string
twice, and the first try wasn't even being done correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244769
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Thu, 4 Feb 2010 22:43:33 +0000 (22:43 +0000)]
Try to make ast_format_str_reduce fail...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244768
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Thu, 4 Feb 2010 18:47:21 +0000 (18:47 +0000)]
Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244729
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Thu, 4 Feb 2010 18:46:12 +0000 (18:46 +0000)]
Define a small set of constant return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244728
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Thu, 4 Feb 2010 15:36:33 +0000 (15:36 +0000)]
fix truncated format string in 'test show registered'
When using the 'test show registered' cli command the 'Test Results'
category was truncating the last few characters making it look like
'Test Resul'. I also expanded other parts of the format to better
represent how long function names and categories will likely be.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244688
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Richard Mudgett [Thu, 4 Feb 2010 00:12:31 +0000 (00:12 +0000)]
Add ignore *.i files property to the new channels/sip directory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244647
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 3 Feb 2010 20:48:36 +0000 (20:48 +0000)]
Add some additional option support for non-default parking lots.
The options are: parkedcallparking, parkedcallhangup, parkedcallrecording, and
parkedcalltransfers. Previously these options were only available for the
default parking lot.
(closes issue #16641)
Reported by: bluecrow76
Patches:
asterisk-1.6.2.1-features.c.diff uploaded by bluecrow76 (license 270)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244598
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Wed, 3 Feb 2010 20:33:32 +0000 (20:33 +0000)]
-----Changes -----
New files
- channels/sip/sip.h – A new header for shared #define, enum, and struct
definitions.
- channels/sip/include/sip_utils.h – sip util functions shared among
the all the sip APIs
- channels/sip/include/config_parser.h – sip config-parser API
- channels/sip/config_parser.c – Contains sip.conf parsing helper functions
with unit tests.
- channels/sip/include/reqresp_parser.h – sip request response parser API
- channels/sip/reqresp_parser.c – Contains sip request and response parsing
helper functions with unit tests.
New Unit Tests
- sip_parse_uri_test
- sip_parse_host_test
- sip_parse_register_line_test
Code Refactoring
- All reusable #define, enum, and struct definitions were moved out of chan_sip.c
into sip.h. During this process formatting changes were made to comments
in both sip.h and chan_sip.c in order to better adhere to the coding guidelines.
- The beginnings of three new sip APIs, sip-utils.h, config-parser.h,
reqresp-parser.h using existing chan_sip.c functions.
- parse_uri() and get_calleridname() were moved from chan_sip.c to request-parser.c
along with unit tests for both functions.
- sip_parse_host() and sip_parse_register_line() were moved from chan_sip.c to
config-parser.c along with unit tests for both functions.
Changes to parse_uri()
-removal of the options parameter. It was never used and did not behave correctly.
-additional check for [?header] field. When this field was present, the transport
type was not being set correctly.
----- Overview -----
This patch is introduced with the hope that unit tests for all our sip parsing
functions will be written soon. chan_sip is a huge file, and with the addition of
each unit test chan_sip is going to grow larger and harder to maintain. I'm proposing
we begin refactoring chan_sip, starting with the parsing functions. With each parsing
function we move into a separate helper file, a unit test should accompany it. I've
attempted to lay down the ground work for this change by creating two new parser
helper files (config-parser.c and reqresp-parser.c) and moving all shared structs,
enums, and defines from chan_sip.c into a shared sip.h file. We can't verify everything
in Asterisk using unit tests, but string parsing is one area where unit tests make
the most sense. By beginning to restructure the code in this way, chan_sip not only
becomes less bloated, but Asterisk as a whole will become more stable.
Review: https://reviewboard.asterisk.org/r/477/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244597
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 3 Feb 2010 19:26:53 +0000 (19:26 +0000)]
Initialize counters in ast_sched_report so that resulting data is not bogus.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244547
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Wed, 3 Feb 2010 18:34:29 +0000 (18:34 +0000)]
The chanvar= setting should inherit the entire list of variables, not just the first one.
(closes issue #16359)
Reported by: raarts
Patches:
dahdi-setvars.diff uploaded by raarts (license 937)
Tested by: raarts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244505
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 2 Feb 2010 22:27:23 +0000 (22:27 +0000)]
fixes crash during T.38 negotiation caused by invalid or missing FaxMaxDatagram field
AST-2010-001
(closes issue #16634)
Reported by: krn
(closes issue #16724)
Reported by: barthpbx
(closes issue #16517)
Reported by: bklang
(closes issue #16485)
Reported by: elsto
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244443
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 2 Feb 2010 20:32:29 +0000 (20:32 +0000)]
Properly respect GOSUB_RESULT as to what to do with the master channel.
Previously, we would parse GOSUB_RESULT, but not actually do anything with it.
Also, allow GOSUB_RETVAL to be inherited back across a peer/master channel.
(closes issue #16687)
Reported by: bklang
Patches:
app_dial-preserve-gosub_retval.patch uploaded by bklang (license 919)
(with modifications)
(closes issue #16686)
Reported by: bklang
Patches:
app_dial-respect-gosub_result.patch uploaded by bklang (license 919)
(with modifications)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244393
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 2 Feb 2010 18:54:33 +0000 (18:54 +0000)]
Correct some off-by-one errors, especially when expressions don't contain expected spaces.
Also include the tests provided by the reporter, as regression tests.
(closes issue #16667)
Reported by: wdoekes
Patches:
astsvn-func_match-off-by-one.diff uploaded by wdoekes (license 717)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244331
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 1 Feb 2010 23:16:12 +0000 (23:16 +0000)]
Merged revisions 244242 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r244242 | tilghman | 2010-02-01 17:13:44 -0600 (Mon, 01 Feb 2010) | 11 lines
Backup and restore original textfile, for prosthesis (gerund of prepend).
Also, fix menuselect such that changing voicemail build options correctly
causes rebuild.
(closes issue #16415)
Reported by: tomo1657
Patches:
prepention.patch uploaded by tomo1657 (license 484)
(with modifications by me to backport to 1.4)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244243
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 1 Feb 2010 18:39:32 +0000 (18:39 +0000)]
Blocked revisions 244151 via svnmerge (fixed a different way in trunk and 1.6.x)
........
r244151 | tilghman | 2010-02-01 12:38:37 -0600 (Mon, 01 Feb 2010) | 8 lines
When a transferer hangs up during an attended transfer BEFORE the transfer is answered, don't stop playing MOH.
(closes issue #16513)
Reported by: litnimax
Patches:
atxfer_moh_16513.patch uploaded by gknispel proformatique (license 261)
Tested by: litnimax
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244154
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Mon, 1 Feb 2010 17:53:39 +0000 (17:53 +0000)]
Merged revisions 244070 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r244070 | tilghman | 2010-02-01 11:46:31 -0600 (Mon, 01 Feb 2010) | 16 lines
Revert previous chan_local fix (r236981) and fix instead by destroying expired frames in the queue.
(closes issue #16525)
Reported by: kobaz
Patches:
20100126__issue16525.diff.txt uploaded by tilghman (license 14)
20100129__issue16525__1.6.0.diff.txt uploaded by tilghman (license 14)
Tested by: kobaz, atis
(closes issue #16581)
Reported by: ZX81
(closes issue #16681)
Reported by: alexr1
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@244071
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Thu, 28 Jan 2010 22:37:15 +0000 (22:37 +0000)]
Optimization to manager events.
When potentially sending manager events, return immediately if there are no
sessions or hooks. Also, avoid locking the hooks list if it is empty.
(issue #16455)
Reported by: atis
Patches:
manager_hooks_trunk.patch uploaded by atis (license 242)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243986
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Thu, 28 Jan 2010 20:00:09 +0000 (20:00 +0000)]
Informational message, not an error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243943
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Thu, 28 Jan 2010 18:35:15 +0000 (18:35 +0000)]
Add a missing line terminator for T.38 SDP.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243860
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Thu, 28 Jan 2010 15:07:23 +0000 (15:07 +0000)]
Merged revisions 243779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243779 | russell | 2010-01-28 09:03:17 -0600 (Thu, 28 Jan 2010) | 2 lines
Fix a bogus third argument to ast_copy_string().
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243780
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 27 Jan 2010 20:37:33 +0000 (20:37 +0000)]
Merged revisions 243691 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243691 | jpeeler | 2010-01-27 14:35:56 -0600 (Wed, 27 Jan 2010) | 5 lines
Revert 243570, I should have looked at this closer. Will reopen the issue, but
am leaving the review closed as the change was pointless.
(issue #16488)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243693
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 27 Jan 2010 20:06:08 +0000 (20:06 +0000)]
expand code based appreviation of AST_CONFIG_DIR to configuration directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243652
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 27 Jan 2010 18:49:52 +0000 (18:49 +0000)]
Merged revisions 243570 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243570 | jpeeler | 2010-01-27 12:47:34 -0600 (Wed, 27 Jan 2010) | 9 lines
Extend announcement URL used with Queue from 80 chars to PATH_MAX.
(closes issue #16488)
Reported by: syspert
Patches:
soundfilelen.pacth-2 uploaded by syspert (license 938)
Review: https://reviewboard.asterisk.org/r/475/
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243571
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Wed, 27 Jan 2010 18:29:49 +0000 (18:29 +0000)]
Add new option to asterisk.conf (lockconfdir) to protect conf dir during reloads
(closes issue #16358)
Reported by: raarts
Patches:
lockconfdir.diff uploaded by raarts (license 937)
modified by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243551
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Mark Michelson [Wed, 27 Jan 2010 18:08:02 +0000 (18:08 +0000)]
Merged revisions 243486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243486 | mmichelson | 2010-01-27 12:06:43 -0600 (Wed, 27 Jan 2010) | 3 lines
Use a safe list traversal while checking for duplicate vars in pbx_builtin_setvar_helper.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243487
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Wed, 27 Jan 2010 17:32:07 +0000 (17:32 +0000)]
Fix the ability to specify an OSP token for an outbound IAX2 call.
When this patch was originally submitted, the code allowed for the token to be
set via a channel variable. I decided that a cleaner approach would be to
integrate it into the CHANNEL() function. Unfortunately, that is not a suitable
approach. It's not possible to get the value set on the channel soon enough
using that method. So, go back to the simple channel variable method.
(closes issue #16711)
Reported by: homesick
Patches:
iax-svn.diff uploaded by homesick (license 91)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243482
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 26 Jan 2010 23:56:57 +0000 (23:56 +0000)]
Merged revisions 243390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243390 | dvossel | 2010-01-26 17:55:49 -0600 (Tue, 26 Jan 2010) | 9 lines
fixes bug with channel receiving wrong privileges after call parking
(closes issue #16429)
Reported by: Yasuhiro Konishi
Patches:
features.c.diff uploaded by Yasuhiro Konishi (license 947)
Tested by: dvossel
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243391
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Ruggles [Tue, 26 Jan 2010 20:49:57 +0000 (20:49 +0000)]
Code clean up in app_senddtmf
Pushes code clean up done in app_externalivr back
into app_senddtmf
Review: https://reviewboard.asterisk.org/r/473/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243346
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Tue, 26 Jan 2010 18:20:55 +0000 (18:20 +0000)]
Merged revisions 243258 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r243258 | jpeeler | 2010-01-26 12:19:10 -0600 (Tue, 26 Jan 2010) | 2 lines
Remove unnecessary code in ast_read as issue 16058 has been fully solved now.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243266
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Jeff Peeler [Tue, 26 Jan 2010 18:07:57 +0000 (18:07 +0000)]
Fix crash resulting from frames with invalid data pointers.
In ast_frdup the frame data union does not get set to point to malloced memory
if the datalen is zero, so make sure to handle the same case in ast_frisolate
appropriately.
(closes issue #16058)
Reported by: atis
Patches:
bug16058-fix.patch uploaded by jpeeler (license 325)
Tested by: atis
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243244
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 26 Jan 2010 17:40:02 +0000 (17:40 +0000)]
modify 'test show registered' cli output format
In order to improve readability, the output from 'test show
registered' has been modified to truncate fields to fit within
the format output if they are over a certain length.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243242
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
David Vossel [Tue, 26 Jan 2010 16:30:08 +0000 (16:30 +0000)]
RFC compliant uri and display-name encode/decode
1. URI Encoding
This patch changes ast_uri_encode()'s behavior when doreserved is enabled.
Previously when doreserved was enabled only a small set of reserved
characters were encoded. This set was comprised primarily of the reserved
characters defined in RFC3261 section 25.1, but contained other characters as
well. Rather than only escaping the reserved set, doreserved now escapes
all characters not within the unreserved set as defined by RFC 3261 and
RFC 2396. Also, the 'doreserved' variable has been renamed to 'do_special_char'
in attempts to avoid confusion.
When doreserve is not enabled, the previous logic of only encoding the
characters <= 0X1F and > 0X7f remains, except for the '%' character, which
must always be encoded as it signifies a HEX escaped character during the decode
process.
2. URI Decoding: Break up URI before decode.
In chan_sip.c ast_uri_decode is called on the entire URI instead of it's
individual parts after it is parsed. This is not good as ast_uri_decode
can introduce special characters back into the URI which can mess up parsing.
This patch resolves this by not decoding a URI until parsing is completely
done. There are many instances where we check to see if pedantic checking
is enabled before we decode a URI. In these cases a new macro,
SIP_PEDANTIC_DECODE, is used on the individual parsed segments of the URI
rather than constantly putting if (pedantic) { decode() } checks everywhere
in the code. In the areas where ast_uri_decode is not dependent upon
pedantic checking this macro is not used, but decoding is still moved to
each individual part of the URI. The only behavior that should change from
this patch is the time at which decoding occurs.
Since I had to look over every place URI parsing occurs to create this
patch, I found several places where we use duplicate code for parsing.
To consolidate the code, those areas have updated to use the parse_uri()
function where possible.
3. SIP display-name decoding according to RFC3261 section 25.
To properly decode the display-name portion of a FROM header, chan_sip's
get_calleridname() function required a complete re-write. More information
about this change can be found in the comments at the beginning of this function.
4. Unit Tests.
Unit tests for ast_uri_encode, ast_uri_decode, and get_calleridname() have been
written. This involved the addition of the test_utils.c file for testing the
utils api.
(closes issue #16299)
Reported by: wdoekes
Patches:
astsvn-16299-get_calleridname.diff uploaded by wdoekes (license 717)
get_calleridname_rewrite.diff uploaded by dvossel (license 671)
Tested by: wdoekes, dvossel, Nick_Lewis
Review: https://reviewboard.asterisk.org/r/469/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243200
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 26 Jan 2010 15:46:53 +0000 (15:46 +0000)]
Log the variable name being tested.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243158
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 26 Jan 2010 15:35:40 +0000 (15:35 +0000)]
Update test_substitution to show failures in the test log.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243157
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Russell Bryant [Tue, 26 Jan 2010 15:16:59 +0000 (15:16 +0000)]
Update func_aes to its pre-ast_str_substitution state.
This change makes the AES tests in test_substitution.c pass. We still need to
work through what's going wrong in the ast_str version.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243118
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 26 Jan 2010 01:56:24 +0000 (01:56 +0000)]
Fixing last errors in the conversion, though it appears that the AES_* functions are still broken.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243077
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
Tilghman Lesher [Tue, 26 Jan 2010 01:41:47 +0000 (01:41 +0000)]
Using a dummy channel causes CDR() testing to fail.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@243076
65c4cc65-6c06-0410-ace0-
fbb531ad65f3