asterisk/asterisk.git
13 years agoMerged revisions 48956 via svnmerge from
Russell Bryant [Mon, 25 Dec 2006 05:22:40 +0000 (05:22 +0000)]
Merged revisions 48956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48956 | russell | 2006-12-25 00:21:20 -0500 (Mon, 25 Dec 2006) | 14 lines

Merged revisions 48955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48955 | russell | 2006-12-25 00:19:48 -0500 (Mon, 25 Dec 2006) | 6 lines

Fix an error introduced by copying and pasting the handling of the >= operator
for the MATH function.  If a single equal sign was used as an operator, the
function would treat it is as if it were the >= operator.  Now, it properly
handles it as an invalid operator.
(issue #8665, patch by tempest1)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48957 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoSimplify the if statements used to check to see if the argument was "num"
Russell Bryant [Mon, 25 Dec 2006 02:31:04 +0000 (02:31 +0000)]
Simplify the if statements used to check to see if the argument was "num"
or "number".  It is not possible to ever reach the second part of this
conditional statement.

Thanks to my brother, Brett, for pointing this out.  :)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48951 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoResolve some compiler warnings
Russell Bryant [Mon, 25 Dec 2006 02:06:47 +0000 (02:06 +0000)]
Resolve some compiler warnings

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48950 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48948 via svnmerge from
Russell Bryant [Sun, 24 Dec 2006 21:21:21 +0000 (21:21 +0000)]
Merged revisions 48948 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48948 | russell | 2006-12-24 16:19:37 -0500 (Sun, 24 Dec 2006) | 3 lines

Fix a typo in an error message that indicated that the MGCP channel type could
not be registered, instead of the correct type, OSS.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48949 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUse spaces as a separator for the redirect option to improve readability
Russell Bryant [Sun, 24 Dec 2006 21:01:02 +0000 (21:01 +0000)]
Use spaces as a separator for the redirect option to improve readability

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48947 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48944 via svnmerge from
Russell Bryant [Sun, 24 Dec 2006 07:27:29 +0000 (07:27 +0000)]
Merged revisions 48944 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48944 | russell | 2006-12-24 02:25:38 -0500 (Sun, 24 Dec 2006) | 11 lines

Merged revisions 48943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48943 | russell | 2006-12-24 02:23:07 -0500 (Sun, 24 Dec 2006) | 3 lines

Check for the proper return value on an error in a call to mmap().
This was reported by Andy Wang on the asterisk-dev list.  Thanks!

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48945 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48940 via svnmerge from
Russell Bryant [Sun, 24 Dec 2006 06:51:37 +0000 (06:51 +0000)]
Merged revisions 48940 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48940 | russell | 2006-12-24 01:49:31 -0500 (Sun, 24 Dec 2006) | 11 lines

Merged revisions 48939 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48939 | russell | 2006-12-24 01:47:29 -0500 (Sun, 24 Dec 2006) | 3 lines

Remove a couple of misplaced dots in log messages.  This was reported by
Andrea Spadaccini on the asterisk-dev mailing list.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48941 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoSimplify the definition of http_uri_redirect such that only one allocation is
Russell Bryant [Sun, 24 Dec 2006 03:29:42 +0000 (03:29 +0000)]
Simplify the definition of http_uri_redirect such that only one allocation is
done for exactly how much memory is needed.  This was suggested by Luigi on
the asterisk-dev mailing list.  Thanks!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48933 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoBlocked revisions 48931 via svnmerge
Russell Bryant [Sat, 23 Dec 2006 20:26:34 +0000 (20:26 +0000)]
Blocked revisions 48931 via svnmerge

........
r48931 | russell | 2006-12-23 15:22:52 -0500 (Sat, 23 Dec 2006) | 2 lines

Implement locking for the list of URI handlers to make it thread-safe.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48932 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years ago- Convert the list of URI handlers to use the linked list macros. While doing
Russell Bryant [Sat, 23 Dec 2006 20:13:14 +0000 (20:13 +0000)]
- Convert the list of URI handlers to use the linked list macros.  While doing
  this, implementing locking of this list to make it thread-safe.

- Add a "redirect" option to http.conf that allows redirecting one URI to
  another.  I was inspired to do this while playing with the Asterisk GUI.  I
  got tired of typing this URL to get to the GUI:

     http://localhost:8088/asterisk/static/config/cfgadvanced.html

  So, now I have the following line in http.conf:

     redirect=/=/asterisk/static/config/cfgadvanced.html

  Now, I can type the following into my browser and go to the GUI:

     http://localhost:8088

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48930 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoRemove a debug message. If this is still needed for debugging something,
Russell Bryant [Sat, 23 Dec 2006 20:08:16 +0000 (20:08 +0000)]
Remove a debug message.  If this is still needed for debugging something,
it should be made a LOG_DEBUG message.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48929 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoWe should probably declare the lock... and not just the constructor/deconstructor.
Joshua Colp [Sat, 23 Dec 2006 19:55:38 +0000 (19:55 +0000)]
We should probably declare the lock... and not just the constructor/deconstructor.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48928 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUse the correct function to destroy an rwlock in the destructor for an ast_rwlock_t
Russell Bryant [Sat, 23 Dec 2006 19:51:56 +0000 (19:51 +0000)]
Use the correct function to destroy an rwlock in the destructor for an ast_rwlock_t

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48927 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48906 via svnmerge from
Jason Parker [Fri, 22 Dec 2006 22:34:31 +0000 (22:34 +0000)]
Merged revisions 48906 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48906 | qwell | 2006-12-22 16:33:46 -0600 (Fri, 22 Dec 2006) | 2 lines

Minor fixes for Solaris.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48907 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48888 via svnmerge from
Jason Parker [Fri, 22 Dec 2006 21:40:56 +0000 (21:40 +0000)]
Merged revisions 48888 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48888 | qwell | 2006-12-22 15:40:20 -0600 (Fri, 22 Dec 2006) | 2 lines

Note to self: Run make before committing...

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48889 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48870 via svnmerge from
Jason Parker [Fri, 22 Dec 2006 20:43:38 +0000 (20:43 +0000)]
Merged revisions 48870 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48870 | qwell | 2006-12-22 14:43:05 -0600 (Fri, 22 Dec 2006) | 2 lines

Fix for issue 7774 - patch by alamantia

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48871 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoimprove readability of a few macros.
Luigi Rizzo [Fri, 22 Dec 2006 10:35:20 +0000 (10:35 +0000)]
improve readability of a few macros.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48857 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomake sms_hexdump() thread safe;
Luigi Rizzo [Thu, 21 Dec 2006 23:33:44 +0000 (23:33 +0000)]
make sms_hexdump() thread safe;

restructure and reduce indentation on some blocks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48844 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomake isodate thread-safe
Luigi Rizzo [Thu, 21 Dec 2006 22:15:03 +0000 (22:15 +0000)]
make isodate thread-safe

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48832 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years ago- use the standard option parsing routines;
Luigi Rizzo [Thu, 21 Dec 2006 22:03:54 +0000 (22:03 +0000)]
- use the standard option parsing routines;

- document existing but undocumented parameters to send a message
  (untested but unchanged;

- ad a new option p(N) to set the initial message delay to N ms
  so this can be adapted from the dialplan to various countries;

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerge non-blocking logger from my branch. This should improve things under heavy...
Joshua Colp [Thu, 21 Dec 2006 21:57:16 +0000 (21:57 +0000)]
Merge non-blocking logger from my branch. This should improve things under heavy load with lots of CLI/logging output.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48817 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48783 via svnmerge from
Joshua Colp [Thu, 21 Dec 2006 20:28:17 +0000 (20:28 +0000)]
Merged revisions 48783 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r48783 | file | 2006-12-21 15:26:29 -0500 (Thu, 21 Dec 2006) | 10 lines

Merged revisions 48782 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r48782 | file | 2006-12-21 15:25:01 -0500 (Thu, 21 Dec 2006) | 2 lines

Add new silence sound files to the spec for Redhat. (issue #8652 reported by alvaro_palma_aste)

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48785 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoThis little mod gets rid of that g722 compiler warning that breaks builds configured...
Steve Murphy [Thu, 21 Dec 2006 20:15:20 +0000 (20:15 +0000)]
This little mod gets rid of that g722 compiler warning that breaks builds configured with --enable-dev-mode; the previous commit of 48767 was to merge in changes for bug 6334, unifying the open mode arguments for saner operation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48781 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoput generator functions next to each other.
Luigi Rizzo [Thu, 21 Dec 2006 19:52:18 +0000 (19:52 +0000)]
put generator functions next to each other.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48768 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoa quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile...
Steve Murphy [Thu, 21 Dec 2006 19:44:20 +0000 (19:44 +0000)]
a quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile under --enable-dev-mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48767 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agosame as in other places, check that generator->release is not NULL
Luigi Rizzo [Thu, 21 Dec 2006 19:36:42 +0000 (19:36 +0000)]
same as in other places, check that generator->release is not NULL
before calling it.
This allows generators to set it to NULL when they have nothing to
do there.

Later, the three copies of the code that releases a generator
should be moved to a function.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48766 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreduce indentation
Luigi Rizzo [Thu, 21 Dec 2006 18:54:17 +0000 (18:54 +0000)]
reduce indentation

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48752 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agorestructure a block to reduce nesting
Luigi Rizzo [Thu, 21 Dec 2006 18:35:22 +0000 (18:35 +0000)]
restructure a block to reduce nesting

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48750 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd a bit of documentation on this code, including pointers
Luigi Rizzo [Thu, 21 Dec 2006 16:50:26 +0000 (16:50 +0000)]
Add a bit of documentation on this code, including pointers
to relevant documents and comment on timing issues.

Initial merge of the code in

http://bugs.digium.com/view.php?id=8586

by Filippo Grassilli (Hyppo) to support
the SMS Protocol 2.

In this commit i have tried to minimize the diffs, so further
code cleanup will come in subsequent commits.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48736 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoThis small update will generate WARNINGS if there is garbage in your extensions.conf...
Steve Murphy [Thu, 21 Dec 2006 15:52:44 +0000 (15:52 +0000)]
This small update will generate WARNINGS if there is garbage in your extensions.conf file (liken extem => instead of exten => !)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48723 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoReally clean up indications to use the linkedlists API
Joshua Colp [Thu, 21 Dec 2006 04:05:21 +0000 (04:05 +0000)]
Really clean up indications to use the linkedlists API

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48709 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoSwitch list of global variables to read/write locks.
Joshua Colp [Thu, 21 Dec 2006 03:20:08 +0000 (03:20 +0000)]
Switch list of global variables to read/write locks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48699 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoConvert alternate dialplan switch list to use read/write locks.
Joshua Colp [Thu, 21 Dec 2006 01:48:35 +0000 (01:48 +0000)]
Convert alternate dialplan switch list to use read/write locks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48680 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAs per bug 7978, this version introduces the jittertargetextra option in config files
Steve Murphy [Thu, 21 Dec 2006 00:24:08 +0000 (00:24 +0000)]
As per bug 7978, this version introduces the jittertargetextra option in config files

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48663 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMinor addition giving props to Steve Underwood for his hard work. Thanks again
Matthew Fredrickson [Thu, 21 Dec 2006 00:11:00 +0000 (00:11 +0000)]
Minor addition giving props to Steve Underwood for his hard work.  Thanks again
Steve!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48662 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd codec G.722 support.
Matthew Fredrickson [Thu, 21 Dec 2006 00:08:21 +0000 (00:08 +0000)]
Add codec G.722 support.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48661 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoClean up app_page
Joshua Colp [Wed, 20 Dec 2006 04:32:59 +0000 (04:32 +0000)]
Clean up app_page

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48639 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48637 via svnmerge from
Joshua Colp [Wed, 20 Dec 2006 02:58:13 +0000 (02:58 +0000)]
Merged revisions 48637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48637 | file | 2006-12-19 21:56:09 -0500 (Tue, 19 Dec 2006) | 2 lines

vms doesn't exist on non-IMAP storage builds.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48638 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomore formatting cleanup.
Luigi Rizzo [Wed, 20 Dec 2006 00:13:23 +0000 (00:13 +0000)]
more formatting cleanup.
Move some code into a function sms_compose1() in preparation
for supporting protocol 2 as well.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48599 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoformatting and code cleanup.
Luigi Rizzo [Tue, 19 Dec 2006 23:56:08 +0000 (23:56 +0000)]
formatting and code cleanup.
Still a lot of copy&pasted code here...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48598 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48596 via svnmerge from
Joshua Colp [Tue, 19 Dec 2006 23:05:57 +0000 (23:05 +0000)]
Merged revisions 48596 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48596 | file | 2006-12-19 18:04:30 -0500 (Tue, 19 Dec 2006) | 2 lines

Pass 'vms' pointer to record_and_review so it is then passed to the IMAP store file function. (issue #8614 reported by punknow)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48597 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate res_snmp to use new API declaration of pbx_builtin_serialize_variables (issue...
Joshua Colp [Tue, 19 Dec 2006 22:55:26 +0000 (22:55 +0000)]
Update res_snmp to use new API declaration of pbx_builtin_serialize_variables (issue #8627 reported by johann8384)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48595 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48592 via svnmerge from
Joshua Colp [Tue, 19 Dec 2006 22:02:27 +0000 (22:02 +0000)]
Merged revisions 48592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48592 | file | 2006-12-19 17:00:57 -0500 (Tue, 19 Dec 2006) | 2 lines

find is not the same as bind when it comes to documentation. (issue #8626 reported by johann8384)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48593 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoOpenBSD does not have RLIMIT_AS or RLIMIT_VMEM so until someone finds the right rlimi...
Joshua Colp [Tue, 19 Dec 2006 21:59:33 +0000 (21:59 +0000)]
OpenBSD does not have RLIMIT_AS or RLIMIT_VMEM so until someone finds the right rlimit to use then let's not support the -v option on OpenBSD. (issue #8543 reported by jtodd)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48591 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoblock 48583
Luigi Rizzo [Tue, 19 Dec 2006 21:32:31 +0000 (21:32 +0000)]
block 48583

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48589 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agostart documenting this code.
Luigi Rizzo [Tue, 19 Dec 2006 21:29:55 +0000 (21:29 +0000)]
start documenting this code.
On passing, fix the bogus datalen on outgoing frames
just fixed in 1.4 rev.48583

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48588 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48586 via svnmerge from
Kevin P. Fleming [Tue, 19 Dec 2006 21:28:43 +0000 (21:28 +0000)]
Merged revisions 48586 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48586 | kpfleming | 2006-12-19 15:28:04 -0600 (Tue, 19 Dec 2006) | 2 lines

suppress compiler warnings in this module until it can be improved

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48587 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agobetter name for struct dial_localuser.
Luigi Rizzo [Tue, 19 Dec 2006 16:36:45 +0000 (16:36 +0000)]
better name for struct dial_localuser.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48581 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoremove now useless extern declarations.
Luigi Rizzo [Tue, 19 Dec 2006 16:35:49 +0000 (16:35 +0000)]
remove now useless extern declarations.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48580 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48577 via svnmerge from
Kevin P. Fleming [Tue, 19 Dec 2006 14:57:45 +0000 (14:57 +0000)]
Merged revisions 48577 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48577 | kpfleming | 2006-12-19 08:57:09 -0600 (Tue, 19 Dec 2006) | 2 lines

use the proper variable type for these unixODBC API calls, eliminating warnings on 64-bit platforms that use the 'new' 64-bit types for ODBC API calls

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48578 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agointroduce a temporary variable for tmp->chan to shorten expressions.
Luigi Rizzo [Tue, 19 Dec 2006 09:58:40 +0000 (09:58 +0000)]
introduce a temporary variable for tmp->chan to shorten expressions.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48575 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agostop what i think is a memory leak in case Dial fails to
Luigi Rizzo [Tue, 19 Dec 2006 09:33:57 +0000 (09:33 +0000)]
stop what i think is a memory leak in case Dial fails to
connect to a channel.

Before committing to 1.4 i would like some other people to
review and test this fix - thanks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48574 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomove a large block related to privacy handling to a separate function.
Luigi Rizzo [Tue, 19 Dec 2006 09:15:23 +0000 (09:15 +0000)]
move a large block related to privacy handling to a separate function.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48573 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48571 via svnmerge from
Joshua Colp [Tue, 19 Dec 2006 03:47:44 +0000 (03:47 +0000)]
Merged revisions 48571 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48571 | file | 2006-12-18 22:46:12 -0500 (Mon, 18 Dec 2006) | 2 lines

Use env -i to start a fresh environment when going to build menuselect. This is more portable then using unset. (issue #8543 reported by jtodd)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48572 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agounbreak the macro used for incrementing the frame counters.
Luigi Rizzo [Mon, 18 Dec 2006 17:44:18 +0000 (17:44 +0000)]
unbreak the macro used for incrementing the frame counters.

I don't know when the bug was introduced, but with the typical usage

c->fin = FRAMECOUNT_INC(c->fin)

the frame counters stay to 0.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48568 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoClean up find_idle_thread function and use atomic operations for dynamic thread count.
Joshua Colp [Mon, 18 Dec 2006 17:30:53 +0000 (17:30 +0000)]
Clean up find_idle_thread function and use atomic operations for dynamic thread count.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48567 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48564 via svnmerge from
Joshua Colp [Mon, 18 Dec 2006 17:18:18 +0000 (17:18 +0000)]
Merged revisions 48564 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48564 | file | 2006-12-18 12:15:49 -0500 (Mon, 18 Dec 2006) | 2 lines

Put thread into proper list if we abort handling due to an error, and also hold the lock while putting it back into the proper idle list so we don't prematurely get a signal. (issue #8604 reported by arkadia)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48565 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoctrl-w != w (nano search) (surprisingly, the fix was ever so slightly different...
Jason Parker [Mon, 18 Dec 2006 16:57:24 +0000 (16:57 +0000)]
ctrl-w != w  (nano search)  (surprisingly, the fix was ever so slightly different in 1.4)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48563 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoBlocked revisions 48561 via svnmerge
Jason Parker [Mon, 18 Dec 2006 16:56:44 +0000 (16:56 +0000)]
Blocked revisions 48561 via svnmerge

........
r48561 | qwell | 2006-12-18 10:55:46 -0600 (Mon, 18 Dec 2006) | 2 lines

ctrl-w != w  (nano search)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48562 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoapply the proposed fix for bug 8602
Luigi Rizzo [Mon, 18 Dec 2006 16:24:44 +0000 (16:24 +0000)]
apply the proposed fix for bug 8602
http://bugs.digium.com/view.php?id=8602
(i am not sure if there is still missing cast in
front of the alloca() call - being a macro this is
probably triggered only when actually used).

Add function ast_str_reset() to reinitialize the
string to an empty string instead of playing with
the internal fields.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoconvert the final clients of ast_build_string to use ast_str_*()
Luigi Rizzo [Mon, 18 Dec 2006 15:38:50 +0000 (15:38 +0000)]
convert the final clients of ast_build_string to use ast_str_*()

Now the only module left using it is chan_sip.c

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48559 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agodebugging shows that we always need more than 128 bytes
Luigi Rizzo [Mon, 18 Dec 2006 15:36:31 +0000 (15:36 +0000)]
debugging shows that we always need more than 128 bytes
for the verbose and logging messages so start with a
larger buffer from the beginning.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48558 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48554 via svnmerge from
Kevin P. Fleming [Mon, 18 Dec 2006 11:59:48 +0000 (11:59 +0000)]
Merged revisions 48554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48554 | kpfleming | 2006-12-18 05:59:24 -0600 (Mon, 18 Dec 2006) | 3 lines

remove some now-unnecessary explicit includes of autoconfig.h
clean up per-file dependencies during 'make clean'

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48555 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoReplace ast_build_string with ast_str_*().
Luigi Rizzo [Mon, 18 Dec 2006 11:28:37 +0000 (11:28 +0000)]
Replace ast_build_string with ast_str_*().

On passing remove presumably duplicate code to generate
the message for the manager_hooks:

in the previous version, the message was almost the same as the one sent
to regular sessions, with the exception of the empty line at the end, and
a few (presumably unintentional) differences e.g.  timestamps,
debugging, and lowercase headers for "event" and "privilege".

now we reuse the same message as before.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48553 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreplace ast_build_string() with ast_str_*().
Luigi Rizzo [Sun, 17 Dec 2006 22:57:46 +0000 (22:57 +0000)]
replace ast_build_string() with ast_str_*().

Unless i am very mistaken, function_realtime_read() was
broken in that it would always return an empty string
(because ast_build_string() advanced the pointer to the
end of the string, and there was no reference to the
initial value.

This commit should fix this problem.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48551 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreplace ast_build_string() with ast_str_*();
Luigi Rizzo [Sun, 17 Dec 2006 22:47:30 +0000 (22:47 +0000)]
replace ast_build_string() with ast_str_*();

simplify __queues_show()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48550 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48548 via svnmerge from
Kevin P. Fleming [Sun, 17 Dec 2006 18:33:53 +0000 (18:33 +0000)]
Merged revisions 48548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48548 | kpfleming | 2006-12-17 12:33:24 -0600 (Sun, 17 Dec 2006) | 2 lines

need an additional argument here to make the downloads actually occur

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48549 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agodefine a mask SIP_INSECURE sam as for other sets of flags.
Luigi Rizzo [Sun, 17 Dec 2006 12:47:08 +0000 (12:47 +0000)]
define a mask SIP_INSECURE sam as for other sets of flags.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48543 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48528 via svnmerge from
Kevin P. Fleming [Sat, 16 Dec 2006 21:38:10 +0000 (21:38 +0000)]
Merged revisions 48528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48528 | kpfleming | 2006-12-16 15:34:41 -0600 (Sat, 16 Dec 2006) | 2 lines

use m4 quoting for AC_MSG_NOTICE calls, to keep these calls from thinking they have multiple arguments

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48525 via svnmerge from
Kevin P. Fleming [Sat, 16 Dec 2006 21:24:52 +0000 (21:24 +0000)]
Merged revisions 48525 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48525 | kpfleming | 2006-12-16 15:14:34 -0600 (Sat, 16 Dec 2006) | 2 lines

simplify dependency tracking system, using the compiler's built-in method for generating them, and only doing dependency tracking if developer mode is enabled via the configure script

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoupdate to use trunk's version of the threadstorage API
Kevin P. Fleming [Sat, 16 Dec 2006 21:24:08 +0000 (21:24 +0000)]
update to use trunk's version of the threadstorage API

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48526 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48521 via svnmerge from
Kevin P. Fleming [Sat, 16 Dec 2006 20:19:19 +0000 (20:19 +0000)]
Merged revisions 48521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48521 | kpfleming | 2006-12-16 14:12:41 -0600 (Sat, 16 Dec 2006) | 2 lines

since we really, really have to have autoconfig.h included before all other headers (especially system headers), the Makefile will now force it to happen (this will fix build problems with files like ast_expr2f.c, where we can't control the inclusion order in the file itself)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48522 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoforgot this part...
Luigi Rizzo [Sat, 16 Dec 2006 11:23:07 +0000 (11:23 +0000)]
forgot this part...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48520 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoanother conversion from ast_build_str to ast_str
Luigi Rizzo [Sat, 16 Dec 2006 09:56:31 +0000 (09:56 +0000)]
another conversion from ast_build_str to ast_str

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48517 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoconvert ast_build_str to ast_str_*
Luigi Rizzo [Sat, 16 Dec 2006 09:46:20 +0000 (09:46 +0000)]
convert ast_build_str to ast_str_*

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48516 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreplace ast_build_string() with ast_str_*() functions.
Luigi Rizzo [Sat, 16 Dec 2006 09:33:31 +0000 (09:33 +0000)]
replace ast_build_string() with ast_str_*() functions.
This makes the code easier to follow and saves some
copies to intermediate buffers.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48515 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48513 via svnmerge from
Kevin P. Fleming [Sat, 16 Dec 2006 04:25:46 +0000 (04:25 +0000)]
Merged revisions 48513 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48513 | kpfleming | 2006-12-15 22:25:09 -0600 (Fri, 15 Dec 2006) | 2 lines

instead of initializing the curl library every time the CURL() function is invoked, do it only once per thread (this allows multiple calls to CURL() in the dialplan for a channel to run much more quickly, and also to re-use connections to the server) (thanks to JerJer for frequently complaining about this performance problem)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48514 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoprevent a compiler warning
Luigi Rizzo [Sat, 16 Dec 2006 02:42:53 +0000 (02:42 +0000)]
prevent a compiler warning

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48512 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agosimplify the ast_dynamic_str_*.... routines by
Luigi Rizzo [Fri, 15 Dec 2006 23:10:42 +0000 (23:10 +0000)]
simplify the ast_dynamic_str_*.... routines by
renaming them to ast_str ... and putting the
struct ast_threadstorage pointer into the struct ast_str.

This makes the code a lot more readable.

At this point we can use these routines also to
replace ast_build_string().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48510 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomove the dynamic string support in a better place i.e. string.h
Luigi Rizzo [Fri, 15 Dec 2006 22:08:46 +0000 (22:08 +0000)]
move the dynamic string support in a better place i.e. string.h

While doing this, add a bit of documentation, and slightly
extend the functionality as follows:
 + a max_len of -1 means that we take whatever the current size
   is, and never try to extend the buffer;
 + add support for alloca()-ted dynamic strings, which is very
   useful for all cases where we do an ast_build_string() now.

Next step is to simplify the interface by using shorter names
(e.g. ast_str as a prefix) and removing the _thread variant
of the functions by saving the threadstorage reference into
the struct ast_str. This can be done by overloading the
'type' field.

Finally, I will do my best to remove the convoluted interface
that results from trying to support platforms without va_copy().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48509 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoremove a duplicate include
Luigi Rizzo [Fri, 15 Dec 2006 22:00:48 +0000 (22:00 +0000)]
remove a duplicate include

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48506 via svnmerge from
Joshua Colp [Fri, 15 Dec 2006 19:57:04 +0000 (19:57 +0000)]
Merged revisions 48506 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48506 | file | 2006-12-15 14:55:28 -0500 (Fri, 15 Dec 2006) | 2 lines

Turn payload_lock into bridge_lock and make it encompass all RTP structure contents that may relate to bridge information, including who we are bridged to.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48504 via svnmerge from
Joshua Colp [Fri, 15 Dec 2006 19:40:29 +0000 (19:40 +0000)]
Merged revisions 48504 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48504 | file | 2006-12-15 14:38:51 -0500 (Fri, 15 Dec 2006) | 2 lines

Hold call structure lock in places where a qualify or peer action can destroy it.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48505 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48502 via svnmerge from
Joshua Colp [Fri, 15 Dec 2006 19:26:45 +0000 (19:26 +0000)]
Merged revisions 48502 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48502 | file | 2006-12-15 14:24:15 -0500 (Fri, 15 Dec 2006) | 2 lines

Lock network retransmission queue in all places that it is used.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48503 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agounbreak the output for http session.
Luigi Rizzo [Fri, 15 Dec 2006 18:37:29 +0000 (18:37 +0000)]
unbreak the output for http session.

Not long ago i replaced lseek() with fseek() but
forgot that filr FILE's you need ftell to
give you the current position.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48501 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoremove ast_safe_string_alloc() - it is completely
Luigi Rizzo [Fri, 15 Dec 2006 15:44:59 +0000 (15:44 +0000)]
remove ast_safe_string_alloc() - it is completely
equivalent to asprintf().

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48499 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreplace ast_safe_string_alloc() with asprintf()
Luigi Rizzo [Fri, 15 Dec 2006 15:40:57 +0000 (15:40 +0000)]
replace ast_safe_string_alloc() with asprintf()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48498 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoreplace ast_safe_string_alloc() with asprintf()
Luigi Rizzo [Fri, 15 Dec 2006 15:39:29 +0000 (15:39 +0000)]
replace ast_safe_string_alloc() with asprintf()

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48497 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agosmall documentation improvements.
Luigi Rizzo [Fri, 15 Dec 2006 14:33:59 +0000 (14:33 +0000)]
small documentation improvements.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48495 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoDoxygen changes
Olle Johansson [Fri, 15 Dec 2006 13:36:34 +0000 (13:36 +0000)]
Doxygen changes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48491 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoIssue #8592 - treat 504 as congestion (imported from 1.2/1.4)
Olle Johansson [Fri, 15 Dec 2006 10:58:36 +0000 (10:58 +0000)]
Issue #8592 - treat 504 as congestion (imported from 1.2/1.4)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoUpdate to latest IANA specs
Olle Johansson [Fri, 15 Dec 2006 10:54:06 +0000 (10:54 +0000)]
Update to latest IANA specs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48485 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoAdd support to see what holds the lock when doing trylock.
Joshua Colp [Fri, 15 Dec 2006 06:34:29 +0000 (06:34 +0000)]
Add support to see what holds the lock when doing trylock.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48480 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48478 via svnmerge from
Joshua Colp [Fri, 15 Dec 2006 06:31:26 +0000 (06:31 +0000)]
Merged revisions 48478 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48478 | file | 2006-12-15 01:28:05 -0500 (Fri, 15 Dec 2006) | 2 lines

Use a wakeup variable so that we don't wait on IO indefinitely if packets need to be retransmitted.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoconstify ast_state2str() and note it is not reentrant.
Luigi Rizzo [Fri, 15 Dec 2006 04:03:42 +0000 (04:03 +0000)]
constify ast_state2str() and note it is not reentrant.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoremove the macro LOAD_OH and expand it inline in the only
Luigi Rizzo [Fri, 15 Dec 2006 03:59:31 +0000 (03:59 +0000)]
remove the macro LOAD_OH and expand it inline in the only
place where it was used.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48476 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48472 via svnmerge from
Joshua Colp [Thu, 14 Dec 2006 17:39:16 +0000 (17:39 +0000)]
Merged revisions 48472 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48472 | file | 2006-12-14 12:36:12 -0500 (Thu, 14 Dec 2006) | 2 lines

Payload values on the RTP structure can change AFTER a bridge has started. This comes from the packet handling of the SIP response when indication that it was answered has been sent. Therefore we need to protect this data with a lock when we read/write. (issue #8232 reported by tgrman)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48473 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoMerged revisions 48461 via svnmerge from
Joshua Colp [Thu, 14 Dec 2006 03:39:39 +0000 (03:39 +0000)]
Merged revisions 48461 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r48461 | file | 2006-12-13 22:33:30 -0500 (Wed, 13 Dec 2006) | 2 lines

Remove direct RTCP bridging. I've come to the conclusion that we should handle this through the core and not just forward it on. Should solve a few bugs.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48462 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agomake sure that showdialplan sends only one
Luigi Rizzo [Wed, 13 Dec 2006 23:08:02 +0000 (23:08 +0000)]
make sure that showdialplan sends only one
'Response: Success ' message even in case of
a recursive call.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48459 65c4cc65-6c06-0410-ace0-fbb531ad65f3

13 years agoclean up function manager_show_dialplan_helper()
Luigi Rizzo [Wed, 13 Dec 2006 22:54:41 +0000 (22:54 +0000)]
clean up function manager_show_dialplan_helper()
reducing indentation and normalizing loops.

While doing this, remove some unused variables,
fix an uninitialized string (idaction), and mark
some places where the behaviour is not what we would expect
(e.g. an empty context is reported as an error same as
a non-existent one). Given that this function is
not in 1.4, the above can be changed without too many
backward compatibility concerns.

Not applicable to 1.4 or below.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48458 65c4cc65-6c06-0410-ace0-fbb531ad65f3