Compare commits

...

1235 Commits

Author SHA1 Message Date
Tilghman Lesher
ad16ee2b66 Importing files for 1.2.30.3 release
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.30.3@160133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 22:03:39 +00:00
Tilghman Lesher
4e18dc5f04 Creating tag for the release of asterisk-1.2.30.3
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/1.2.30.3@160126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 22:00:53 +00:00
Tilghman Lesher
932f5ca647 Regression fix for last security fix. Set the iseqno correctly.
(closes issue #13918)
 Reported by: ffloimair
 Patches: 
       20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
 Tested by: ffloimair


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@159245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 21:37:06 +00:00
Tilghman Lesher
71fdd7d526 Regression fixes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@136945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-09 15:24:36 +00:00
Russell Bryant
643879cabc Fix the IAX2 URI for calling Digium
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@133577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-25 15:00:13 +00:00
Tilghman Lesher
703220f1f4 This part was not correctly patched for AST-2008-010.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@133360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-24 03:46:01 +00:00
Tilghman Lesher
27290e8976 Fixes for AST-2008-010 and AST-2008-011
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@132711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-22 21:14:10 +00:00
Joshua Colp
ec11516f11 Copy the From header into a variable so that pedantic SIP handling does not try to mess with a NULL pointer. (AST-2008-008)
(closes issue #12607)
Reported by: hooi


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@120109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 19:30:02 +00:00
Russell Bryant
43ea28d8f6 - Instead of only enforcing destination call number checking on an ACK, check
all full frames except for PING and LAGRQ, which may be sent by older versions
  too quickly to contain the destination call number.
  (As suggested by Tim Panton on the asterisk-dev list)
- Merge changes from team/russell/iax2-frame-race, which prevents PING and LAGRQ
  from being sent before the destination call number is known.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@119237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 12:49:39 +00:00
Russell Bryant
ef549fe985 Merge changes from team/russell/iax2-another-fix-to-the-fix
As described in the following post to the asterisk-dev mailing list, only
enforce destination call numbers when processing an ACK.

http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@119008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 18:45:21 +00:00
Russell Bryant
40520cc2a4 Fix a race condition that bbryant just found while doing some IAX2 testing.
He was running Asterisk trunk running IAX2 calls through a few Asterisk boxes,
however, the audio was extremely choppy.  We looked at a packet trace and saw
a storm of INVAL and VNAK frames being sent from one box to another.

It turned out that what had happened was that one box tried to send a CONTROL
frame before the 3 way handshake had completed.  So, that frame did not include
the destination call number, because it didn't have it yet.  Part of our recent
work for security issues included an additional check to ensure that frames that
are supposed to include the destination call number have the correct one.  This
caused the frame to be rejected with an INVAL.  The frame would get retransmitted
for forever, rejected every time ...

This race condition exists in all versions that got the security changes,
in theory.  However, it is really only likely that this would cause a problem in
Asterisk trunk.  There was a control frame being sent (SRCUPDATE) at the _very_
beginning of the call, which does not exist in 1.2 or 1.4.  However, I am fixing
all versions that could potentially be affected by the introduced race condition.

These changes are what bbryant and I came up with to fix the issue.  Instead of
simply dropping control frames that get sent before the handshake is complete,
the code attempts to wait a little while, since in most cases, the handshake
will complete very quickly.  If it doesn't complete after yielding for a little
while, then the frame gets dropped.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@115564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 19:14:04 +00:00
Russell Bryant
c5c3cb32f1 Remove remnants of dlinkedlists. I didn't actually use them in the final version
of my IAX2 improvements.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@115511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 16:22:49 +00:00
Jason Parker
3ce33b090c read requires an argument on some non-bash shells
(closes issue #12593)
Reported by: bkruse
Patches:
      getilbc.sh_12593_v1.diff uploaded by bkruse (license 132)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@115421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:54:57 +00:00
Russell Bryant
f8d551bd2b Merge changes from team/russell/iax2_find_callno_1.2
These changes address a critical performance issue introduced in the latest
release.  The fix for the latest security issue included a change that made
Asterisk randomly choose call numbers to make them more difficult to guess by
attackers.  However, due to some inefficient (this is by far, an understatement)
code, when Asterisk chose high call numbers, chan_iax2 became unusable after
just a small number of calls.  On a small embedded platform, it would not be
able to handle a single call.  On my Intel Core 2 Duo @ 2.33 GHz, I couldn't
run more than about 16 IAX2 channels.  Ouch.

These changes address some performance issues of the find_callno() function
that have bothered me for a very long time.  On every incoming media frame,
it iterated through every possible call number trying to find a matching
active call.  This involved a mutex lock and unlock for each call number
checked.  So, if the random call number chosen was 20000, then every media
frame would cause 20000 locks and unlocks.  Previously, this problem was
not as obvious since Asterisk always chose the lowest call number it could.

A second container for IAX2 pvt structs has been added.  It is an astobj2
hash table.  When we know the remote side's call number, the pvt goes into
the hash table with a hash value of the remote side's call number.  Then,
lookups for incoming media frames are a very fast hash lookup instead of an
absolutely insane array traversal.

In a quick test, I was able to get more than 3600% more IAX2 channels
on my machine with these changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@115296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 17:53:26 +00:00
Kevin P. Fleming
a698166af0 stop script from appending source code if run multiple times
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@114822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 12:52:32 +00:00
Russell Bryant
38419fb811 When we receive a full frame that is supposed to contain our call number,
ensure that it has the correct one.
(closes issue #10078)
(AST-2008-006)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@114561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 22:20:35 +00:00
Kevin P. Fleming
8f7422b931 update UPGRADE notes to document usage of the script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@111125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:49:30 +00:00
Kevin P. Fleming
1501383484 add a script to make getting the iLBC source code simple for end users
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@111019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 18:58:37 +00:00
Kevin P. Fleming
3c780866b3 due to licensing restrictions, we cannot distribute the source code for iLBC encoding and decoding... so remove it, and add instructions on how the user can obtain it themselves
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@110869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 15:53:46 +00:00
Russell Bryant
62766834c8 Fix some very broken code that was introduced in 1.2.26 as a part of the security
fix.  The dnsmgr is not appropriate here.  The dnsmgr takes a pointer to an address
structure that a background thread continuously updates.  However, in these cases,
a stack variable was passed.  That means that the dnsmgr thread would be continuously
writing to bogus memory.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@110335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 21:53:27 +00:00
Terry Wilson
53ca368854 Fix character string being treated as format string
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@109488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 16:27:04 +00:00
Jason Parker
866bf7984a Do not return with a successful authentication if the From header ends up empty.
(AST-2008-003)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@109391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:08:41 +00:00
Russell Bryant
dd7fd5e641 Change misery.digium.com to pbx.digium.com
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@96931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-07 20:46:22 +00:00
Tilghman Lesher
47b472894b Fix for fix for security fix (third time's the charm?)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@94661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 01:30:42 +00:00
Russell Bryant
4208af2204 Fix another potential seg fault ...
(closes issue #11606)
Reported by: dimas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@94255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 20:21:41 +00:00
Russell Bryant
04e4f3d345 Fix a couple of places where it's possible to dereference a NULL pointer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@94214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 17:29:11 +00:00
Tilghman Lesher
0f7afb14e4 Oops, missed this one case
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@93675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:44:41 +00:00
Tilghman Lesher
1e6902b29d Fixing AST-2007-027 (Closes issue #11119)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@93667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 18:23:06 +00:00
Tilghman Lesher
1897d857f0 Properly escape src and dst fields (Fixes AST-2007-026)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@90170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-29 21:10:45 +00:00
Kevin P. Fleming
c58235bed4 clarify the OpenSSL and OpenH323 license exceptions
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@82334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 18:10:12 +00:00
Russell Bryant
0edee75c07 Revert patch committed for issue #9660. It broke E&M trunks.
(closes issue #10360)
(closes issue #10364)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@78370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 17:44:04 +00:00
Steve Murphy
726fa701da This patch hopefully solves 10141; The user is running with it, and it doesn't appear to harm asterisk's operation, and may prevent a crash. I'll store it in 1.2, as we have shut down support on 1.2, but since I developed the patch before support finished, and it might affect 1.4 and trunk, I'm going ahead with it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@77942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-02 17:56:37 +00:00
Steve Murphy
330090142f This probably isn't super-general, but it's a first stab at using kill -11 to generate a core file instead of gcore.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@77842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 19:19:35 +00:00
Tilghman Lesher
2cdedcbe94 Revert change in revision 71656, even though it fixed a bug, because many people were depending upon the (broken) behavior.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@77782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 18:40:54 +00:00
Joshua Colp
ea98dd3dfc (closes issue #10334)
Reported by: ramonpeek
Pass through the return value from macro_exec through the MacroIf application.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@77767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 14:50:02 +00:00
Steve Murphy
32ade7d7fc this fixes bug 10293, where the error message because defaultzone or loadzone was not defined was confusing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-25 00:07:24 +00:00
Tilghman Lesher
325bfeeda5 Oops, res contains the error code, not errno. I was wondering why a mutex was reporting "No such file or directory"...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76934 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 22:11:33 +00:00
Jason Parker
f95db061fd Don't create the Asterisk channel until we are starting the PBX on it.
(ASA-2007-018)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-24 16:32:04 +00:00
Joshua Colp
a62bba55d8 (closes issue #5866)
Reported by: tyler
Do not force channel format changes when a generator is present. The generator may have changed the formats itself and changing them back would cause issues.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 18:28:13 +00:00
Joshua Colp
2405536de9 (closes issue #10236)
Reported by: homesick
Patches:
      rpid_1.4_75840.patch uploaded by homesick (license 91)
Accept Remote Party ID on guest calls.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:32:07 +00:00
Tilghman Lesher
44b5abf39f We should not use C++ reserved words in API headers (closes issue #10266)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-22 21:39:55 +00:00
Russell Bryant
831ebbebb7 Backport a fix for a memory leak that was fixed in trunk in reivision 76221
by rizzo.  The memory used for the localaddr list was not freed during a
configuration reload.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-21 02:01:46 +00:00
Joshua Colp
a7047b7ed5 (closes issue #10247)
Reported by: fkasumovic
Patches:
      chan_sip.patch uploaded by fkasumovic (license #101)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@76080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:16:48 +00:00
Russell Bryant
9df29ba46f When processing full frames, take sequence number wraparound into account when
deciding whether or not we need to request retransmissions by sending a VNAK.
This code could cause VNAKs to be sent erroneously in some cases, and to not
be sent in other cases when it should have been.
(closes issue #10237, reported and patched by mihai)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-19 15:49:42 +00:00
Russell Bryant
6b5a7a6f64 When traversing the queue of frames for possible retransmission after
receiving a VNAK, handle sequence number wraparound so that all frames that 
should be retransmitted actually do get retransmitted.
(issue #10227, reported and patched by mihai)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 21:09:13 +00:00
Tilghman Lesher
dc4a74f57f Store prior to copy (closes issue #10193)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 20:31:36 +00:00
Dwayne M. Hubbard
dd77af3fe3 removed the word 'pissed' from ast_log(...) function call for BE-90
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 17:48:33 +00:00
Russell Bryant
d359de6edb Properly check for the length in the skinny packet to prevent an invalid memcpy.
(ASA-2007-016)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:57:09 +00:00
Russell Bryant
d0b4144eb4 Ensure that when encoding the contents of an ast_frame into an iax_frame, that
the size of the destination buffer is known in the iax_frame so that code
won't write past the end of the allocated buffer when sending outgoing frames.
(ASA-2007-014)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:45:27 +00:00
Russell Bryant
d2cb9b0d3b After parsing information elements in IAX frames, set the data length to zero,
so that code later on does not think it has data to copy.
(ASA-2007-015)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75440 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:41:41 +00:00
Kevin P. Fleming
6fc518335e provide proper copyright/license attribution for this structure that was copied from a BSD-licensed header file long, long ago...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 20:46:58 +00:00
Kevin P. Fleming
ffae2ad2fa install the LICENSE file along with the music files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:33:02 +00:00
Kevin P. Fleming
e38a7d523c move FreePlayMusic files into a subdirectory, and include a license statement for them
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 18:10:40 +00:00
Russell Bryant
8e7cb1aa7a Fix a couple potential minor memory leaks. load_moh_classes() could return
without destroying the loaded configuration.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:35:22 +00:00
Mark Michelson
a8d3745147 Fixed an issue where chanspy flags were uninitialized if no options were passed.
What triggered this investigation was an IRC chat where some people's quiet flags were
set while others' weren't even though none of them had specified the q option.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:10:39 +00:00
Russell Bryant
ab2a84f410 Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption.  Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:07:21 +00:00
Russell Bryant
460df0480b (closes issue #9660)
Reported by: mmacvicar
Patches submitted by: bbryant, russell
Tested by: mmacvicar, marco, arcivanov, jmhunter, explidous

When using a TDM400P (and probably other analog cards) there was a chance that
you could hang up and pick the phone back up where it has been long enough to
be not considered a flash hook, but too soon such that the device reports that
it is busy and the person on the phone will only hear silence.  This patch
makes chan_zap more tolerant of this and gives the device a couple of seconds 
to succeed so the person on the phone happily gets their dialtone.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@75052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 19:10:00 +00:00
Joshua Colp
577c0ebedd Only print out a warning for situations where it is actually helpful. (issue #10187 reported by denke)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-12 15:51:24 +00:00
Russell Bryant
2c757b4ab7 The function make_trunk() can fail and return -1 instead of a valid new call
number.  Fix the uses of this function to handle this instead of treating it
as the new call number.  This would cause a deadlock and memory corruption.
(possible cause of issue #9614 and others, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 22:53:26 +00:00
Mark Michelson
140c936792 The cli command "agent logoff Agent/x soft" did not work...at all. Now it does.
(closes issue #10178, reported and patched by makoto, with slight modification for 1.4 and trunk by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 21:12:30 +00:00
Russell Bryant
4307bca95c Make sure that the ESCAPE immediately follows the condition that uses LIKE.
This fixes realtime extensions with ODBC.
(closes issue #10175, reported by stuarth, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 18:33:23 +00:00
Joshua Colp
7055d9fe45 Use some Makefile magic to determine if linux/compiler.h is present. (issue #10174 reported by francesco_r)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 17:15:11 +00:00
Jason Parker
01412290a2 Fix an issue where it was possible to have a service level of over 100%
Between the time recalc_holdtime and update_queue was called, it was possible that the call could have been hungup.
Move both additions to the same place, so this won't happen.

Issue 10158, initial patch by makoto, modified by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 19:57:20 +00:00
Jason Parker
5dd56e420c Fix an issue with wrapuptime not working when using AgentLogin.
Issue 10169, patch by makoto, with a minor mod by me to not re-break issue 9618


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 19:03:45 +00:00
Jason Parker
71fa9ce0c4 Use res_ndestroy on systems that have it. Otherwise, use res_nclose.
This prevents a memleak on NetBSD - and possibly others.

Issue 10133, patch by me, reported and tested by scw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 18:37:23 +00:00
Jason Parker
c908fb91d1 Fix a small typo in description in of Voicemail() application.
Issue 10170, patch by casper.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:37:54 +00:00
Russell Bryant
abf682606c Only use ESCAPE when LIKE is used.
(issue #10075, this part reported by jmls on IRC, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:30:20 +00:00
Joshua Colp
abcb24bd12 Ensure the group information category exists before trying to do a string comparison with it. (issue #10171 reported by mlegas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 14:48:00 +00:00
Russell Bryant
319b105e17 When the specified class isn't found, properly fall back to the channel's music
class or the default.
(issue #10123, reported by blitzrage, patches from juggie, qwell, and me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 21:00:17 +00:00
Jason Parker
29da454042 Several chan_zap options were not working on reload because they were arbitrarily
disallowed when reloading some/most PRI options (such as signalling) was disallowed.

Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.

Issue 9186, patch by tzafrir.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@74158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 20:18:15 +00:00
Russell Bryant
0a22a51525 If a sip_pvt struct has already registered an extension state callback,
remove the old one before adding a new one.  If this isn't done, Asterisk
will crash.  (issue #10120)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 23:01:22 +00:00
Russell Bryant
5e8172892e (closes issue #10075)
Reported by: apsaras
Patches submitted by: Corydon76
Tested by: apsaras

Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as
an escape character.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 16:06:27 +00:00
Russell Bryant
ed261253d5 (closes issue #10125)
Reported by: makoto
Patches submitted by: makoto

This fixes a crash in chan_sip that happens when the bindaddr setting is not
valid on Asterisk startup, gets fixed, and then a reload gets issued.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 15:55:41 +00:00
Mark Michelson
3735871ed4 Fixed a bug wherein agents get stuck busy. (issue 9618, reported by jiddings, patched by moi)
closes issue #9618



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 15:26:40 +00:00
Kevin P. Fleming
585de1223e we shouldn't allow G.723.1 endpoints to use VAD, just like we don't support it for G.729
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 22:11:51 +00:00
Joshua Colp
0b2c98ac3e Copy language information to the dialog structure when calling a peer for situations where a PBX may be started on the dialed channel. (issue #10121 reported by clegall_proformatique)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 19:15:18 +00:00
Joshua Colp
e32e830419 Tweak spy locking. (issue #9951 reported by welles)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 14:19:14 +00:00
Joshua Colp
1dc2b9c0f7 Actually check to make sure a PBX was started on one of the Local channels instead of blindly assuming it was. (issue #10112 reported by makoto)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 13:26:02 +00:00
Joshua Colp
bf7b174b08 Reset ServicelevelPerf variable back to 0 if we are unable to calculate it each time... otherwise we will get previous values. (issue #10117 reported by noriyuki)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 13:19:17 +00:00
Christian Richter
ce99e9d955 bchannel configurations like echocancel and volume control, need to be setuped on inbound calls too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 14:50:58 +00:00
Christian Richter
479d7e4738 bad bug in overlapdial case, we called start_pbx multiple times, because the state wasn't changed..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-04 08:20:54 +00:00
Tilghman Lesher
ff1c0bfa20 RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 12:34:14 +00:00
Christian Richter
2676d6c595 fixed issue, that misdn_l2l1_check could only be called from mISDN Source channels.. #9449
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-03 08:04:35 +00:00
Jason Parker
d60de2804e Fix an issue with playing "oclock" multiple times in French with 24 hour time format.
Issue 10101


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02 17:58:25 +00:00
Russell Bryant
4dfa0b47a7 When appending lines to call files to keep track of retries, write a leading
newline just in case the original call file did not have a newline at the end.
This fix is in response to a problem I saw reported on the asterisk-users
mailing list.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-01 23:51:34 +00:00
Russell Bryant
defd4eb3e2 Backport changes that make chan_iax2 not start the PBX on an incoming channel
until the three-way call setup is completed.  These changes are already in 1.4
and trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 16:30:56 +00:00
Christian Richter
fc4111b44f check if the bchannel stack id is already used, if so don't use it a second time. Also added a release_chan lock, so that the same chan_list object cannot be freed twice. chan_misdn does not crash anymore on heavy load with these changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 13:08:26 +00:00
Joshua Colp
aac9dd609c Update documentation to clarify variable usage with MixMonitor. (issue #9494 reported by netoguy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 23:24:01 +00:00
Brett Bryant
dcdfb4aa89 Reinstating patch. This actually fixes the problem, however I was running a development branch without it and mistakenly thought it wasn't fixed.
Fixes issue #10010, and #9654: 100% CPU usage caused by an asterisk console losing it's controlling terminal.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 23:22:13 +00:00
Brett Bryant
7b9318fedd Reverted changes for earlier revisions 72259 to 72261. Issue #9654, #10010
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 22:58:53 +00:00
Joshua Colp
5c8b322f8d Fix issue where queue log events might be missing. (issue #7765 reported by mtryfoss)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 22:43:11 +00:00
Russell Bryant
eeafa5951e Fix a minor issue with parsing the priority number. You could have as much
whitespace as you want around a numeric priority, but you couldn't have any
whitespace around a special priority like "n" or "hint".
(issue #10039, reported by mitheloc, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 21:06:45 +00:00
Brett Bryant
89cc2e4b70 Fixes 100% load when controlling terminal disappears.
Issue #9654, #10010


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 20:43:53 +00:00
Joshua Colp
2303602f15 I may possibly get shot for doing this... but... defer CDR processing until after the channel has been dealt with. This should eliminate all of the issues with channels going funky (SIP/PRI) when you are posting CDRs to a database that is either slow or unavailable and do not want to enable batching.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 20:23:24 +00:00
Jason Parker
4ce4fe74ae Fix another problem in voicemail with missing symbols.
Issue 10074, patch by kryptolus, extended to include #if 0'd blocks (just in case)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 18:40:15 +00:00
Christian Richter
3637816f4c simplified generation for dummy bchannels, also we mark them as dummies, so they are not used later as real-bchannels, optimized the RESTART mechanisms, we block a channel now on cause:44, and send out a RESTART automatically, then on reception of RESTART_ACKNOWLEDGE we unblock the channel again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 13:22:37 +00:00
Christian Richter
5f272436b9 simplified channel finding and locking a lot. removed unnecessary #ifdefed areas.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 09:26:53 +00:00
Christian Richter
085065ac35 isdn_lib.c didn't compile
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 07:54:30 +00:00
Christian Richter
16ecedee04 for inbound TE calls, we setup the bchannel when we get the CONNECT_ACKNOWLEDGE, to make sure mISDN has everything ready. removed some #if 0 areas which weren't used anymore.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@72040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 07:49:27 +00:00
Jason Parker
c2cfb7ba64 Don't try to install an init script that doesn't exist.
Reported to me on #asterisk on Freenode IRC.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-26 17:49:14 +00:00
Tilghman Lesher
8f2a415995 Issue 10062 - Trying to move a message without selecting one first results in memory corruption
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-26 12:25:58 +00:00
Tilghman Lesher
5be40827e5 Issue 10035 - handle_exec returns a result inconsistent with all of the other AGI commands
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 18:12:37 +00:00
Joshua Colp
76b4eb5daa Ignore other URIs after the first in a 300 Multiple Choice response. (issue #10041 reported by homesick)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 01:02:49 +00:00
Russell Bryant
fb50a2da95 Revert the patch from issue 9654 due to an unexpected side effect
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 20:04:21 +00:00
Tilghman Lesher
f7a787c757 Issue 10043 - There is a legitimate need to be able to set variables to the empty string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-24 17:32:21 +00:00
Joshua Colp
7e22d574a7 Send an unhold indication when going off hold. (issue #10036 reported by speedy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 16:02:40 +00:00
Jason Parker
01f5e6d56b Fix a few silly usages of ast_playstream() - it only ever returns 0...
Issue 10035


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 14:52:18 +00:00
Brett Bryant
b9000f54b2 Fixed infinite loop when controlling terminal was lost
and return value of input function wasn't checked for
errors. This would cause 100% cpu to be taken up.

(closes issue #9654, issue #10010)
Reported by: mnicholson, and eserra

Idea for the patch from mnicholson, patched by me



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@71064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22 14:39:34 +00:00
Steve Murphy
c25932a107 This little fix is in response to bug 10016, but may not cure it. The code is wrong, clearly. In a situation where you set the CDR's amaflags, and then ForkCDR, and then set the new CDR's amaflags to some other value, you will see that all CDRs have had their amaflags changed. This is not good. So I fixed it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 22:29:50 +00:00
Joshua Colp
e179ccaff2 Don't explode if the gain option is specified without a value. (issue #9274 reported by mfarver)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 21:37:55 +00:00
Steve Murphy
7a7b6536c7 it was pointed out that the cdr_custom config load could get a lock, and under certain circumstances, would never release it. I also noted that the situation where more than one mapping spec was warned about, but did not ignore further mappings as it had promised. I think I have fixed both situations.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 19:13:17 +00:00
Christian Richter
d8d4454ae5 we activate the bchannels in TE mode on incoming calls only when we want to connect the call.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 13:11:29 +00:00
Joshua Colp
6357ad5659 Don't overwrite the configured username setting upon a REGISTER. (issue #8565 reported by jsmith)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 22:20:16 +00:00
Tilghman Lesher
a1cc9b4966 Issue 9997 - Timelimit times out the wrong channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 19:25:54 +00:00
Russell Bryant
cfaead2b9c Fix a problem where an established call would not be properly disconnected
when a PRI disconnect is received depending on which cause code was received.
(issue #9588, original patch by softins, updated patch from jtexter3, and some
 additional feedback from mhardeman)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 18:45:38 +00:00
Christian Richter
f5f018a209 forgot one place ..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 15:42:39 +00:00
Christian Richter
7fc236e53b fixed a bug that was introduced by copy and paste in the last commit ..bchannels weren't cleaned properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 15:29:09 +00:00
Christian Richter
ede913f976 on receiption of cause:44 we mark the channel as in use and inform the user about the situation, we need to test the RESTART stuff then. Also shuffled the empty_chan_in_stack function after the bchannel cleaning functions, to avoid race conditions.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 14:47:59 +00:00
Steve Murphy
8da289e13c This fixes 9246, where channel variables are not available in the 'h' exten, on a 'ZOMBIE' channel. The fix is to consolidate the channel variables during a masquerade, and then copy the merged variables back onto the clone, so the zombie has the same vars that the 'original' has.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@70053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 18:07:59 +00:00
Joshua Colp
3d1a5f71c5 Handle the CC field in the RTP header. (issue #9384 reported by DoodleHu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 17:00:58 +00:00
Russell Bryant
6e0248318b Backport fix for crashes related to subscriptions from 1.4 ...
Fix a crash that could occur when handing device state changes.
When the state of a device changes, the device state thread tells the extension
state handling code that it changed.  Then, the extension state code calls the
callback in chan_sip so that it can update subscriptions to that extension.
A pointer to a sip_pvt structure is passed to this function as the call which
needs a NOTIFY sent.  However, there was no locking done to ensure that the pvt
struct didn't disappear during this process.
(issue #9946, reported by tdonahue, patch by me, patch updated to trunk to use
 the sip_pvt lock wrappers by eliel)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 16:45:37 +00:00
Joshua Colp
07b9fc569f Update BRIDGEPEER variable if set to the new channel name when a masquerade happens. (issue #9699 reported by dimas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 16:21:29 +00:00
Joshua Colp
e21d079484 Perform an extra hangup check just in case. (issue #9589 reported by bcnit)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:54:03 +00:00
Christian Richter
3322095dea when we send out a SETUP, but get no response, we should cleanup everything after reception of a hangup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 13:23:04 +00:00
Joshua Colp
234b7d22fe Add parked call extension AFTER the parking slot has been announced, otherwise two threads will try to handle the same channel and it will go kaboom. (issue #9191 reported by japple)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 12:57:55 +00:00
Joshua Colp
dc41ce9857 Set the peer name on the dialog to the one configured in sip.conf and NOT the username to be used for authentication attempts. (issue #9967 reported by achauvin)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 18:13:03 +00:00
Tilghman Lesher
ff8bb42cbc Issue 9998 - Remove SIG prefix, since it's not supported by ksh
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 17:45:15 +00:00
Jason Parker
9aa74f204a Fix an issue where the line number in an unterminated comment block error message would show the wrong line number.
"Reported" to me on #asterisk (somebody posted an error message, and I happened to catch it)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 23:21:45 +00:00
Russell Bryant
dc41cf2347 Backport rev 69010 from the 1.4 branch ...
In ast_channel_make_compatible(), just return if the channels' read and write
formats already match up.  There are code paths that call this function on a
pair of channels multiple times.  This made calls fail that were using g729
in some cases.  The reason is that codec_g729a will unregister itself from the
list of available translators will all licenses are in use.  So, the first
time the function got called, the right translation path was allocated.
However, the second time it got called, the code would not find a translation
path to/from g729 and make the call fail, even if the channel actually already
had a g729 translation path allocated.

(SPD-32)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 20:56:19 +00:00
Jason Parker
fab1ba87cd Change a quite broken while loop to a for loop, so "continue;" works as expected instead of eating 99% CPU...
Issue 9966, patch by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 15:15:53 +00:00
Joshua Colp
0156942fe0 Return group counting to previous behavior where you could only have one group per category. (issue #9711 reported by irroot)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-13 18:12:48 +00:00
Christian Richter
ba372aa9a4 restart indicator 0x80 is correct, at least that's what libpri does.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@69053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-13 09:55:54 +00:00
Joshua Colp
28464199ee Bring RTP back to Asterisk at the end of a native bridge no matter what.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 14:18:57 +00:00
Christian Richter
37ded96cfa if the bridged partner is mISDN too we should not send dtmf tones, they are transmitted inband always
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 08:35:22 +00:00
Christian Richter
7bb272f942 if we have already some digits, we just stop the tones.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 07:48:52 +00:00
Christian Richter
9809905c76 added check for NULL Pointer when calling misdn_new. Asterisk does not allow us to create channels anymore when stop gracefully is used :). also modified the restart_indicator to 0
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 16:49:00 +00:00
Joshua Colp
41421be994 Improve deadlock handling of the channel list. (issue #8376 reported by one47)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 14:29:58 +00:00
Christian Richter
5cc2b1078e fixed problem that the dummybc chanels had no lock, checking for the lock now. Also fixed the channel restart stuff, we can now specify and restart particular channels too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 09:18:01 +00:00
Russell Bryant
086aba207e Don't automatically hang up after running Dictate so that callers can exit
cleanly using '#'
(closes issue #9577, patch from Thomas Andrews)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08 22:22:36 +00:00
Joshua Colp
d8fb68b9cb Don't call ast_waitstream_full when the control file descriptor and audio file descriptor are not set, simply call ast_waitstream! (issue #8530 reported by rickead2000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-08 00:15:33 +00:00
Joshua Colp
49ffa786ff Do a DNS lookup immediately upon calling the dnsmgr function, don't wait until a refresh happens. (issue #9097 reported by plack)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 23:59:04 +00:00
Russell Bryant
c00062ff31 Fix a problem where saying a character wouldn't properly break out when the caller pressed '#'
(issue #8113, reported by patbaker82, patch from jamesgolovich (hey, long time no see!) and patbaker82)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 23:13:33 +00:00
Jason Parker
a3961d646a Don't try to save voicemail greetings unless the user presses '1' to accept/save.
Issue 9904, patch by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 20:02:50 +00:00
Joshua Colp
9c0627eab0 Allow the 'g' option to work if used with the 'S' option. (issue #9888 reported by gasparz)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@68070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 14:19:40 +00:00
Joshua Colp
084ede4507 Only notify the devicestate system of a peer state change when the peer is built from the config file. (issue #9900 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07 00:09:13 +00:00
Russell Bryant
3a2e0e1ed9 We have some bug reports showing crashes due to a double free of a channel.
Add a sanity check to ast_channel_free() to make sure we don't go on trying
to free a channel that wasn't found in the channel list.
(issue #8850, and others...)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 16:40:51 +00:00
Joshua Colp
76fdb9418b Reinvite the RTP back to the Asterisk machine when the timeout happens. (issue #9888 reported by gasparz)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 13:28:34 +00:00
Joshua Colp
a05ab92728 Revert channel name splitting fix for Zap. The moral of the story is don't use - in your user/peer names. (issue #9668 reported by stevedavies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 12:18:36 +00:00
Christian Richter
f002ad09a3 briding is a bool, fixed copy and paste issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 15:42:03 +00:00
Christian Richter
e7590d0aec simplified the EVENT_SETUP handling in the cb_events function a lot. Commented the different possibilities a bit and made functions of shared code. When the dialed extension does not exist in the extensions.conf we'll jump into the 'i' extension if this does exist, else we disconnect the call with the cause:1 = No Route to Destination.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 15:39:43 +00:00
Nadi Sarrar
e0f4f4969c Backport of the overlap_dial functionality from asterisk-1.4's chan_misdn.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 11:18:45 +00:00
Christian Richter
3cd1c84e8d added possibility to deactivate bridging per port
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 10:05:45 +00:00
Tilghman Lesher
dd412388a1 According to MATH, 0+1181000386 = 1181000448. Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 23:41:49 +00:00
Tilghman Lesher
c78acd2896 Add revision Id tags (by request of tzafrir)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@67060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-04 17:10:30 +00:00
Joshua Colp
22fe1b73cc It is now possible for this path of execution to have the frame pointer be NULL, therefore we need to check for it before trying to access it. (issue #9836 reported by barthpbx)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 16:12:39 +00:00
Tilghman Lesher
c0ce087e43 Issue 9818 - Fix for issue 8329 breaks pbx_realtime. Issue 8329 will remain unfixed for pbx_realtime, but only because we lack core API to do it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-31 15:58:45 +00:00
Tilghman Lesher
fc6d28a932 If the value of a variable passed to FIELDQTY is blank, then FIELDQTY should return 0, not 1.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 21:49:35 +00:00
Olle Johansson
c4e7d9fef5 Issue #9802 - Change inuse counter on CANCEL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-29 07:53:14 +00:00
Tilghman Lesher
2cb2558eb1 Issue 9791 - Fix pronunciation of seconds in Dutch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@66127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-25 13:46:35 +00:00
Joshua Colp
ad2f350d39 Allow RFC2833 to be negotiated when an INVITE comes in without SDP and is not matched to a user or peer. (issue #9546 reported by mcrawford)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 14:40:38 +00:00
Christian Richter
17175c7d54 we should only activate the generator in chan_misdn, when asterisk hask not yet taken the call (WAITING4DIGS state). Alerting audio will be generated fomr asterisk for example.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 09:19:58 +00:00
Kevin P. Fleming
cba8e2f704 ensure that variables are set on a newly created channel before we start a PBX on it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 20:46:22 +00:00
Kevin P. Fleming
9edd1e094c if we are going to set variables on a newly created channel, it should be done *before* we start the PBX on it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 20:06:13 +00:00
Russell Bryant
2f0f1f5e00 Revert revision 62417 as someone reported problems with it to Mark. This was
related to issue #9588.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-23 13:06:17 +00:00
Russell Bryant
03ad135134 Fix a memory leak that I just noticed in the device state handling in app_queue.
On most device state changes, it would leak roughly 8 to 64 bytes (the length of
the name of the device).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 13:07:03 +00:00
Christian Richter
0b6da8d56e we stop the tones only when we're in the pre-call phase, otherwise e.g. when in CONNECTED state we should not stop tones when we receive an Information Message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 07:46:39 +00:00
Steve Murphy
fd1fc0a9c1 This update will fix the situation that occurs as described by 9717, where when several targets are specified for a dial, if any one them reports FAIL, the whole call gets FAIL, even though others were ringing OK. I rearranged the priorities, so that a new disposition, NULL, is at the lowest level, and the disposition get init'd to NULL. Then, next up is FAIL, and next up is BUSY, then NOANSWER, then ANSWERED. All the related set routines will only do so if the disposition value to be set to is greater than what's already there. This gives the intended effect. So, if all the targets are busy, you'd get BUSY for the call disposition. If all get BUSY, but one, and that one rings is not answered, you get NOANSWER. If by some freak of nature, the NULL value doesn't get overridden, then the disp2str routine will report NOANSWER as before.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 20:56:20 +00:00
Olle Johansson
86882515a8 Not getting an ACK to a 200 OK in the initial invite is critical to the call.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 18:10:46 +00:00
Olle Johansson
21ea4dc3f1 Issue 9235 - part of the problem, maybe not all. Please retry with this patch (and no
other patch) if you have problems with hanging SIP channels. Thank you.

A special Thank You to WeBRainstorm that gave me access to his system.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 15:12:09 +00:00
Christian Richter
58bcd919d5 fixed a warning regarding Keypad encoding. encode the IE sending_complete at the right position.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@65007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 11:23:11 +00:00
Christian Richter
06b2955d26 we *need* to send a PROCEEDING when sending_complete is set, even if need_more_infos is requested.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 08:24:08 +00:00
Tilghman Lesher
b2f84c347f How is it that we never caught that this is returning the opposite of our documentation, until now?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17 21:14:36 +00:00
Jason Parker
dfd24c33d2 If we have a negative current message, we shouldn't go back even further...
Issue 9727.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-17 16:52:38 +00:00
Olle Johansson
9ebfde54a1 Fixing possible bug in auth of BYE
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 10:55:16 +00:00
Olle Johansson
80e4abca3d Support SIP uri's starting with SIP: and sip: (reported by Tony Mountfield on the mailing list. Thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 09:08:22 +00:00
Olle Johansson
aa9ff74af5 Issue #9726 - rlister - Better logging for ACL denials
While at it, also added better logging and handling of peers that are not supposed to register.

My patch, stole the issue report from Russell. My apologies, Russell :-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 08:25:56 +00:00
Christian Richter
b60fd4bc20 in the case immediate=yes, we directly jump into the dialplan, where people can use PlayTones to indicate a Dialtone, so we don't need to to that by ourself. also we should not do a dialtone_indicate for incoming calls on a TE port in overlapdialmode.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-16 08:23:42 +00:00
Joshua Colp
3b1ad79633 Only perform stripping of - strings from the channel name for Zap channels. Anywhere else we might remove a legitimate part of a device name. (issue #9668 reported by stevedavies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@64275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14 18:34:06 +00:00
Tilghman Lesher
29aa7c809b Issue 9121 - fixups for safe_asterisk script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-11 16:31:03 +00:00
Jason Parker
074cc21291 Fix an issue with trying to kill a thread before it gets created.
Issue 9709, patch by nic_bellamy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 23:14:55 +00:00
Olle Johansson
07ba0e379b Do not allocate SIP pvt's for PEERs we can not reach.
This was seen as a lot of dialogs being created then immediately destroyed at reload/restart of the SIP channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-10 20:38:54 +00:00
Matthew Fredrickson
818c25352e Make sure we only create a DSP if it's requested on SUB_REAL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 17:20:20 +00:00
Joshua Colp
7dc491d090 Properly handle hints that point to multiple devices in chan_sip. Why chan_sip is even doing this I have no idea but I would rather not go into a rant. (issue #9536 reported by rlister)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 16:51:03 +00:00
Tilghman Lesher
47047d5004 Replicate fix from 51158 (app_voicemail) to app_directory (Issue 9224)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 14:48:06 +00:00
Christian Richter
fcad34fd9f release_chan frees ch, so we should never touch ch after release_chan, this may cause segfaults.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-09 11:26:16 +00:00
Tilghman Lesher
25930c842f Issue 9602 - segfault in app_macro
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 22:19:15 +00:00
Christian Richter
048000f9d6 added application misdn_check_l2l1 which tries to pull up the L1/L2 on all ports that have the layers down in a group. It waits then for a timeout. This helps for scenarios where multiple PMP BRIs are grouped together, or where a provider has a faulty PTP Implementation, that looses the L2 after a while.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 15:07:37 +00:00
Tilghman Lesher
616e3502e7 Issue 9527 - upon entering a folder, no message is selected (curmsg == -1), so deleting causes memory corruption (beyond bounds)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-08 06:20:16 +00:00
Joshua Colp
71befa9884 Properly handle what happens during a masquerade in relation to group counting. (issue #9657 reported by ramonpeek)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 21:39:52 +00:00
Olle Johansson
999633ab4f Releasing the whole in-memory configuration while you're adding to it is not a good thing.
Please review this change. Caused by additions (+) to non-existing contexts.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@63195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-07 14:06:50 +00:00
Joshua Colp
3a218f3a09 When a peer is seeded or built tell the devicestate core to update it's status. This is easier then having chan_sip load before pbx_config. (issue #9658 reported by dlynes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 16:42:19 +00:00
Christian Richter
2102128500 when we're in state WAITING4DIGS, we use the asterisk tone-generator which prods us, so we can't just return -1 in misdn_write in this case. Added a MISDN_KEYPAD channel variable, and fixed the sending of keypad. this enables us to modify the call forward parameters in the switch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 15:39:21 +00:00
Christian Richter
70e95c4846 fixed the problem that misdn_write did not return -1 when called with 0 samples in a frame this resultet in a deadlock in some circumstances, when the call ended because of a busy extension. added encoding of keypad.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 13:59:00 +00:00
Kevin P. Fleming
de32406990 doh... initializing the pointer variable will work just a bit better
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 00:23:00 +00:00
Kevin P. Fleming
0b78d1542c 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 23:53:46 +00:00
Steve Murphy
26cab38b64 Some tweaks to satisfy CDR bug 8796, where being in 'h' extension louses up the dst field
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 20:10:32 +00:00
Tilghman Lesher
9b71a5799b 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 17:38:16 +00:00
Russell Bryant
c8a90488d6 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 21:55:19 +00:00
Russell Bryant
8da91a20e3 Add indications.conf information for the Philippines.
(issue #9525, reported and patched by loloski)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-01 16:26:23 +00:00
Russell Bryant
274afdc345 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 15:57:26 +00:00
Joshua Colp
80d88816df Update copyright notice. It's now the year 2007!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30 14:34:07 +00:00
Jason Parker
d97b6e3d34 This transcoder message needn't be a NOTICE.
I've seen it cause confusion more than a few times.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 16:16:16 +00:00
Olle Johansson
3bafdca29f 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.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27 13:57:45 +00:00
Joshua Colp
babe9cbbef 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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 16:30:57 +00:00
Joshua Colp
897b4c0ca3 Don't count failed include attempts against the configuration include level. (issue #9593 reported by mostyn)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-26 01:25:03 +00:00
Kevin P. Fleming
cd3ef82ba4 handle a very bizarre race condition with channels being redirected before a simple switch can be started on them (issue #9286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 22:24:59 +00:00
Russell Bryant
bc604c9e9a If the callerid= option is specified, but empty, clear any previous data.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:55:23 +00:00
Russell Bryant
85cff883ee Ensure that callerid settings are reset on a reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 21:06:22 +00:00
Joshua Colp
6ab97a0292 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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 18:52:50 +00:00
Russell Bryant
eab557da86 Fix a typo where cid_num got copied instead of cid_ani.
(issue #9587, reported and patched by xrg)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-25 16:20:38 +00:00
Russell Bryant
c5a87ff71d 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 21:33:59 +00:00
Dwayne M. Hubbard
1cde24d633 removed #if 0 block from chan_phone, chan_zap, and chan_modem restart_monitor()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 18:20:31 +00:00
Dwayne M. Hubbard
654c04bfc9 removed pthread_join in restart_monitor() to make it like chan_zap and other channel drivers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 17:42:12 +00:00
Joshua Colp
a31a2ef862 Allow RFC2833 to be sent in the response SDP when an INVITE comes in without SDP. (issue #9546 reported by mcrawford)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 16:05:06 +00:00
Christian Richter
f1edea1129 added lock for sending messages to avoid double sending. shuffled some empty_chans after the cb_event calls, this avoids that a release_complete from a quite different call releases a fresh created setup by accident.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-24 13:50:05 +00:00
Jason Parker
3682e51ba7 Fix an issue that I noticed while looking over issue 9571.
The reload timestamp was getting set after reloading the built-in stuff, and before the modules.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 21:14:27 +00:00
Jason Parker
c28413ff94 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.

Issue #9552


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20 19:49:54 +00:00
Olle Johansson
57185823d1 Send NOTIFY to Contact: in SUBSCRIBE
- as reported by Intertex and Citel. Fixed during SIPit 20 in Antwerp.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19 07:56:21 +00:00
Tilghman Lesher
e4467b3837 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.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-19 02:30:18 +00:00
Olle Johansson
062368a175 Don't stop RTP on errors on INFO messages.
Disclaimer: This patch was needed for Edvina AstHoloApp and was
meant to be included in 1.2, but never made it in time so I felt
I could add it now.

No, just joking, patching error found while testing T.140 with Omnitor earlier
this spring.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-16 14:08:33 +00:00
Joshua Colp
4b17148846 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)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-13 19:15:12 +00:00
Russell Bryant
2128909ad4 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 16:01:25 +00:00
Russell Bryant
a36f57e7fc 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)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 15:05:36 +00:00
Russell Bryant
1159b7761a Remove the attempt at reporting configuration errors in sip.conf. This can
cause a bunch of improper messages when using realtime.  I give up.  As oej
tried to convince me when I put this in, there is just no easy way to do it.
(inspired by a message on the -dev list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 14:02:54 +00:00
Christian Richter
104b12df79 some fixes for PMP Hold/Retrieve, it should work now, when briding=no
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-11 12:05:57 +00:00
Nadi Sarrar
1330496973 msns config parameter defaults to '*'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-10 12:31:45 +00:00
Olle Johansson
1a92fec845 - Don't send ActionID before Response: header.
- Don't use a blank in an AMI header


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 19:38:59 +00:00
Jason Parker
62de701abb Allow matching on names shorter than 3 chars.
This also fixes the case where somebody wants to match on less then 3 chars.

Issue 9071


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 17:22:15 +00:00
Tilghman Lesher
2eaae45f81 Don't check for error when lowering priority (according to the manpage, it should never happen anyway). It might could happen, though, if another thread messed with the priority, so safeguard against that (reported via -dev list).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 02:49:06 +00:00
Tilghman Lesher
b9ec441aa9 Bug 9505 - If the return value for local_queue_frame is set, then p->lock is no longer valid.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 02:37:18 +00:00
Joshua Colp
f2680a35d4 When calling a device that then forwards us elsewhere... we have to make our channels compatible if it is the only channel being dialed. (issue #9445 reported by marcelbarbulescu)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09 00:59:29 +00:00
Tilghman Lesher
2e1fe209de Gosub called within a Macro resets the arguments improperly and causes general weirdness. (Issue 8329)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08 14:00:22 +00:00
Tilghman Lesher
abe55bf16f Bug 9486 - memory leak when opening a filestream
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08 01:39:25 +00:00
Matthew Fredrickson
d971b4ba93 There should only be one code path for doing DTMF conditionals on channels. This fixes it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06 17:03:15 +00:00
Kevin P. Fleming
5cbe22e0f7 remove undocumented 'cardsmode' parameter and stop searching for transcoders during reload()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-06 14:41:37 +00:00
Jason Parker
6374772250 Just because we can't find the voicemail configuration file, doesn't
mean that the module failed to load.  The user could be using realtime.

Issue #9473


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-05 16:09:41 +00:00
Joshua Colp
dd108f60f3 Only unlock our pvt and net locks if we are actually going to try to lock the owner again. (issue #9472 reported by zoa)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-05 12:52:50 +00:00
Russell Bryant
2bed78a613 It is valid to redirect channels via the manager interface that are not in the
UP state.  Instead of checking for that to prevent to ensure a dead channel
doesn't get redirected, just use the ast_check_hangup() API call.
(issue #9457, reported by Callmewind, patch by me)
(related to issue #8977)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04 17:38:47 +00:00
Russell Bryant
3f71ad082e Fix the return value of handle_common_options() so that it always properly
indicates whether it handled the option or not.  
(issue #9455, reported by Netview, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-04 16:37:04 +00:00
Russell Bryant
d0991f6e1f Add a missing "\r\n" in the body of the NOTIFY that is sent to indicate the
status of a transfer.  (issue #9388, reported by rarritt)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 23:23:23 +00:00
Russell Bryant
7a18c89ba8 Use the more generic check for "sed -r" support that was already present in 1.4.
(related to issue #9399)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 23:00:10 +00:00
Russell Bryant
683a345699 On Darwin, the -r argument to sed is not valid. It has to be -E.
(issue #9399, reported by jcovert)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 22:54:49 +00:00
Russell Bryant
e237711157 Don't attempt to report configuration errors in build_user(). oej pointed out
that for a "friend" entry, this won't work, because all user options are valid
for peers, but not the other way around.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 19:15:04 +00:00
Russell Bryant
a19d352438 Make chan_sip report when it encounters an unknown option.
(issue #9440, reported by nightcrawler)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 18:43:54 +00:00
Russell Bryant
f96aef8d79 When doing a built-in blind or attended transfer, restore the ability to use '#'
to terminate the number and immediately do the transfer instead of having to
dial the number and just wait for the feature digit timeout.
(issue #8366, xueliangliang)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 17:58:19 +00:00
Nadi Sarrar
5ded94acbe ptp is the 5th bit, not the 4th.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 10:40:58 +00:00
Nadi Sarrar
b18a9b92c8 Use the new sysfs way of mISDN 1.2 to check if a port is NT or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-03 09:37:00 +00:00
Joshua Colp
5e01069962 Increase the maximum size for a string of mailboxes to 1024. (issue #9270 reported by rtucker)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 18:55:25 +00:00
Christian Richter
30fd84d952 added option which allows us to accept incoming SETUP Messages without automatically sending Proceeding or Setup Acknowledge, this is useful with some broken switches and if you want to Release incoming calls without previously having acknowledged them. The new option is noautorespond_on_setup=yes|no default is no, so we don't break the existing behaviour
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 12:08:12 +00:00
Christian Richter
e299df7a75 don't be verbose if no need
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 07:25:54 +00:00
Christian Richter
51366b90d0 we can now make 30 channels on a PRI (before we forgot chan 31..)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 07:12:24 +00:00
Russell Bryant
8a416b420d Add the SO_REUSEADDR flag to sockets handled by netsock. This is needed by
the patch that went in for issue 7874.  chan_iax2 needs to be able to create
socket that is lisetning on INADDR_ANY, but also be able to bind sockets to
specific addresses.  (Thanks to Stevenson on the asterisk-dev mailing list
for explaining why this flag was needed.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-01 22:35:25 +00:00
Joshua Colp
ec7458a460 Keep a global array of variables indicating whether certain conference rooms are in use. This ensures that two people going into a new dynamic conference when the 'e' option is set don't go into the same conference room. (issue #8835 reported by eliel)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:33:58 +00:00
Russell Bryant
9956c33fec If an error occurs when reading from an RTP socket, and the error code does not
indicate that we should try again, then return NULL instead of a "null frame".
This will prevent Asterisk from trying over and over again, and eventually
causing the system to crash.  (issue #8285, john)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:14:33 +00:00
Russell Bryant
b87695d824 Backport the change to chan_iax2 to return NULL instead of a "null frame"
from its read callback.  See revision 59341 to the 1.4 branch for more info.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 17:10:28 +00:00
Tilghman Lesher
b254610b88 Issue 9415 - No point to getting a diagnostic field if we aren't doing anything with the information.
(Plus, it tends to crash the Postgres ODBC driver.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 16:04:46 +00:00
Tilghman Lesher
08c29fea9f Change ENV section to use setenv, instead of putenv (Alexandru Pirvulescu <sigxcpu@gmail.com>, reported via -dev list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 15:33:10 +00:00
Tilghman Lesher
7ca5863965 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 23:36:49 +00:00
Tilghman Lesher
43ac3f119b Fix a few remaining bad mmap(2) return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 23:31:20 +00:00
Russell Bryant
653b6f22c5 Fix the check of the return value from mmap(). Thanks to Corydon for catching
this one.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 23:19:41 +00:00
Russell Bryant
ec9fb9a970 Fix the use of the "sourceaddress" option when "bindaddr" is set to 0.0.0.0
instead of having each interface explicitly listed.
(issue #7874, patch by stevens)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 18:04:02 +00:00
Christian Richter
4a5d66f867 fixed #9355
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 13:56:15 +00:00
Nadi Sarrar
681c63cd92 mISDN >= 1.2 provides a dsp pipeline for i.e. echo cancellation modules, make chan_misdn use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-26 10:21:56 +00:00
Joshua Colp
9593ae4269 Only try to handle a response if it has a response code. (ASA-2007-011)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-24 01:35:49 +00:00
Steve Murphy
714e570302 Ugh. that was dumb. Fixed an error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-23 16:07:45 +00:00
Steve Murphy
fe9bbc5dfc Added a few words in the Macro doc strings about the behavior of macros with hangups (et al.), as per 9337
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-23 15:57:26 +00:00
Joshua Colp
0b4eeda153 Indicate the filename changed when it is changed. (issue #9311 reported by jsmith)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-21 18:03:20 +00:00
Christian Richter
74b331c4d0 modified a loglevel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-20 09:23:22 +00:00
Christian Richter
79c08e3a46 avoid sending a disconnect when we already received one.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-20 09:18:06 +00:00
Russell Bryant
ae319d34d5 Add a note to the security file that the Asterisk CLI and log files may contain
sensitive information, and that people should keep this in mind.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-14 16:38:48 +00:00
Christian Richter
0939887739 fixed the crypt_keys stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-13 12:58:32 +00:00
Christian Richter
3b2e8feab4 added method standard_dec for dialing out on groups, to avoid conflicts, which caused issues with some ISDN providers
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-13 11:58:16 +00:00
Olle Johansson
7158b80498 Issue #9229 - No port in request URI on register to non default SIP ports (neelakantan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-13 11:45:52 +00:00
Joshua Colp
6af97b5d59 We can't use the assembler version of fetchadd_int under Intel Macs. (issue #9254 reported by darrell budic)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-12 16:49:49 +00:00
Joshua Colp
5941cc916c If we are unable to lookup the host in a c line we have to abort, otherwise the previous data is gone and we will (potentially) have no data when all is said and done.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-09 20:46:43 +00:00
Christian Richter
c0cf86d6c8 we can free channel 31 as well, since we can occupy it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-09 14:43:58 +00:00
Joshua Colp
130b54f4b7 Only print out debug message if the definition that makes the variables shows up was actually defined. (issue #9233 reported by serginuez)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-08 16:04:58 +00:00
Russell Bryant
c072213569 Fix a problem where the Asterisk channel name could be that of the wrong IAX2
user for a call.  This is because the first step of choosing this name is to
look for an IAX2 peer that happens to have the same IP/port number that this
call is coming from and assuming that is it.  However, this is not always
correct.  So, I have made it change this name after authentication happens
since at that point, we have an exact match.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 18:17:07 +00:00
Russell Bryant
6f098541d0 Fix a misplaced block of code in the 1.2 version of the patch to fix issue #8977
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 00:27:04 +00:00
Russell Bryant
7c9bc7fd0d If the channels acquired using the manager Redirect action are not up, then
don't attempt to do anything with them.  It could lead to weird behavior,
including crashes.  (issue #8977)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-07 00:20:13 +00:00
Steve Murphy
c7c8b06817 Fix for 9220: Eyebeam cannot renew subscriptions for presence info. Reason: re-SUBSCRIBE requests don't include Accept headers, which the rfc says are optional (to put it tersely), (it uses MAY), and luckily, the sip_pvt struct has the format info stored, so we simply leave it if the format is set, and the accept header null.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 22:52:52 +00:00
Olle Johansson
7d74199c6f Change error message to proper message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 20:33:21 +00:00
BJ Weschke
75ce9f86b8 Cleanup the Makefile so that we only attempt to include a file when we're building and not 'clean'ing so 'make clean' completes successfully. chan_h323 maintainer: please check to make sure I haven't broken your build target. From: jsmith in #asterisk-dev
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@58008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06 15:17:16 +00:00
Christian Richter
58818031b1 subdirs like misdn and h323 should be cleaned by the clean target from channels/Makefile as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 23:18:49 +00:00
Joshua Colp
c17a4c7f53 Make create_dirpath use our standard for return values. -1 is failure, 0 is success. (issue #9205 reported by ballares)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 17:49:18 +00:00
Steve Murphy
7bcc4569bb Fixed a typo introduced via 9156
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-05 14:53:57 +00:00
Christian Richter
dfcff16e09 fixed another place where the out_cause was hardcoded to 16
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-04 10:39:50 +00:00
Tilghman Lesher
12a38f8e56 Memory leak of a list, if call recording was abandoned
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-03 06:36:55 +00:00
Christian Richter
a9252f4549 fixed typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 18:32:51 +00:00
Joshua Colp
6bf891f353 If a SIP message comes in and goes to a method handler that requires additional values that may not be present then send back an error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57475 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 17:02:46 +00:00
Steve Murphy
6752748d87 further refinement in wording of goto documentation, as per 9156, goto not proceeding to next instruction
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-02 16:39:33 +00:00
Joshua Colp
4d5bf84ce1 Don't even attempt to optimize things when a proxy channel is involved. It will just explode in weird and unexplaineable ways. (issue #9175 reported by clegall_proformatique)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-01 22:19:32 +00:00
Steve Murphy
84ab66498f a small documentation update, to reflect reality in the goto doc strings, as per 9156, Goto does not proceed to next prio if jump fails
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 19:12:41 +00:00
Joshua Colp
c8a883fd2f Fix a few more issues with the agent logoff CLI command. (issue #9123 reported by arbrandes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 18:55:45 +00:00
Christian Richter
93c0385bc0 fixed bugs.digium.com bugs: #9157 and bugs.beronet.com bugs: #302, #303, #304
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@57034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28 16:09:27 +00:00
Joshua Colp
7312a2eb3d Obey the clearglobalvars option in extensions reload (or dialplan reload depending on your version). (issue #9146 reported by ramonpeek)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26 20:05:02 +00:00
Russell Bryant
2e64cf06e5 Ensure that lock.h is included in utils.c with AST_API_MODULE defined so that
the implementations will be properly included when the AST_INLINE_API functions
are not going to be inlined.  (issue #9124, festr)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-26 00:34:31 +00:00
Tilghman Lesher
87c0a12a03 Issue 9130 - If prev is the last item on the channel list, then evaluating
additional conditions (e.g. name prefix) will cause a NULL dereference.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-25 14:38:03 +00:00
Russell Bryant
1c26e1c717 Fix up a couple more signal handlers to not do bad things that could cause
various undesirable results.  The other day, I made Asterisk deadlock by
hitting Control-C because of a bad signal handler.  Now, signal handlers
just set a flag and write to an alert pipe for the flag to be handled.  Then,
there is another thread that is monitoring for these flags.  If being run in
console mode, it is just the main thread.  If Asterisk is in the background,
a thread is created to do it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23 23:20:55 +00:00
Russell Bryant
4fb7eb1b7b Don't destroy mutexes before unregistering all of the entry points from the core.
Also, fix a potential memory leak from not destroying the locks for all of the
possible call numbers (about 32k of them).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-23 20:17:56 +00:00
Joshua Colp
ca7fbd749e Always defer Agent logoff if any channels are up until they hang up. (issue #9123 reported by arbrandes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 23:19:25 +00:00
Joshua Colp
c966ea6e2d Only change the original or clone channel if it's the channel behind the proxy channel, not if it's just a regular bridged channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 18:44:24 +00:00
Russell Bryant
c9d26b5a89 If we receive a frame that is not in any of the negotiated formats, then drop
it.  (potentially issue #8781 and SPD-12)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@56010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-22 00:53:25 +00:00
Joshua Colp
aa54a5f91b Change naughty warning message to provide useful information. If a write now fails on a channel in meetme it will tell you the channel name instead of spitting out the wrong error message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 20:32:16 +00:00
Kevin P. Fleming
50feace3ca use new tag version script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 14:03:11 +00:00
Russell Bryant
602c5bb8c3 Fix random crashes when using the MeetMe application. This patch converts list
handling to use the linked list macros and most importantly, implements
reference counting on the ast_conference objects.  The reference counting was
first backported from 1.4.  However, that code has some problems that caused
the reference count to never hit zero.  Those problems are fixed in this patch
and will be resolved in 1.4 and trunk next, with a different patch.

(issues #7647, #9073, #9106, BE-115). 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-21 00:19:14 +00:00
Joshua Colp
960d22deb4 Defer clearing callback information if channels are up until they are hung up. This ensures the hangup process goes smoothly and no channels get hung in limbo. (issue #8088 reported by kebl0155)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-20 22:39:14 +00:00
Russell Bryant
82bc576ea4 Convert a tab to spaces so that the documentation is printed out properly
aligned.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-20 19:49:50 +00:00
Tilghman Lesher
fababa3b74 forcename and forcegreetings options should check to see if the recording already exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-19 18:09:09 +00:00
Olle Johansson
179c829291 Documentation update (#9053, jsmith)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 12:32:13 +00:00
Olle Johansson
9736c57aab Issue #9020 - SIP message retransmission time too short.
Backporting fix implemented in 1.4, where we have a minimum level
for the T1 timer. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-18 10:36:11 +00:00
Joshua Colp
975f117300 Answer the channel before recording privacy information. (issue #8926 reported by lmamane)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 03:53:45 +00:00
Joshua Colp
ff04058bff Allow chan_sip to handle attended transfers from a SIP phone that is sitting behind chan_agent. Yes folks, all it took was one line of code. (issue #8784 reported by pzieba)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17 01:09:50 +00:00
Russell Bryant
c9c943e8e2 Revert the change I did in revisions 54955, 54969, and 54970, in 1.2, 1.4,
and trunk.  I decided that once a conference is created from meetme.conf,
it is acceptable behavior that the pin can not be changed until the
conference goes away.  I also added a note in meetme.conf to describe this
behavior.

We still have another issue in 1.4 and trunk where some conferences with no
users don't go away.  That is the real bug that needs to be addressed here.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@55005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 22:48:22 +00:00
Joshua Colp
28c428929e Do not send indications through ast_indicate in chan_agent but instead go directly to the technology. This way when indications are emulated they happen on the Agent channel and do not screw up formats on the channels. (issue #8439 reported by punkgode)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 22:13:45 +00:00
Russell Bryant
2802ea3eeb For conferences that are configured in meetme.conf, check the configuration
file every time someone joins the conference instead of only when the
conference is first created.  This is to ensure that changes to the pin
numbers in the config file are always honored.  (issue #9073)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 20:56:58 +00:00
Olle Johansson
d44c7d9c54 Issue #9069 - If we open with TH we should not close with /TD. (seanbright)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-16 11:38:03 +00:00
Joshua Colp
041061ca36 Use a separate variable to indicate execution should continue instead of the return value. (issue #8842 reported by pluto70)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-15 16:14:40 +00:00
Olle Johansson
a17395f9f3 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54438 65c4cc65-6c06-0410-ace0-fbb531ad65f3 2007-02-14 18:40:44 +00:00
Matthew Fredrickson
3b38b3f632 When handling glare on a PRI, move the requested channel rather than hang up the old one. Fix for 8957 and 9011.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-14 16:25:49 +00:00
Olle Johansson
5f3b33f0f5 Make sure that outbound calls are applied to the peer.
This fixes some issues with "hints not working", but only in 1.2.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@54179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13 18:35:43 +00:00
Kevin P. Fleming
27a1f39f78 ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn't double the channel count
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-08 22:17:49 +00:00
Tilghman Lesher
f49ce518ba Issue 9003 - If fullname is empty, quote() passes back "\""
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-08 13:36:10 +00:00
Joshua Colp
d2261a98af Fix a few potential memory leaks with realtime users and peers. (issue #8999 reported by bsmithurst)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-07 15:38:48 +00:00
Tilghman Lesher
7d1af2b829 Issue 7440 - Macro called from Macro from the h extension exits prematurely
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-07 15:30:02 +00:00
Tilghman Lesher
4fa9370412 Issue 8987 - Status could return two responses (mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-06 06:58:28 +00:00
Jason Parker
99ba264f63 Add a proper newline at the end of this sample config file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-06 00:08:34 +00:00
Russell Bryant
fed5b6a9b4 Revert some changes that accidentally got committed as a part of another fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-03 20:39:45 +00:00
Russell Bryant
8c161f55e4 set the DIALSTATUS variable to contain "INVALIDARGS" when the dial application
exits early because of invalid arguments instead of just leaving it empty.
(issue #8975)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-03 20:38:13 +00:00
Joshua Colp
15538c732c Pass the glob expanded filename to process_text_line so that error messages contain the actual filename, not the original include one. (issue #8959 reported by tzafrir)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-02 16:58:09 +00:00
Jason Parker
8ab0b28aba Fix a small typo. Synopsis lines shouldn't have a newline
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 23:14:09 +00:00
Joshua Colp
ade14f36ea Copy noncodeccapability over to the joint variable so that telephone-event will get transmitted in the sent INVITE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 22:21:56 +00:00
Joshua Colp
d7dd6ed0a7 Don't negotiate RFC2833 when not configured to do so. (issue #8799 reported by mdu113)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:47:11 +00:00
Olle Johansson
8754f03658 - Make sure we release call from call counter before we destroy call (maybe #7744 and more)
- Backported by accident from 1.4


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:12:52 +00:00
Joshua Colp
8ea5a33c9e Return previous behavior of having MOH pick up where it was left off. (issue #8672 reported by sinistermidget)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 21:03:10 +00:00
Tilghman Lesher
f8bed34be9 Bug 8965 - Allow FIELDQTY to work with both variables and dialplan functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 20:07:35 +00:00
Tilghman Lesher
bc926d7f33 No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01 19:13:53 +00:00
Russell Bryant
f9db7779f0 Fix a bunch of places where pthread_attr_init() was called, but
pthread_attr_destroy() was not.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 21:25:11 +00:00
Kevin P. Fleming
6564129ee7 update to match modified transcoder API
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 18:58:47 +00:00
Russell Bryant
ccce21be4f Use the proper format string to print unsigned values in the rtp debug output.
(issue #8954, wmis)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 17:41:51 +00:00
Kevin P. Fleming
fe394f23d4 allow codec_zap to build again, now that transcoder support is in zaptel 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31 17:28:15 +00:00
Russell Bryant
ccd780463d Don't print a message indicating that we don't know what to do with a proceeding
control frame in ast_request_and_dial().  We just need to ignore it.
(reported by JerJer on #asterisk-dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 19:41:52 +00:00
Russell Bryant
65a8360531 The SIGHUP handler was implemented to allow admins to send SIGHUP to a running
Asterisk process to reload the configuration.  However, doing the actual reload
in the signal handler itself is a very bad thing to do, because the reload
process includes calling non-reentrant functions such as malloc/calloc/etc.
If Asterisk is running in the background, then the reload will happen
immediately.  However, if running in console mode, the reload doesn't work
until something is typed at the console.  That sort of defeats the purpose,
but I don't see an easy way to get around it at this point.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 17:12:04 +00:00
Russell Bryant
29d168987c Comment out the parts in the Makefile that make codec_zap get built. It will
not yet build against zaptel 1.2, so I am disabling it to prevent further bug
reports until it gets merged.
(issue #8940)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 15:35:23 +00:00
Christian Richter
ec4c828386 fixed some possible segfaults. also fixed an very important bug which occurs on high load (when calls are very fast generated)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 14:38:08 +00:00
Russell Bryant
3d12e45f06 Fix the extraction of the timestamp from video frames. It was using the
mapping for a mini-frame instead of a video-frame, which caused it to
get invalid data.
(issue #8795, mihai)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30 00:15:06 +00:00
Joshua Colp
8ba938b508 Now that filename is part of the structure and since it comes before postprocess... we have to add it to our postprocess line. (reported on asterisk-dev by Boris Bakchiev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29 23:39:39 +00:00
Jason Parker
4659a0ac41 Use the correct zaptel header file location.
Currently, this will not build - transcoder support will be added to zaptel later today.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-29 16:48:26 +00:00
Joshua Colp
e06d0f644b Make COMPLETECALLER and COMPLETEAGENT output to queue_log follow documentation. (issue #7677 reported by amilcar)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 02:09:10 +00:00
Joshua Colp
5e9fdf2aa7 Make the last context entry read in the dominant one. (issue #8918 reported by pj)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27 00:03:23 +00:00
Joshua Colp
1cb1bbbe8d Allow dequeueing of frames with negative timestamp by moving jitterbuffer frames check to jb_next. (issue #8546 reported by harmen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 19:15:29 +00:00
Joshua Colp
245cdf50ba Add another note about audio files being played back to each bridged party. (issue #8718 reported by ppyy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 01:48:52 +00:00
Russell Bryant
5823b29f58 Fix a seg fault when running this application with no arguments from AGI.
(issue #8905, junky)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-25 00:39:50 +00:00
Steve Murphy
75d7a0309a updated check_expr via 8322 (refactoring of expression checking impl); elfring contributed a nice code reorg, I contributed some time to get it working again, better messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@52002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 17:43:50 +00:00
Christian Richter
34b5cd1de5 fixed the busy problem (dialstatus was not busy when we called a busy extension)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 10:48:09 +00:00
Russell Bryant
9eaff06d26 Fix an issue related to synchronization of recordings when using Monitor().
The bug is a miscalculation of the amount to seek the stream for writing to
disk when the number of samples coming in and out of a channel do not match up.
(issue #8298, #8887, report and patch by guillecabeza, patch files created and
 testing done by whoiswes)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 00:57:28 +00:00
Russell Bryant
bd06c9494b Don't set a new value for the END_ variable on the channel before using the
old value.  If you do, it will lead to accessing a memory address that has
been free()'d.  (issue #8895, arkadia)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-24 00:17:50 +00:00
Joshua Colp
e1dc278941 Yield before reading from zaptel timing source under Solaris so that other threads get a chance to do things. (issue #7875 reported by bob)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-23 01:41:35 +00:00
Russell Bryant
14eece85c9 Merge codec_zap support for the transcoder card. This is a standalone codec
module so it will not affect anything else.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 19:39:30 +00:00
Joshua Colp
edca3010a4 Move filestream creation to Mixmonitor loop. This will prevent a blank file from being created if no frames ever pass through to be recorded. (issue #7589 reported by steve_mcneil)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 19:08:52 +00:00
Joshua Colp
d46636d6fa Explicitly declare what codecs are supported by default globally since using a bitmask for all may include ones we don't need. (issue #8357 reported by gknispel_proformatique)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-22 16:23:03 +00:00
Russell Bryant
0a73ba87b1 Fix a memory leak on command line tab completion. The container for the
matches was freed, but the individual matches themselves were not.
(issue #8851, arkadia)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-19 16:44:09 +00:00
Dwayne M. Hubbard
91d1c70906 issue 7877: chan_zap module reload does not use default/initialized values on subsequent loads. Reset configuration variables to default values prior to parsing configuration file.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 23:47:10 +00:00
Kevin P. Fleming
6926dd0fbe support echo cancellers that can handle 64ms or 128ms of echo cancellation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 23:35:35 +00:00
Tilghman Lesher
3f07bd5034 If a timezone is not specified, assume localtime (instead of gmtime) (Issue #7748)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 21:11:34 +00:00
Tilghman Lesher
6f1d7511d1 Document all the fields, including the indication that "uniqueid" should not be renamed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-18 17:42:17 +00:00
Russell Bryant
cbfeb816e1 Move the check for a failure of ast_channel_alloc() to before locking the
pvt structure again.  Otherwise, on a failure, this will cause a deadlock.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 21:17:21 +00:00
Tilghman Lesher
0fad242a19 When ast_strip_quoted was called with a zero-length string, it would treat a
NULL as if it were the quoting character (and would thus return the string
in memory immediately following the passed-in string).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-17 20:52:21 +00:00
Tilghman Lesher
7015408cf8 Add documentation walkthrough on getting Postgres to work with voicemail (from Issue 8513)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 21:50:04 +00:00
Tilghman Lesher
c69d99c830 Postgres driver doesn't like a NULL pointer when retrieving the length (Bug 8513)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 21:26:06 +00:00
Joshua Colp
84a751aecd Return previous behavior. ParkedCalls will be able to do DTMF based transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 17:36:50 +00:00
Joshua Colp
ed7bdda7b0 Add none as a valid callgroup/pickupgroup option. I consider it a bug that it would inherit it all the way down and not have any way to reset it to nothing - so that's why it is in 1.2. (issue #8296 reported by gkloepfer)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-16 05:53:31 +00:00
Tilghman Lesher
e9b6a2c807 Check return value before dereferencing (Bug 8822)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 23:09:02 +00:00
Matt O'Gorman
741131aaa2 Solves issue with forwarding voicemails from folders other than inbox.
patch by anthonyl.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-15 20:44:53 +00:00
Tilghman Lesher
321c032c5e Bug 8814 - db should look for its header using a relative path, instead of the system path (Fixes FreeWRT)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-14 05:01:16 +00:00
Kevin P. Fleming
808bcff9d0 minor documentation clarification
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-12 14:34:15 +00:00
Olle Johansson
2e738d5a7c Issue #8793 bad response for Unsupported Extension (different fix).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 18:11:09 +00:00
Christian Richter
5704d29ffa when we get L2 UP, the L1 is UP definitely too, so we set the L1 state up as well.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50506 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 14:45:38 +00:00
Christian Richter
ec695243af * more additions to make the RESTART message work
* added fix for misdn_call to allow SETUPs with empty 
  extensions, replaced the strtok_r functions with strsep for that 
  (inspired by Sandro Cappellazzo, thanks)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-11 13:27:52 +00:00
Christian Richter
f5507d2431 more fixes regarding warnings for gcc-4 and first additions for the restart Information element, in the first step we initiate a restart with a CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 09:51:00 +00:00
Joshua Colp
ef53c893c3 Add another return value to dial_exec_full that indicates execution is going to continuing at a new extension/context/priority and to just let it slide. (issue #8598 reported by jon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 04:51:06 +00:00
Russell Bryant
4e779b5b43 Make the number that represents the major version number a single digit instead
of 2.  Using two digits makes it an octal number when put into version.h, which
breaks the compilation of any out of tree module that checks the version for
any version after 1.2.7 (reported by Matteo Brancaleoni on the asterisk-dev
mailing list, who gave credit to vihai for pointing it out)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 02:16:45 +00:00
Tilghman Lesher
a0afc6c927 The advent of realtime has enabled people to use commas in the fullname field.
This could cause an issue with sending voicemails, when the field is unquoted.
(Issue 8595)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@50150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-09 13:30:04 +00:00
Christian Richter
9713819c85 make gcc 4 happy, remove some warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49922 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 08:37:08 +00:00
Joshua Colp
8ca9fedc42 Ensure we use the default refresh value of 60 if the remote server does not send one. (issue #8746 reported by maethor)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49889 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-08 05:10:07 +00:00
Tilghman Lesher
be0be1b4f1 If openstream fails, then we crash (Issue 8564)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-07 21:43:10 +00:00
Kevin P. Fleming
2194a0b079 ensure that threads which are supposed to be detached (because we aren't going to wait on them) are created properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05 16:56:40 +00:00
Matt O'Gorman
99815228f2 converted a lot of 256 to PATH_MAX and some white space fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 17:45:16 +00:00
Matt O'Gorman
82016c83d2 good catch russell sorry i missed that.
fix magic number with proper sizeof


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-04 16:48:43 +00:00
Matt O'Gorman
58f6fb69fb When using ODBC_STORAGE VoicemailMain doesn't create the
subdirectories for a mailbox such as the INBOX directory.

this patch solves that problem, was written by anthony
be-125


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 23:22:47 +00:00
Christian Richter
9c8bcc3c1c * Added check for bridging in misdn_call to avoid setting echocancellation
when 2 mISDN channels are involved and when bridging is set. That lead
  to a kernel panic before under different situations, because we switched 
  about 2 times between hardware bridging and echocancelation
* readded MISDN_URATE variable which got lost before, this should make app_v110
  work again
* fixed typo



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-03 08:24:00 +00:00
Christian Richter
6e6fa1c71f added check for channel ranges in the set/empty channel functions. set pmp_l1_check default to no. added misdn restart pid cli command. added cleaning of channel when we send a RELEASE_COMPLETE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-02 10:07:22 +00:00
Kevin P. Fleming
6e7786ab99 location of the bug posting guidelines has changed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@49045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-29 00:32:32 +00:00
Olle Johansson
59ae6dac08 Issue 8596: Set CAN_BYE flag for 100 trying too
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-27 15:43:52 +00:00
Russell Bryant
c355d9667b 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/branches/1.2@48955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-25 05:19:48 +00:00
Russell Bryant
847ddc1e2c 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/branches/1.2@48943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-24 07:23:07 +00:00
Russell Bryant
798116918e 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/branches/1.2@48939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-24 06:47:29 +00:00
Joshua Colp
c54cc039e8 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/branches/1.2@48782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 20:25:01 +00:00
Joshua Colp
f28947f7ef Free localuser structure when we fail to dial (issue #8612 reported by rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 21:10:26 +00:00
Christian Richter
526b32f5e6 when we reject a channel, because it's in use already, we shouldn't process the setup anymore. made the channel allocation a bit easier and more understandable, removed a few unused lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 13:08:51 +00:00
Christian Richter
7716c778e4 when our PTP Partner sends us a SETUP with a preselected channel we just accept it, even when we're NT. added some checks for segfaults.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18 10:19:39 +00:00
Olle Johansson
c3b8d9f510 Issue #8592 - handle 504 as 503 - congestion
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 10:51:53 +00:00
Christian Richter
b9bddd3063 removed FIXUP state. added check for channel allocation conflict when we create a setup while the other site creates a setup on the same channel, besides the check we resolve this conflict.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-14 13:03:49 +00:00
Steve Murphy
9cc5b12741 This small patch fixes bug 8541, where the L option to the Dial app wasn't working right. A similar bug (8386) was filed and fixed earlier, but an intervening bug fix to a DTMF problem broke the L() code in a different way. Hopefully, everything is happy now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-13 04:23:17 +00:00
Kevin P. Fleming
72c5d5a16b add silence files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-12 05:11:13 +00:00
Matt O'Gorman
ffdbc25cb9 the english language can be a tricky beast
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 23:00:04 +00:00
Matt O'Gorman
2cbdcb35b1 app_externalivr needs a real silence file, and additional
changes to add silence files into core instead of extra
patch provided by bug 8177 with minor additions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 21:55:43 +00:00
Tilghman Lesher
983d09bc21 When doing a fork() and exec(), two problems existed (Issue 8086):
1) Ignored signals stayed ignored after the exec().
2) Signals could possibly fire between the fork() and exec(), causing Asterisk
signal handlers within the child to execute, which caused nasty race conditions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-11 00:33:59 +00:00
Steve Murphy
611a9778bb This version applies the patch suggested by stevens in bug 7836 (make inbound channel RINGING state consistent with other channels).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-10 02:14:13 +00:00
Russell Bryant
f2df4138cb Use locking when accessing the registrations list. This list is not actually
used very often, so the likelihood of there being a problem is pretty small,
but still possible.  For example, if the CLI command to list the registrations
was called at the same time that a reload was occurring and the registrations
list was getting destroyed and rebuilt, a crash could occur.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-09 15:45:37 +00:00
Russell Bryant
d79533bd94 Ensure that the file position is not incremented beyond the total number of
files available for playback.  (issue #8539, ulogic)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-07 18:14:13 +00:00
Russell Bryant
26676beff5 Fix the name of the rtignoreregexpire option in the sample configuration file.
(issue #8526, arkadia)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 16:05:54 +00:00
Christian Richter
6d3c784a84 added the export and import of the MISDN_ADDRESS_COMPLETE Variable to inidcate wether the extension is already completely dialed or if there might come additional digits by information elements. also added some docs for that.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 15:48:45 +00:00
Olle Johansson
d37fee2b0f Issue #8528 - make sure we don't delete the dialog too quickly after receiving
a 487. Move 487 handling into handle_response_invite where it really
belongs and don't add an ALREADYGONE flag to the dialog.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 15:42:41 +00:00
Christian Richter
95a18631a4 changed a few debugs to higher debug levels
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 14:35:25 +00:00
Olle Johansson
8eb9c059e5 Don't add Contact header on BYE, CANCEL, MESSAGE requests
(Bye, Cancel backported from 1.4, MESSAGE bug reported to me by Gunnar at Omnitor)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 12:14:40 +00:00
Olle Johansson
c70018c590 Only set the ALREADYGONE flag once in handle_response()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 17:59:15 +00:00
Tilghman Lesher
31759faca8 If the recording in the database is too large, it will fail to retrieve with
an mmap error.  Not too sure why this doesn't happen when we put it in the
database, also, but since that doesn't seem to be broken, I'm not going to fix
it (at least until someone reports it).  Solution is to ask for the file in
smaller chunks.  (Bug 8385)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-05 01:26:08 +00:00
Jason Parker
9ce01ec196 Revert change from 8016 - this breaks other stuff... Needs further review.
Tip: When you've reported a bug about something and somebody has put up a
patch for it..  It's not a good idea to open a completely new bug and say that
something is broken because of the patch in the other bug - PLEASE mention
something in the bug where the patch was actually created.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-04 21:20:34 +00:00
Jason Parker
8c413a42eb Fix an issue where a message isn't saved correctly when using ODBC storage and reviewing a message.
Issue 8016 - patch by sokhapkin.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-04 19:06:26 +00:00
Joshua Colp
6502bf97af If the generic bridge tells us not to retry, and we have a frame to spit out then break the bridge. Props to markit in #asterisk-bugs for bringing this up.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-04 18:14:46 +00:00
Kevin P. Fleming
37d6a18db1 if Dial() is going to send music-on-hold to the calling party, it has to send PROGRESS first to ensure that the reverse audio path has been setup first (BE-106)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 23:30:59 +00:00
Jason Parker
49135c3ee5 Fix a small typo - issue 8848, reported by pabelanger
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 20:19:10 +00:00
Olle Johansson
e76ee063e6 Issue 8319 - noriyuki - nonce-count updated *after* use
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 20:47:53 +00:00
Joshua Colp
37db91a3b8 Don't write AST_FRAME_NULL or AST_FRAME_IAX frames out to the channel driver. (issue #8390 reported by hselasky)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 20:27:29 +00:00
Joshua Colp
1b287f7406 Only print out debug message if bridged channel is not NULL. (issue #8412 reported by jubilex)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 20:06:43 +00:00
Joshua Colp
efe92601c5 Do not listen for DTMF on the bridge that comes into existence when ParkedCall is executed. This means native bridging can now occur for this. (issue #8406 reported by kebl0155)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 19:04:11 +00:00
Joshua Colp
274f9027f3 Print certain CDR messages out at the NOTICE level versus WARNING since they can occur when used with the CDR applications and are perfectly fine. (issue #8367 reported by dartvader)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 18:42:45 +00:00
Joshua Colp
6180390206 Remember the pointer to the allocated block of memory so that we can free it and not cause a memory leak. (issue #8449 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 18:17:54 +00:00
Joshua Colp
3781699230 Document 'port' for SIP peers, came up because of the current mailing list thread. (issue #8450 reported by blitzrage)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 17:55:23 +00:00
Olle Johansson
faee7ae5f1 Do proper test and don't leave dialogs hanging...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-30 09:05:07 +00:00
Joshua Colp
d707910edb If the frame was duplicated before writing out then we need to free it. (issue #8429 reported by edguy3)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-29 16:47:10 +00:00
Joshua Colp
b6c058c6c4 According to the research I have done we never needed to include compiler.h in the first place so let's not! (issue #8430 reported by edguy3)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-28 16:56:01 +00:00
Joshua Colp
0c18e0a5e1 Use the proper function to get the new message count instead of always using the filesystem. (issue #8421 reported by slimey)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 18:03:57 +00:00
Tilghman Lesher
9bb51868ca Random MOH wasn't really random (bug 8381)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 17:15:54 +00:00
Joshua Colp
54fc8c75d1 Do not reference the freed outgoing structure in the debug message. (issue #8425 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@48037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-27 15:30:37 +00:00
Olle Johansson
96a36252b6 Change some logging levels. Not having hints is not an ERROR, but still should be reported.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-24 14:33:27 +00:00
Christian Richter
f4137d1609 fixed a litle bug regarding HOLD/RETRIEVE. beatufied some logs, changed some loglevels. changed the default value of block_on_alarm
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-23 16:10:23 +00:00
Olle Johansson
279ebd00c5 Remove unused variable (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-23 10:54:40 +00:00
Steve Murphy
e189ffe5b5 This is the fix for bug 8386, wherein the time-limit args to dial didn't work correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-22 02:19:09 +00:00
Tilghman Lesher
0e783db690 Failing to trap -1 error from mmap causes segfault (Issue 8385)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 19:59:07 +00:00
Joshua Colp
426bdb3b17 Don't forget to byte swap if we are exiting the smoother feed early. (issue #8287 reported by arturs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 19:50:21 +00:00
Joshua Colp
fea6c62d61 Free history items at the end of use of the temporary SIP pvt structure. (issue #8383 reported by benh)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 16:16:22 +00:00
Olle Johansson
0b9a8ee148 Just to be safe, disable all the scheduled items after deleting a scheduler entry (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-20 10:17:36 +00:00
Kevin P. Fleming
ad0f8df528 backport proper channel_find_locked behavior from 1.4 branch (noted by Steve Davies on asterisk-dev list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 19:02:09 +00:00
Jason Parker
b5d03cfa96 Fix a couple of typos in applications.. Initially spotted by mrobinson.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 23:16:35 +00:00
Kevin P. Fleming
91464b50ab update clearly wrong documentation regarding cdr_custom
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 22:57:31 +00:00
Joshua Colp
0127860f60 Look for the header file specifically in all cases, not just the existence of the directory. (issue #8358 reported by mrness)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 20:29:28 +00:00
Joshua Colp
e51a0e25f2 Because of the way chan_local is written we should be extra careful and make sure our callback functions have a tech_pvt. (issue #8275 reported by mflorell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 18:26:50 +00:00
Olle Johansson
08570a5080 Don't fixup if we haven't got PVT. Suggestion from Martin Vit on -dev mailing list inspired
by file's commit to chan_local.

"This shouldn't happen" ;-)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 16:44:56 +00:00
Joshua Colp
e3de4d3653 Make sure that the pvt structure exists before trying to do fixup on Local channels. (issue #7937 reported by mada123, fix by alamantia with mods by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 22:29:30 +00:00
Olle Johansson
f41333b1c4 CANCEL requests are never authenticated (according to RFC 3261)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 21:18:47 +00:00
Kevin P. Fleming
c446ef9782 correct argument name typo that caused global variable to be used instead of the one for the specified voicemail user
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 20:30:29 +00:00
Kevin P. Fleming
3b2f1f1773 when re-writing the config file, don't repeat the path if it hasn't changed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 19:58:46 +00:00
Kevin P. Fleming
2d94af17a7 when appending a list of variable to a category, ensure the tail pointer points to the last variable in the list
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 19:47:43 +00:00
Kevin P. Fleming
9c3789a5fd clear the category's variable tail pointer as well when variables are detached from it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 19:42:05 +00:00
Kevin P. Fleming
f72827b78c ouch... don't use printf, use ast_log/ast_verbose
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 18:39:47 +00:00
Kevin P. Fleming
bedd43d2f9 ensure that message duration is included in email notifications for forwarded messages (BE-96, fix by me after corydon used his clue-bat on me)
ensure that duration in the message metadata is updated if prepending is done during forwarding (related to BE-96)
remove prototype for API call that does not exist


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 17:56:42 +00:00
Kevin P. Fleming
f1d6ccc16f ignore this generated file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 17:07:53 +00:00
Olle Johansson
618dd887f1 Send error message if we fail to allocate sip socket, possibly caused by too few
file handles (wasn't possible before, but with the new way of sending temp messages, it is).

Found this bug under heavy load testing with SIPP.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 15:17:10 +00:00
Olle Johansson
e49736b059 Sending 200 OK and not getting ACK is considered critical for the call.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 13:08:34 +00:00
Joshua Colp
5cea7867b3 Update copyright information in the ADSI logo blob.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 22:15:10 +00:00
Olle Johansson
62cb689e89 Avoid collissions between the peerpoke system and the retransmits. Issue #8272.
In some cases, changed timers caused the retransmit system to destroy the dialog before peerpoke_expire
got a chance.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-14 11:06:31 +00:00
Joshua Colp
b640d51d40 Initialize global pointers for connection and result to NULL. (issue #8356 reported by james)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 21:26:36 +00:00
Tilghman Lesher
442781850b Having more than 255 old messages caused corruption in the new/old count
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 20:18:30 +00:00
Olle Johansson
ff0ce011a0 Don't send 487 if we've already sent 200 OK on invite at time of receiving a BYE in the same transaction.
(SIPP testing)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 19:04:39 +00:00
Joshua Colp
0d9602565f When sending an SMS with a user data header properly set the UDH flag in the first byte. (issue #8347 reported by hoffmeis)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47549 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 17:05:32 +00:00
Tilghman Lesher
a99b6a1c97 If the execute fails a second time, make sure that we don't pass back a stale handle
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 05:45:11 +00:00
Tilghman Lesher
ec623148c0 Don't play dialtone if the seizing the channel fails (Bug 7754)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 00:34:44 +00:00
Russell Bryant
18f4324baf Only do the check to determine whether the channel calling this function is an
IAX2 channel when getting the IP address using the special argument, 
CURRENTCHANNEL.  (issue #8341, jcovert)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-12 06:09:03 +00:00
Olle Johansson
474abf4656 Clear dialog on loop (backport from 1.4 by mistake)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 20:46:25 +00:00
Olle Johansson
55867f295a - Don't check for ignore in blocks that isn't reached if ignore is on...
- return properly after sending reply in handle_request_invite


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 19:37:41 +00:00
Olle Johansson
a7e9e0893b Fix multipart/mixed SDP support (issue 8010, alphaque)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10 18:50:08 +00:00
Joshua Colp
06f51cc52f Don't include compiler.h on kernels 2.6.18 and higher as, well, it's apparently going to be removed. This should make all you FC6 fans happy as your Asterisk will now build without any mods.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 16:48:05 +00:00
Christian Richter
a173aeca9d Fixed segfault when no misdn.conf exists, reported by Igor Neves, thanks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-09 13:09:10 +00:00
Olle Johansson
e37d7b6682 Destroy the proper dialog...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 07:40:38 +00:00
Olle Johansson
735b4cf688 Remove dialog properly at unload of module (rizzo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 07:31:34 +00:00
Steve Murphy
e301bc352f This mod for bug_7506, to make the manager code output the proper event
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 18:22:01 +00:00
Olle Johansson
b4392d33ed Don't ever reply to an ACK. (Issue 8265)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 13:02:30 +00:00
Russell Bryant
7c651a64a7 If random order is enabled for files mode music on hold, set a random initial
position, instead of always starting at the first file, and doing the random
operation only when switching to the next file.
(bug reported by John Lange on the asterisk-dev mailing list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@47238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 01:22:58 +00:00
Russell Bryant
f18766c30a ignore files in a music on hold directory that begin with '.'
(issue #8249, cboie)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 17:47:56 +00:00
Matt O'Gorman
769113c53f read then commit.... better fix for bug 8083 as
suggested by my peers


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 17:12:56 +00:00
Joshua Colp
1961bac13d Repeat after me oej: I will at least make sure my code compiles before I commit it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 16:02:27 +00:00
Olle Johansson
7908be0c2f Don't overwrite flags in the packet
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 15:15:06 +00:00
Russell Bryant
e6465e0e69 Add a missing call to free before returning in an error condition
(issue #8268, mrness)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 13:55:39 +00:00
Matt O'Gorman
3ac718e5f4 fix for bug #8083 crash caused by double free on m->msg
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 21:20:35 +00:00
Steve Murphy
d4b36ffde5 a fix for bug 8251; the var_val needs to accept longer strings or mass confusion and a lot of lost time is the result
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 19:52:43 +00:00
Russell Bryant
78ccdbc123 soxmix and Asterisk expect different file extensions for certain formats. This
was already handled for the wav49 format.  However, it was not handled for
ulaw and alaw.  I fixed this in such a way that using the alternate extensions
for ulaw and alaw will only happen if we know we're calling soxmix, and not a
custom script defined using the MONITOR_EXEC variable.  The wav49 processing
was left alone so that external scripts will see no behavior change.
(issue #7550, reported by mnicholson, proposed patch by junky, committed fix
is a bit different)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 18:24:17 +00:00
Tilghman Lesher
38ba4c204e Move thread-unsafe initializer to the module loading code; add the
corresponding function to the module unload to fix a memory leak.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 15:46:04 +00:00
Olle Johansson
6a662fe33e Another try to fix ;rport NAT traversal support (issue #7473)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 09:49:46 +00:00
Olle Johansson
e807fbcec5 If peer fails ACL check, fail the REGISTER attempt
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 09:13:34 +00:00
Olle Johansson
2405e775b1 On the other hand, we already copy the NAT flags... Reverting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 09:03:37 +00:00
Olle Johansson
093d6d9554 Issue 7473 - support ;rport on REGISTER requests too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 08:52:35 +00:00
Russell Bryant
f8da54e092 When handling the case where the hostname is just an IPV4 numeric address,
be sure to set the address type.  (issue #8247, alexr)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:18:36 +00:00
Russell Bryant
234408e7c1 fix some copy/paste bugs in the checking of arguments for the
"control stream file" AGI command (issue #8255, mnicholson)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:13:09 +00:00
Olle Johansson
0449e24db1 Bind rtcp to proper IP address
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 16:00:57 +00:00
Olle Johansson
154c4e9504 Issue #7869 - Stop sending 302 redirect when not getting an answer...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 19:28:18 +00:00
Olle Johansson
2bec3b7627 issue #7608: Notifications with wrong content-type. Reported by jsiddall.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 19:00:27 +00:00
Russell Bryant
bf20deeba1 We should always be using _exit() after a fork() or vfork() instead of exit().
This is because exit() does some extra cleanup which in some implementations
of vfork(), for example, can actually modify the state of the parent process,
causing very weird bugs or crashes.  (issue #7971, Nick Gavrikov)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 17:36:07 +00:00
Christian Richter
dc0cb27752 fixed a bug which caused chan_misdn to try to allocate 2 times the same channel on high load, which then caused instability of mISDN. removed a useless function from isdn_lib.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 09:24:01 +00:00
Olle Johansson
7a5dd9d78b Issue #7240, by mistake only committed to trunk (now 1.4), reported by
edgreenberg in Issue #7966. Thanks Ed!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 20:06:55 +00:00
Jason Parker
3ecf516f8f oops - somebody forgot to change this - long ago, probably.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 17:47:52 +00:00
Jason Parker
34934b48fe Remove a useless ast_mutex_unlock.
Issue #8186, patch by anthonyl (fix suggested by benh).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 17:08:40 +00:00
Olle Johansson
67f0e37177 Working to resolve #7608 - adding debug output
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 19:28:48 +00:00
Olle Johansson
4dc847a0f4 Fix the attack shield for 1.2 too. REFER and NOTIFY can create dialogs
in the world of Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 15:49:29 +00:00
Christian Richter
78d7b2641a added nttimeout option to configure wether we disconnect calls on NT timeouts or not during an overlapdial session
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@46176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 08:41:59 +00:00
Joshua Colp
8b75024fdf Don't leak memory mmmk?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 00:25:28 +00:00
Christian Richter
f7ccb0e458 fixed issue, that if chan_misdn is loaded and couldn't be initialized it would cause a segfault after 'reload'. Reported by Drew/Matt thx.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-21 12:35:13 +00:00
Joshua Colp
0d26753de2 Respect language selection when seeing if the file exists (issue #8178 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 17:16:37 +00:00
Joshua Colp
e0cbd7f2d9 Don't create a "real" pvt structure for requests that shouldn't be able to create one. Instead use a temporary pvt and fill it with enough information so we can send a reply.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 20:37:17 +00:00
Jason Parker
c1666e921d Fix an integer signedness problem.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:50:36 +00:00
Kevin P. Fleming
16ce7edf1f provide licensing language for IAXy firmware file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 17:22:01 +00:00
Olle Johansson
2b0634ab95 After some research, we realized that the default behaviour since a long
time was doing the right thing, even though the change optimized a bit
and removed a lot of potential risks. 

Conclusion: No need for a configuration option at all.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 15:50:32 +00:00
Joshua Colp
01a7955445 Use responses rather then replies even though they mean the same thing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 19:59:54 +00:00
Joshua Colp
e64fa8614d Add 'ignoreoodreplies' option which will not create a pvt structure on a SIP response but instead basically drop it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-16 19:28:18 +00:00
Steve Murphy
5e3d5c55b4 Made a small update to solve bug 8128; The switch-case fallthru goto to a pattern extension needed to resolved the wildcards to an appropriate digit for extension matching to work
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-14 00:16:58 +00:00
Kevin P. Fleming
ce069b0c77 don't drop the entire permit/deny list when an attempt is made to add an invalid entry (BE-92)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 22:57:42 +00:00
Christian Richter
1775cae084 avoiding warning, fixing potential bug (backported from 1.2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 19:27:22 +00:00
Joshua Colp
d0649af76d Turn on volume adjustment if it needs to be on (issue #8136 reported by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 17:01:22 +00:00
Kevin P. Fleming
170abc16b0 when sending a call to a peer, use the proper socket if we have multiple bindings (reported on asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 16:18:08 +00:00
Joshua Colp
58477e2410 Pass the right value to usleep for sleeping, and always add the background refresh item back into the scheduler if enabled since it is deleted during reload. (issue #8142 reported by p_lindheimer)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 15:49:53 +00:00
Christian Richter
0bd76b00b2 fixed some echocandisable issues when bridged. this caused a kernel panic sometimes..also some minor formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@45020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 13:11:13 +00:00
Christian Richter
4981d1c5dd fixed issue, that the hangupcause got a wrong isdn cause at RELEASE_COMPLETE
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-13 07:40:07 +00:00
Kevin P. Fleming
ffb75188e1 ensure that IAX2 and SIP sockets allow UDP fragmentation when running on Linux (thanks to Brian Candler on the asterisk-dev list for the tip)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12 18:31:26 +00:00
Christian Richter
722d56e081 (re)added support of dynamical enabling hdlc on bchannels
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-10 13:34:33 +00:00
Olle Johansson
cd79e99638 Issue #8101 - wrong parameter for screening in remote-party-id
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-09 14:36:24 +00:00
Joshua Colp
bfbbc4de78 Even more frames to treat as though the remote side disappeared (issue #8097 reported by eldadran)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-06 16:52:14 +00:00
Joshua Colp
4e717c8ea6 Treat busy control frames as hangup in the file streaming core (issue #8097 reported by eldadran)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 19:55:41 +00:00
Christian Richter
8684599f6c fixed segfault which happens during hold/transfer action
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44460 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 10:02:38 +00:00
Kevin P. Fleming
a8c86fb9b2 fix Polycom presence notification again
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-05 01:27:57 +00:00
Kevin P. Fleming
87706f538e remove workaround for old Polycom firmware SUBSCRIBE requests
add workaround for new Polycom firmware SUBSCRIBE requests (bug is known to exist in 2.0.1 firmware)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 21:15:29 +00:00
Steve Murphy
4f0d22fde1 For bug 7776, I have inserted a warning about Macro nesting vs. stack limitations
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 16:02:22 +00:00
Christian Richter
eae488f164 if INFORMATION Message come with keypad instead of called party number, we just use the keypad as called party number.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 15:26:59 +00:00
Christian Richter
0b4f47c3c3 added the option 'reject_cause' to make it possible to set the RELEASE_COMPLETE - cause on the 3. incoming PMP channel, which is automatically rejected because chan_misdn does not support that kind of callwaiting. Therefore chan_misdn supports now 3 incoming channels on a PMP BRI Port. misdn_lib_get_free_bc now gets the info if the requested channel is incoming or outgoing to make the 3. channel possible
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04 15:13:58 +00:00
Kevin P. Fleming
9c405de30d fix a logic error in my previous fix to the queue reload code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 20:14:13 +00:00
Joshua Colp
e0408416d3 Change the fd on the I/O context in case it changed during the reload, which is indeed possible. (issue #7943 reported by eclubb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:07:59 +00:00
Joshua Colp
7e7a5bfc73 We should be using $AST_SBIN instead of hardcoding the path for the error message (issue #7942 reported by eclubb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 19:39:59 +00:00
Joshua Colp
d1f421a9f6 Shrink when current_ioc is unused. It is set to -1 when unused, not 0. (issue #7941 reported by eclubb)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 17:22:27 +00:00
Christian Richter
77a645d0c6 fixed the hold/retrieve/transfer issues, removed a useless bc field, added setting of frame.delivery fields, some minor code cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 13:28:14 +00:00
Russell Bryant
73138db44a Fix the name of the "eventmemberstatus" option in the sample queues.conf
(issue #8065, adamg)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@44110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-01 15:19:23 +00:00
Kevin P. Fleming
02ae73bd6a proper fix for ast_group_t change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-29 13:44:12 +00:00
Joshua Colp
87803a8ac6 Put in missing \ns on the end of ast_logs (issue #7936 reported by wojtekka)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 18:00:30 +00:00
Kevin P. Fleming
7620e04612 fix buggy (and overly complex) loop used during reload of app_queue for static member list updating
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 17:31:57 +00:00
BJ Weschke
fb599cc53e app_queue is comparing the device names incorrectly while checking their statuses. It's internal list of interfaces includes the dial string, while the argument passed to this function does not have the dial string (/n for a local channel). This causes it to ignore the device state changes because it thinks it belongs to none of its members. (#8040 reported and patch by tim_ringenbach)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 16:37:15 +00:00
Kevin P. Fleming
dc268f1e6e eliminate compiler warning introduced by recent changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 16:32:44 +00:00
Joshua Colp
34adb7efe6 Stop the stream after waitstream returns so that our formats get restored. (issue #7370 reported by kryptolus)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 16:13:55 +00:00
BJ Weschke
f6ddf4e7d4 Fix race condion crash with get_member_status (#7864 - tim_ringenbach reported and patched)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28 15:18:05 +00:00
Tilghman Lesher
a2d98d6c7c Avoid inability to lock directory log message by creating the directory ahead of time. (Issue 7631)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 20:20:35 +00:00
Jason Parker
e247b8ab33 Playback() wasn't setting PLAYBACKSTATUS under several circumstances.
Playback() returns -1 on missing args - so should Background()


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 19:35:09 +00:00
Russell Bryant
0d9ea31f3a Fix a problem that occurred if a user entered a digit that matched a bridge
feature that was configured using multiple digits, and the digit that was
pressed timed out in the feature digit timeout period.  For example, if blind
transfer is configured as '##', and a user presses just '#'.  In this situation,
the call would lock up and no longer pass any frames.
(issue #7977 reported by festr, and issue #7982 reported by michaels and
 valuable input provided by mneuhauser and kuj.  Fixed by me, with testing help
 and peer review from Joshua Colp).

There are a couple of issues involved in this fix:

1) When ast_generic_bridge determines that there has been a timeout, it returned
   AST_BRIDGE_RETRY.  Then, when ast_channel_bridge gets this result, it calls
   ast_generic_bridge over again with the same timestamp for the next event.
   This results in an endless loop of nothing until the call is terminated.
   This is resolved by simply changing ast_generic_bridge to return 
   AST_BRIDGE_COMPLETE when it sees a timeout.

2) I also changed ast_channel_bridge such that if in the process of calculating
   the time until the next event, it knows a timeout has already occured, to
   immediately return AST_BRIDGE_COMPLETE instead of attempting to bridge the
   channels anyway.

3) In the process of testing the previous two changes, I ran into a problem in
   res_features where ast_channel_bridge would return because it determined
   that there was a timeout.  However, ast_bridge_call in res_features would
   then determine by its own calculation that there was still 1 ms before the
   timeout really occurs.  It would then proceed, and since the bridge broke
   out and did *not* return a frame, it interpreted this as the call was over
   and hung up the channels.

   The reason for this was because ast_bridge_call in res_features and
   ast_channel_bridge in channel.c were using different times for their
   calculations.  channel.c uses the start_time on the bridge config, which
   is the time that the feature digit was recieved.  However, res_features
   had another time, 'start', which was set right before calling 
   ast_channel_bridge.  'start' will always be slightly after start_time in the
   bridge config, and sometimes enough to round up to one ms.

   This is fixed by making ast_bridge_call use the same time as 
   ast_channel_bridge for the timeout calculation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 16:54:30 +00:00
Christian Richter
630930dd7f fixed a bug which led to chan_list zombies, when the call could not be properly established in misdn_call. also removed the ACK_HDLC stuff which is not really needed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 12:51:03 +00:00
Russell Bryant
8c2fee974a Back in revision 4798, this message was changed from using ast_cli() to directly
calling write().  During this change, checking if this was a remote console was
removed.  This caused this message about using "exit" or "quit" to exit an
Asterisk console to come up in times where it did not make sense.  This change
restores the check to see if this is a remote console before printing the
message.  (fixes BE-4)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:49:21 +00:00
Joshua Colp
ff41b0ae36 I changed the channel structure... let's be sure this gets updated!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:38:42 +00:00
Joshua Colp
12afd66083 Use proper type to represent the group variable (issue #8025 reported by makoto)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:38:06 +00:00
Russell Bryant
a0da756f2a When parsing the sections of voicemail.conf that contain mailbox definitions,
don't introduce a length limit on the definition by using a 256 byte temporary
storage buffer.  Instead, make the temporary buffer just as big as it needs
to be to hold the entire mailbox definition.
(fixes BE-68)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:23:15 +00:00
Tilghman Lesher
83b377451c Two bugs when forwarding voicemail (Issue 7824):
1) delete=yes was ignored
2) maxmessages was ignored


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-25 21:14:41 +00:00
Russell Bryant
00ca92aeee Check to see if the channel that is activating the IAXPEER function is actually
an IAX2 channel before proceeding to process it to avoid crashing.
(issue #8017, reported by admott, fixed by myself)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-24 13:50:30 +00:00
Joshua Colp
c6e25717b4 Yay another 'round of spy fixes! This fixes a small logic flaw with the cleanup function and a memory allocation issue. (issue #7960 reported by jojo & issue #7999 reported by aster1) Special thanks to csum77 for letting me into a box where this issue was happening.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 21:53:51 +00:00
Tilghman Lesher
e095711654 Whitespace change... really just an excuse to test repotools
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 17:01:48 +00:00
Tilghman Lesher
a6751ecf3a TDS 0.64 updates
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:18:19 +00:00
Kevin P. Fleming
377dac8495 make some more functions static
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 05:08:05 +00:00
Matt O'Gorman
942768c022 fixes some verbose vs debug issues. patch from bug 2617
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 16:21:08 +00:00
Tilghman Lesher
6728ebb72c cid is passed to a destructive function; thus a copy is needed (issue 7961)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-19 12:28:55 +00:00
Olle Johansson
eb4bd38c92 Issue #7682 - don't add contacts to 4xx responses.
(Ugly fix, not proud at all)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 20:08:22 +00:00
Joshua Colp
b1708137da Add deprecation notice about app_math (issue #7957 reported by k-egg)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:30:26 +00:00
Steve Murphy
c8821eb38a Clarified what "callwaiting" does in zapata.conf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:05:56 +00:00
Joshua Colp
e42bf94e06 Add number unobtainable tone for New Zealand (issue #7969 reported by nic_bellamy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:05:39 +00:00
Tilghman Lesher
88ccb83574 Directory used the wrong context for delivery of 0- and *- keypresses
(according to Directory's own documentation) - Issue 7965


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-17 13:54:34 +00:00
Tilghman Lesher
a729fb97e4 When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 07:57:04 +00:00
Tilghman Lesher
b2122691de When the marked user enters the conference, we should no longer timeout
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@43003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-16 04:44:02 +00:00
Tilghman Lesher
1df9da9fef Error message references wrong argument (Issue 7951)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-14 22:16:31 +00:00
Tilghman Lesher
ca79503d56 Backport bugfix patch from 7918 to 1.2 - msg_cfg destroyed before used
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-13 19:51:24 +00:00
Tilghman Lesher
9c8d9ce377 When paging, only wait 5 seconds for the marked user to enter the conference.
After that, assume the paging already completed by the time the channel entered
the conference and drop back out.  (Issue 7275)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 21:47:23 +00:00
Tilghman Lesher
438f99e100 Spelling/grammar fixes (Issue 7929)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 16:39:06 +00:00
Tilghman Lesher
fd0496f3f6 Two grammar issues (bug 7927)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-11 14:40:13 +00:00
Joshua Colp
cc0f191aab Only truly consider the channel in the same format if the format matches the raw format OR if a translation path already exists to translate between them. (issue #7887 reported by softins & issue #7803 reported by alvaro_palma_aste). Thanks goes to stubert for giving me access to a box and showing me a scenario where this occured.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 20:24:19 +00:00
Olle Johansson
ed09034360 - Reset proper flag
- Don't delete SIP dialog prematurely
Strangely enough imported from svn trunk... It's confusing here in Greenland.

(Committing from 36.000 feet above Greenland, on the way to asterisk@von
http://www.pulver.com/asterisk )


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 12:14:03 +00:00
Joshua Colp
25c493ffdc Swap spies during masquerading
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 18:50:43 +00:00
Tilghman Lesher
ec7535bba2 Jump logic was backwards: goto returns 0 if it succeeds, and we should jump if authentication fails. (Bug #7907)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 16:06:17 +00:00
Joshua Colp
a4e28347fe Use ast_best_codec to set the read/write format
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 04:37:07 +00:00
Tilghman Lesher
0cfb462845 Format vulnerability fix - allowing the user to specify a format is not a good idea (Bug 7811)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 23:12:29 +00:00
Joshua Colp
0367363edb Let's use the same thing we use in other places to calculate our time for ast_cond_timedwait (issue #7697 reported by bn999)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 16:30:44 +00:00
Steve Murphy
d3d62f3678 This should fix the problem reported in 7564: logger config file errors getting lost because logging isn't configured yet. The problem was that the code that exists to handle this case was not getting reached, because other tests were causing an early return from ast_log().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-07 02:14:14 +00:00
Steve Murphy
283039a071 added hours,minutes,seconds .gsm files to the install portion of the makefile, as per bug 7545
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 20:09:10 +00:00
Joshua Colp
754cb0114f Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 20:02:59 +00:00
BJ Weschke
ff9fce4bb8 Look ma! No more deadlocks! <sic>
As posted from #7458 and others similar to it in Mantis:
 p->app_lock was a mutex really designed for use with agents not in callback mode. That being the case, I've tried to code it so that when callback mode is used, the app_lock mutex will not be locked/unlocked at all. Please let me know how you make out - and if you continue to deadlock now, please reproduce the deadlock logging information and post to Mantis. 



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 18:16:41 +00:00
Christian Richter
8be5b66038 fixed pipe consuming bug when using chanIsAvail (#7878), also moved a debug log to the very begining of misdn_hangup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 17:10:41 +00:00
Joshua Colp
e627ecb8a7 Make realtime regseconds work as people expected (0 on registration expiration or release, and actual on normal state) (issue #7684 reported by kshumard)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06 15:55:20 +00:00
Joshua Colp
68de3c0b29 Merge in last round of spy fixes. This should hopefully eliminate all the issues people have been seeing by distinctly separating what each component (core/spy) is responsible for. Core is responsible for adding a spy to a channel, feeding frames to the spy, removing the spy from a channel, and telling the spy to stop. Spy is responsible for reading frames in, and cleaning up after itself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 20:02:48 +00:00
Jason Parker
cc82df15ff Small typo in zapata.conf.sample
Reported by ppyy in 7881


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@42014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-05 16:27:46 +00:00
Olle Johansson
9eb92ed083 Don't kill the pvt before we have sent ACK on CANCEL (needs more testing before making a release)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-04 15:46:07 +00:00
BJ Weschke
a05a361fc3 Make sure the forwarded channel inherits variables appropriately when we receive a call forward in the queue. (#7867 - raarts reported and patched)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:38:22 +00:00
BJ Weschke
aaf0ad7b77 Don't keep trying the same member in certain strategies when members of the queue are unavailable (#7278 - diLLec reported and patched) - This should have been patched here first and then merged into /trunk. My bad!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 17:13:38 +00:00
BJ Weschke
919cb0b1a8 Let's NOT spy on Zap/psuedo channels, mmmmmmmmk?
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:50:59 +00:00
BJ Weschke
c3b61adc5b Setting a retry of 0 is generally not a good idea and shouldn't be allowed. (#7574 - reported by regin)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 14:16:08 +00:00
Joshua Colp
1e21d7a537 Only wipe the redirected audio & video IP/port if it's specified, and trigger a reinvite.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 22:49:07 +00:00
Kevin P. Fleming
abb4e3a3a4 put in proper fix for issue #7294 instead of the broken partial fix that was committed, and thereby also fix issue #7438
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 17:35:06 +00:00
Joshua Colp
c42a8d9b99 Finish up the last commit (was worse then originally reported)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:33:00 +00:00
Joshua Colp
a5641b46de Don't treat an unexpected control subclass as voice (issue #7858 reported by PCadach)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:28:08 +00:00
Olle Johansson
abfcb8d31e Issue #7572 - Hangup when receiving a buggy 487 response to an INVITE
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 19:01:55 +00:00
Russell Bryant
e174a3c762 Restore original functionality of 1.2 in places where ANI was not set, but was
changed to be set.  The original change was done to ensure that the behavior of
the "callerid" option in each channel driver was consistent, but it caused an
unexpected behavior change of CDR records for users, so this change is being
reverted in 1.2.  (issue #7695)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 18:59:44 +00:00
Joshua Colp
6b466228c4 Properly handle an ETIMEDOUT result from pthread_cond_timedwait (issue #7318 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 17:58:31 +00:00
Olle Johansson
955aa04edc Issue 7822 - don't use SRV lookups if it's disabled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 14:31:47 +00:00
Russell Bryant
41fad4887e clean up last commit ... most notably, there is no reason to do heap
allocations here, and it also included a potential memory leak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 13:33:34 +00:00
Steve Murphy
c6d94b0d89 Fixes for bug 7813, via patch submitted by stevens.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 05:49:12 +00:00
Steve Murphy
c4f13b4c28 Removed from the docs the mention of the ! and =~ operators, as these
were knocked out of ast_expr2 because they were new features. Let's hope 
I can keep them from getting knocked out of the trunk, too!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 20:51:08 +00:00
Steve Murphy
6daea8e8fb According to a note added to 7731 by mneuhauser, this
will repair a break caused by the last fix (7731).



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-28 19:06:55 +00:00
Matthew Fredrickson
640f0361b9 There, much better.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 15:21:18 +00:00
Matthew Fredrickson
3bfeacea91 Don't send proceeding twice (#7800)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 15:13:43 +00:00
Tilghman Lesher
e83bbab1ec Text only - clarify the reason for entry into authentication mode when the skipuser option is ignored
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@41065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-25 15:07:16 +00:00
Russell Bryant
034a919e1f Fix a few issues related to the handling of channel variables
- in pbx_builtin_serialize_variables(), the variable list traversal would stop
   on a variables with empty name/values, which is not appropriate
 - When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
   AST_LIST_REMOVE
 - During masquerading, when copying the variables list from one channel to the
   other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
   It leaves the tail pointer of the list invalid.  Introduce a new macro,
   AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 19:41:26 +00:00
Joshua Colp
761d98663f I can type english. Honest. Thanks Kenny.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 17:13:04 +00:00
Joshua Colp
fac91f48ef Minor documentation fix to add the 'dynamic' dialplan option from angler
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 16:44:41 +00:00
Tilghman Lesher
39e622f7cf Revert last change - breaks retrieval of builtin variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23 16:05:26 +00:00
Tilghman Lesher
dad6bc4d32 Bug 7779 - Using initstate(3) means that we cannot unload this module once loaded.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-22 02:59:37 +00:00
Matt O'Gorman
4514a22df3 Move the load_modules call so that if a module needs
realtime support it will work, none do currently but a good
move none the less.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 22:34:26 +00:00
Tilghman Lesher
c7a845c978 Reformat to match the contribution style of other contributors
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 22:09:57 +00:00
Joshua Colp
379785c401 Turn media level c= parsing on by default (issue #7725 reported by psm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-20 04:49:48 +00:00
Jason Parker
d98055d875 Fix a bug with app_voicemail when trying to use app_directory to leave messages
to another user (options 3, 5, 2).

If the context/extension didn't exist in the dialplan (and why should it have to?),
it would fail, saying that it's an "invalid extension".

Fix was different in svn trunk.

(issue BE-71)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-19 01:03:22 +00:00
Kevin P. Fleming
86b0330dc5 make a feeble attempt to avoid the 'how do I enable my hardware echo canceler' questions
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-18 19:10:51 +00:00
Kevin P. Fleming
2650ee2f9a rename file per crichter's request
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 22:00:37 +00:00
Christian Richter
71b348be1c This rather small ;-) commit merges the changes from my team branch 0.3.0 into t
he 1.2 branch. 

These changes include the new mISDN mqueue interface which makes it possible to 
compile chan_misdn against the current cvs version of mISDN/mISDNuser.

These changes also contain various additions and numerous bugfixes to chan_misdn
.

Each change is documented in the commit logs in the team/crichter/0.3.0 branch.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 21:57:19 +00:00
Russell Bryant
2f5c21ded7 revert bogus change to attempt to fix bug 7506 which actually causes half of
the channels not to get "Newchannel" events at all (issue #7745)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:36:21 +00:00
Joshua Colp
3d759745f9 Use the last CDR entry instead of the first CDR entry for variable retrieving variables using the CDR dialplan function. (issue #7689 reported by voipgate)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:22:58 +00:00
Joshua Colp
afedbd97af Make app_macro compile again
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:18:08 +00:00
Steve Murphy
4098ad798d In app_macro, changed the previously changed upper recursion depth limit to a variable, default of the original val of 7. MACRO_RECURSION is a channel variable that will override the limit, but until I can understand and fix why this limit is neccessary, I am not advertising this variable in the docs. This fix mirrors the changes made in r40200 in trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17 16:07:21 +00:00
Kevin P. Fleming
c3a46b712e don't allow AUEP responses to overflow the stack during a string copy (reported by Mu Security)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@40057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-16 18:57:44 +00:00
Russell Bryant
465207a28d use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve global
variables (issue #7609)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:49:41 +00:00
Steve Murphy
f4e47e9b51 This revision fixes bug 7731, the inability for macros to be called more than one level deep in the 'h' extension.
It also pushes up the limit of recursion depth from 7 to 20.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15 22:13:47 +00:00
Kevin P. Fleming
7b46b7133d add explicit listing of anthm's contributions (issue #7683)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 18:39:16 +00:00
Russell Bryant
b740b45902 Increase the buffer size for the callid (issue #7675, reported by pssatcs)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08 17:04:10 +00:00
Russell Bryant
fdfc694ca3 Fix a crash reported to me by hads on IRC. This crash would occur with the use
of the "distinctiveringaftercid" option.  Also, on this user's system, the crash
would only occur when built without optimizations.  This is because the bug is
that the code would write past the end of an array that was allocated on the
stack, and the structure of the stack is different with or without optimizations
enabled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 01:28:29 +00:00
Joshua Colp
1204f825d7 Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@39056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07 00:15:51 +00:00
Russell Bryant
f4c24d5d62 Always generate a Newstate event in ast_setstate() instead of making it a
Newchannel event if the state was AST_STATE_DOWN.  The Newchannel event will
always be generated in ast_request(), so this just causes a duplicated
Newchannel event in some cases.  
(issue #7506, repoted by capouch, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 09:01:37 +00:00
Russell Bryant
e81646d2dd remove duplicate queue log entry when the caller exits on a timeout
(issue #7616, ppyy)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 08:08:48 +00:00
Russell Bryant
54b8d83e4f don't advertise that this function can set a SIP header when it can only
do reads


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 07:21:12 +00:00
Russell Bryant
183541b44d make sure the priv-callerintros directory exists before trying to create a file
there (issue #7659, patch by hads, with some modifications by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 06:37:59 +00:00
Russell Bryant
66b15a3461 Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

Also, fix a couple minor bugs in usecount handling.  chan_iax2 could have
increased the usecount but then returned an error.  The place where chan_sip
increased the usecount did not call ast_update_usecount()


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:08:50 +00:00
Russell Bryant
5e3b7eec7d suppress a compiler warning about the usage of a potentially uninitialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05 05:07:39 +00:00
Joshua Colp
a56f08e345 Treat the file as invalid if we have no valid formats for it (issue #7643 reported by KNK)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 19:54:02 +00:00
Tilghman Lesher
84ad1fe0f3 Bug 7648 - Checking wrong count for plurality on new messages for Dutch language
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03 05:22:19 +00:00
Kevin P. Fleming
8ddb00adaa fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES
accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-02 19:29:56 +00:00
Kevin P. Fleming
4f3b40fe79 ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 23:07:06 +00:00
Joshua Colp
83f9228c1d Close the stream when file based MOH stop. This won't get rid of their position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-01 19:20:05 +00:00
Kevin P. Fleming
532ff6487b don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough)
don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others)
use ast_softhangup_nolock() since we already hold the channel's lock


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 21:14:11 +00:00
Joshua Colp
f41b9baed4 Add missing code to bring transferee channel out of MOH/autoservice under certain circumstance (issue #7611 reported by guillecabeza with minor mods by myself)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 17:09:10 +00:00
Russell Bryant
af0052ee94 one more small tweak for thread-safety of TRACE_FRAMES
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 04:06:16 +00:00
Russell Bryant
70d6a82a9f Make the frame counting done with TRACE_FRAMES defined thread-safe
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-31 04:04:02 +00:00
Joshua Colp
1020b9d11a How many attempts does it take to make a SIP URI parser that works well? I'm up to 5 personally. On to the good stuff - parse the domain first, user second, and get rid of port & options/params last. (issue #7616 reported by andrew)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-29 23:18:00 +00:00
Joshua Colp
2e7e645c77 Make a copy of the request URI in check_user_full instead of modifying the one on the structure, and also strip params properly from the user portion of the SIP URI so as to preserve the domain (issue #7552 reported by dan42)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-28 18:49:00 +00:00
Kevin P. Fleming
7b9abdf138 use the enum that defines the option arguments, so that the likelihood of mismatched option indexes is reduced (which in this case was a bug, the volume argument was not checked properly)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 22:23:38 +00:00
Kevin P. Fleming
6afc9c6c8f do a better job avoiding translation path teardown/setup when not needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 15:40:03 +00:00
Russell Bryant
228c35198c Fix crash when using the "regexten" option with MALLOC_DEBUG enabled. This was
not reported in the bug tracker but the same bug has been demonstrated in other
places in the code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 04:25:41 +00:00
Kevin P. Fleming
0b6aa9cd29 don't do useless translation destroy/build when the channel is already in the correct format
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 02:43:49 +00:00
Russell Bryant
425c51cfd5 fix a crash when MALLOC_DEBUG is enabled and the regexten is enabled. The crash
would occur when the extension got removed. (fixes issue #7484)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-27 01:58:41 +00:00
Joshua Colp
46012df0b6 Put default callerid into contact when the one specified is either NULL or has a zero string length. (issue #7590 reported by key2)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-26 15:26:06 +00:00
Russell Bryant
96048caf41 This resolves a deadlock that a tech support customer was getting frequently
when his users would answer call waiting. If another thread is currently
holding the zt_pvt lock for the first channel, unlock both channels and let
asterisk retry the native bridge, just like what is done for the second channel
directly below these changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-25 19:43:38 +00:00
Steve Murphy
f46ab63b6c This fixes a compile problem for s390 as reported in bug 7253.
Tested on both an s390 and non-s390 machine.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-24 17:05:56 +00:00
Kevin P. Fleming
1cd1b27779 ensure that global 'maxauthreq' is reset to zero during 'reload'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:10:10 +00:00
Russell Bryant
b97c12b80b don't crash if the frame has no data, but has a src
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-18 00:41:47 +00:00
Russell Bryant
09a334573e if asked to duplicate a frame that has no data, don't set the frame's data
pointer past the end of the allocatted buffer for the new frame


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 23:25:33 +00:00
Tilghman Lesher
dfe118c2fd Backport buffer increase to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 22:36:56 +00:00
Tilghman Lesher
f23368365a Overflow bad
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-17 15:52:15 +00:00
Tilghman Lesher
c5623e2acd Bug 7513 - ensure that each time we do a query, the results are returned in the
same logical order, so that when we iterate over the list, we get all results,
not some results repeated, due to insufficient sorting.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 23:29:28 +00:00
Tilghman Lesher
ce37a590e5 Bug 7526 - previous commit broke app_sms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-14 13:31:11 +00:00
Kevin P. Fleming
6ea65400a0 don't fail/abort if the message category sound file cannot be played, just generate a warning message and continue message playback
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 21:22:11 +00:00
Russell Bryant
1d8f732f3f yeah, ummm... This frame pointer should not be static. This situation only
exists in 1.2 (pointed out by Constantine Filin on the asterisk-dev mailing list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 18:44:17 +00:00
Kevin P. Fleming
88ccb628f9 report address of peer trying to subscribe to unknown hint
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 16:44:23 +00:00
Tilghman Lesher
fcf0d79afa Bug 7532 - Typo in enum example
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13 15:45:33 +00:00
Tilghman Lesher
39882ad2f7 Merge fixup for asterisk startup script to zaptel startup script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 18:29:01 +00:00
Kevin P. Fleming
ff3890a952 fix a weird case where a lock file could be left (but would happen almost never)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 15:53:53 +00:00
Kevin P. Fleming
0c754a13a8 fix a case where ast_lock_path() could leave a randomly-named lock file hanging around
make ast_unlock_path actually report when unlocking fails


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 15:46:56 +00:00
Joshua Colp
ff29ba6296 Add support to have maxauthreq as a global option
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 15:23:59 +00:00
Kevin P. Fleming
648bc1828d remove some more bad examples of using printf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 13:54:10 +00:00
Kevin P. Fleming
fe1708f190 get rid of some more printf's (although most of these were ifdef-ed out)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 13:18:21 +00:00
Matt O'Gorman
f009c13db7 GRRR no fprintf!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12 03:55:36 +00:00
Joshua Colp
3d8ef8de96 Add configuration option for IAX2 users that will limit the amount of outstanding AUTHREQs we are waiting for replies on.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11 19:00:50 +00:00
Kevin P. Fleming
152df40d57 do masquerade-behind-proxy checking with better control over locks
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10 21:01:35 +00:00
Joshua Colp
f1b2416353 Change message regarding marker bit forcing when SSRC changes to be shown only during debug so it doesn't overload high capacity systems
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 23:57:53 +00:00
Matt O'Gorman
84881a0662 patch resolves issue with when to decide if its right time
to native bridge, feature redirect was not being checked.
patch from bug #7296


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:41:23 +00:00
BJ Weschke
b617860594 Don't do wierd things on a callback agent that has attempted logoff while still on the phone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 20:38:45 +00:00
Joshua Colp
5a86fcf1f8 Instead of giving the scheduled item ID on a peer expiration, give the time until they expire (issue #7455 reported by slavon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 15:48:07 +00:00
Tilghman Lesher
1a1ae6b104 Fix spelling/grammar (issue 7493)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 13:47:23 +00:00
Joshua Colp
f452a64598 Spell extension correctly in documentation for chan_oss dial (issue #7487 reported by flefoll)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 15:31:01 +00:00
Olle Johansson
2211a552d3 Tell clients based on old SIP standard that we only support MD5 digest authentication...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04 14:45:44 +00:00
Olle Johansson
b8e4f60589 issue #7470 - Need larger buffer for record-route headers...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 15:00:50 +00:00
Russell Bryant
1cf6171b0c fix a race condition that caused asterisk to log a *ton* of warnings on mac
osx about poll returning an error because the polled file descriptor was bad.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 05:12:03 +00:00
Russell Bryant
99b3637d6a use ast_set_callerid to be more consistent and to make sure that the
"callerid" option in the conf files is always handled the same way and sets ANI
(issue #7285, gkloepfer)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 04:19:09 +00:00
Russell Bryant
d89517f348 fix the build with BUSYDETECT_TONEONLY defined (issue #7414)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03 03:23:36 +00:00
Tilghman Lesher
4bee2f3210 Bug 7349 - Directory did not work correctly when USE_ODBC_STORAGE was defined.
Note: Russell agreed that this should have worked, which is why this is
classified as a bugfix.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30 14:05:53 +00:00
Tilghman Lesher
2f0b62b8d3 Bug 7388 - compatibility changes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 19:23:18 +00:00
Kevin P. Fleming
55247bea10 clarify documentation for 'persistentmembers' setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:19:54 +00:00
Kevin P. Fleming
ab4bdf1e3f add documentation for peer-specific 'outboundproxy' setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:19:27 +00:00
Olle Johansson
27aa56e14e Don't delete scheduled item twice in sip_destroy (already fixed in svn trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28 14:12:43 +00:00
Kevin P. Fleming
3d09ddb98e ensure that two SIP channels that exist at the same moment will not have the same channel names (issue #7245, different fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 17:10:12 +00:00
Olle Johansson
bbcb713b68 Issue 6997 maybe, but anyway - don't retransmit responses to NON-invite requests.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26 15:27:58 +00:00
Tilghman Lesher
f6b683b302 Bug 7425 - Size of buffer is passed in by len
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 15:10:06 +00:00
BJ Weschke
64def5d791 We should lock the queue before we go making changes to member interface statuses.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-23 11:30:17 +00:00
Joshua Colp
4564907b41 Add Venezuelan indications (issue #7402 reported by palillo)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21 19:25:34 +00:00
Tilghman Lesher
6d2cff5290 Bug 7398 - Solaris puts its zoneinfo files in a nonstandard place
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 15:05:23 +00:00
Olle Johansson
e5505d1baf Issue #6820 - Possible fix (already implemented in trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-20 10:27:44 +00:00
Joshua Colp
43ad959914 Call reset_user_pw upon changing the password using externpass (issue #7395 reported by Ryan Cumming)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 20:27:44 +00:00
Tilghman Lesher
4c688bb3b3 Issue 7357 - txt file left behind when going to operator. Also, fix a possible file descriptor leak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 18:07:26 +00:00
Russell Bryant
1eb2822b3b don't set state to BUSY if the channel is already in the UP state
(issue #7376, backported from trunk)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 21:03:58 +00:00
Russell Bryant
4893f1917f don't store multiple secrets delimited with semicolons for peers because this
is only valid for users. Instead, only keep the last specified secret for a
peer entry. Also, document how multiple secrets are handled in the sample
config. (Reported by PCadach on #asterisk-bugs)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18 20:15:15 +00:00
Joshua Colp
7807373222 Zero out a declared structure so as to not crash if it contains invalid data (reported by Qwell on #asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 03:37:05 +00:00
Olle Johansson
3cf57b8066 Issue 7294 - patch by phsultan - Asterisk sends Invite instead of BYE in some cases.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 14:11:22 +00:00
Kevin P. Fleming
d00c50cd14 don't use prefixed structure names for internal structures
don't use a plural structure name for a singular object


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 13:30:22 +00:00
Tilghman Lesher
2159afd1ae VoicemailMain exits on any key, when the language is set to Italian, instead of
properly handling the key (issue 7353).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-15 12:40:10 +00:00
Kevin P. Fleming
55ba8ef5c4 coding style cleanups on queue interface handling code that was committed for the last release
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 22:22:21 +00:00
Kevin P. Fleming
b9e587a361 use existing dial string parser for strings supplied to iax2_devicestate, because they can be complete dial strings, not just device names
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 22:17:37 +00:00
Kevin P. Fleming
724b3d0004 clarify file headers that mention disclaimer usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@34087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 14:07:53 +00:00
Kevin P. Fleming
2d7e3395a6 don't output 'no format found' when we _did_ find the format but couldn't open the desired file for some other reason
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-14 02:20:22 +00:00
Kevin P. Fleming
5ae03d8ff8 memory allocation optimizations
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 13:30:06 +00:00
Russell Bryant
4fb3d5bf31 remove duplicate mutex_unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 12:40:40 +00:00
Russell Bryant
ec39ee2c34 fix various places where the code returns without unlocking vmlock or
destroying loaded configuration


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:31:19 +00:00
Russell Bryant
ecbc33eb78 add a missing close of an open fd, destroy of open config, and removal of the
calling channel from the localusers list


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 04:20:10 +00:00
Russell Bryant
2a72316550 revert a change that caused more problems than it fixed and fix the real
problem in this code.  fds was declared as an array of zero size which caused
some weird problems, some of which would only be seen when compiling without
optimizations.  (fixes issues #7071, #7326, and #7305)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13 03:55:11 +00:00
Joshua Colp
d1afe5c64f Greatly simply the mixmonitor thread, and move channel reference directly to spy structure so that the core can modify it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 21:34:38 +00:00
Russell Bryant
9807f83d64 fix a place where a frame would be free'd twice
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 20:40:11 +00:00
Kevin P. Fleming
cb1dc40802 only allow chan_local to masquerade the outbound channel onto its owner, instead of the other way around (this will ensure that group variables on the outbound channel as preserved)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 16:03:29 +00:00
Tilghman Lesher
070d4d3976 Move set priority up, because at this point in the code, stdout is no longer
the console.  If we're unable to set priority, the error goes to Asterisk as
if it were an AGI command (issue 7335).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12 15:27:18 +00:00
Russell Bryant
0cce2fe2e9 fix another place where a frame does not get free'd
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:21:23 +00:00
Russell Bryant
dcebecb76e fix up five little places where frames would not be free'd and remove an
unnecessary mutex_unlock where there is no way for it to be locked at
that time


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 21:08:04 +00:00
Russell Bryant
332880b8bc fix a place that would leak a frame (all of these fixes are in applications
that call ast_read() on a channel but have code paths in them that would not 
free the frame)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:48:41 +00:00
Russell Bryant
59224d0f9f fix a couple places that would leak a frame
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:45:06 +00:00
Russell Bryant
33661e9258 fix two places that would cause a frame to be leaked
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 20:38:39 +00:00
Russell Bryant
4003aff342 fix a case where an HTML frame would be leaked
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:08:12 +00:00
Russell Bryant
de0d5de853 Free frames read from the channel when measuring noise. This resulted in about
9 or 10 seconds of leaked frames in both the TestClient and TestServer
applications


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 15:02:40 +00:00
Russell Bryant
9c99053126 backport a couple of frame leak fixes from the trunk (revisions 33446, 33447)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11 14:56:55 +00:00
Joshua Colp
9d9a6da961 Allow the format outputted by meetme list to be used for meetme commands (like kick) (issue #7322 reported by darkskiez)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:52:51 +00:00
Joshua Colp
c38c7a1f46 Remove an unneeded double lock (issue #7310 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:26:42 +00:00
Joshua Colp
5ccc5a9e53 Handle hangup during recording of screened name (issue #7304 reported by kulldominique)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 18:08:00 +00:00
Joshua Colp
43f10147fe Add missing newlines (issue #7323 reported by darkskiez)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 16:31:29 +00:00
Olle Johansson
4de28aa7cc Do not require a context on a domain= setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 15:53:28 +00:00
Kevin P. Fleming
a19de52a1e handle out-of-memory conditions properly in ast_frisolate() (reported by Slav Kenov on asterisk-dev mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08 16:57:23 +00:00
Russell Bryant
8daadb91c1 fix some broken code with BRIDGE_OPTIMIZATION defined (issue #7292)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 17:53:21 +00:00
Tilghman Lesher
95cd30dc01 Bug 7287 - A too short voicemail with ODBC_STORAGE will cause the first voicemail to be deleted erroneously
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:55:23 +00:00
Tilghman Lesher
43fa2d54ef Bug 7268 - Callerid leaks memory on error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 16:02:43 +00:00
Kevin P. Fleming
f0d3be1740 clean up yesterday's security fix to not cause breakage when video mini frames are received
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 15:48:00 +00:00
Kevin P. Fleming
c515ef705c ensure that the received number of bytes is included in all IAX2 incoming frame analysis checks (fixes a known vulnerability)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 19:53:16 +00:00
Kevin P. Fleming
5684ba5966 return bridge exit logic to what it was before i broke it :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-04 03:43:35 +00:00
Russell Bryant
9c5890a138 when using moh files mode, don't look for a file past the number of files
that have been loaded, or worse, past the size of the files array


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 17:02:49 +00:00
BJ Weschke
efee6cdadf Fix doxygen comment about AST_LIST_HEAD_INIT_NOLOCK
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-03 14:48:13 +00:00
Kevin P. Fleming
3feead3415 remove pointless forcing of the channel into SLINEAR mode; the write format will be set later based on the file that is chosen to be played to the channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 21:46:50 +00:00
Kevin P. Fleming
84c0989323 handle Zap transfers behind chan_agent properly so the agent doesn't get stuck waiting for the call to hang up
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 20:27:50 +00:00
Kevin P. Fleming
f963ebd1ab remove a sample entry that never should have been added (code to support it was not merged)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31321 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 12:41:47 +00:00
Russell Bryant
71d9095626 if the connection to a FastAGI server fails because of a timeout, log a more
informative log message


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 23:50:00 +00:00
Kevin P. Fleming
dbfbe2c679 silence a warning message that is not a warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 22:26:38 +00:00
Russell Bryant
eeb613ea3d fix misplaced manager event (issue #6866, flefoll)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@31127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31 20:26:17 +00:00
Kevin P. Fleming
f43b8a655d check the proper variable...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 19:18:30 +00:00
Kevin P. Fleming
c882c82377 another S/390 build fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 16:07:16 +00:00
BJ Weschke
a6a17f1789 Fix infinite loop scenario and add some sanity checking to prevent segfault on a NULL parameter coming in (which probably shouldn't happen, but just to be safe...)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 14:55:16 +00:00
BJ Weschke
a94248e7dc A new way to try and deal with deadlocks that occur in app_queue at present. Using this approach, we only manipulate the main queue mutexes when we get a dev state change on a device that is actually a member of a queue. Backported from /trunk for the "bug fix".
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26 17:09:51 +00:00
BJ Weschke
f1744d3e31 Oops.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 21:22:16 +00:00
Joshua Colp
9ef31203c9 Don't play the enter sound twice when a person joins a conference after the leader has joined it. (issue #6138 reported by shanermn)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 20:03:11 +00:00
Russell Bryant
5e266283e9 add a missing endif from the recent Makefile change and use indentation
to hopefully prevent us from breaking this Makefile once again
(This nesting is no longer used in the trunk version of this Makefile)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 18:40:42 +00:00
Kevin P. Fleming
ce4e323638 don't try to use -march=s390 when building on S/390 systems (reported via asterisk-users mailing list)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:39:33 +00:00
Kevin P. Fleming
547a070805 allow SIPCHANINFO(peername) to work for calls from users as well (issue #7215)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 17:18:01 +00:00
Joshua Colp
b2e084ae6d Get rid of an incorrect SIP dial string in the sample extensions.conf - I even tried variations... no go (issue #7222 reported by arkadia)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25 15:27:44 +00:00
Kevin P. Fleming
6b101367b8 oops... make sure to stop processing a request once we have sent an authentication challenge (issue #7220)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 21:24:45 +00:00
Kevin P. Fleming
5ecca96df5 don't send CANCEL on a pending INVITE if we haven't received a provisional response yet... mark it pending until the first response is received (issue #7079)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 20:09:24 +00:00
Matt O'Gorman
3e830d9a85 app_meemte used the ast_max_exten instead of path_max
solves bug 6822


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:55:21 +00:00
Joshua Colp
42e50f7eae Merge branch for bug 6264 (Privacy option 2 returns dial-status ANSWER / option_priority_jumping not respected) (reported by jkoopmann and branch by murf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:44:26 +00:00
Joshua Colp
63ffcdfda2 Fix deadlock caused by a race condition in the logger when reloading (issue #7195 reported and fixed by softins)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@30033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 19:14:01 +00:00
Kevin P. Fleming
e9d164d468 support video recording via AGI 'RECORD FILE' command (issue #7068)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:59:20 +00:00
Kevin P. Fleming
f5765a22fc fix various bugs related to exiting from queue via keypress and moh handling (issue #6776, different fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:52:08 +00:00
Kevin P. Fleming
84790a577b respect 'usecallingpres' in zapata.conf even if CLID has not been set for the channel (issue #7123)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 16:17:26 +00:00
Kevin P. Fleming
76066c2b74 fix for non-OSP builds (issue #7217)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 12:31:45 +00:00
Kevin P. Fleming
9739139287 add an option to allow the admin to 'hide' SIP user/peer names from systems trying to 'fish' names
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24 03:32:02 +00:00
Russell Bryant
6d3d5e1649 fix the sourceaddress option (issue #7213, alphaque)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 21:44:52 +00:00
Kevin P. Fleming
d6873875cc simplify/fix lock retry, and fix comment
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 18:16:40 +00:00
BJ Weschke
f84891dfbb Sanity check code for an extended failure in trying to obtain a channel lock that may have been obtained elsewhere. Prevents the monitor thread of the SIP module from going into an infinite loop, effectively, breaking SIP until you restart Asterisk or the mutex is unlocked, whichever comes first.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:17:02 +00:00
Kevin P. Fleming
75ca02dbaa backport some mutex initialization and linked list handling fixes from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 17:15:23 +00:00
BJ Weschke
f1c97e7df8 Fix a potential leak and correct (hopefully) a segfault under certain conditions. #6784 (vovan and perry testing)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23 15:58:24 +00:00
Joshua Colp
919e8741b4 Increase the silence threshold to 128 to "fix" it, so I'm told. (issue #6595 reported by davetroy fixed by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 21:27:12 +00:00
Joshua Colp
7018a80e91 Use the correct language when playing the transfer sound (issue #7109 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 20:15:04 +00:00
Joshua Colp
f0e022bbad Preserve presentation bit when going through chan_local (issue #7002 reported by acunningham)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 16:33:03 +00:00
Tilghman Lesher
6691ebf59f Bug 7194 - spelling fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 14:59:59 +00:00
Tilghman Lesher
d5a7d2e170 Bug 7196 - month range did not work
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22 14:34:34 +00:00
BJ Weschke
1795ff12cd When an application that is executed via applicationmap and exits non-zero, make sure that we pass through the correct return value from the application to make sure a segfault doesn't occur by a bridge trying to continue when it should not. Also, when executing applications via applicationmap, make sure that the application is executed against the channel whose DTMF caused it to be fired off in the first place. (part 1/2 of #7090 - this is the only fix that will be applied to both 1.2 and /trunk) acunningham and blitzrage on testing...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-21 15:16:59 +00:00
Russell Bryant
ee808b6187 fix the possibility of writing one byte past the end of a buffer.
(issue #7189, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@29052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 19:50:41 +00:00
Kevin P. Fleming
e0989958cc don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 02:35:53 +00:00
Russell Bryant
9123735599 fix a case where code made assumptions about how memory for variables is
allocatted on the stack - this patch is slightly different than the one
that went in for the trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 02:31:30 +00:00
Kevin P. Fleming
4eef3ef785 don't try to predict where the compiler will place things on the stack... put them in the right place explicitly (issues #7029 and #7100, maybe others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 00:55:31 +00:00
Kevin P. Fleming
0c4cc3b0ce use the specified 'subscribecontext' for a peer rather than the context found via the target domain (domain contexts are for calls, not for subscriptions) (issue #7122, reported by raarts)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:39:55 +00:00
Russell Bryant
a0c5fed6e8 fix the build of smsq with -Werror. I learned something new about format
strings from this patch!  (issue #7141, Mithraen)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:18:41 +00:00
Russell Bryant
8506e078c5 This explicit poll is only needed on mac. In fact, it breaks some systems
such as some versions of Fedora, causing 'asterisk -rx' to never exit.  This
has been tested on systems showing the asterisk -rx problem, as well as other
unaffected versions of linux, mac osx 10.4, and FreeBSD 6.
(issue #7071)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 19:01:17 +00:00
Joshua Colp
dda49ce86b Make the minidle option actually exist as documented (issue #7159 reported by imran)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28698 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 17:04:02 +00:00
Joshua Colp
63c91a899e When forwarding messages use the context that the active voicemail user was found in. (issue #7010)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 16:03:33 +00:00
Joshua Colp
892d98aca0 Backport of fix for issue #6654 that was fixed in trunk but not here
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:52:09 +00:00
Joshua Colp
14285e5b2b Treat paused queue members as unreachable (issue #7127 reported by peterh)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-19 15:38:59 +00:00
Kevin P. Fleming
89da276678 fix up a few more places to find the SDP properly (fallout from fix for #7124)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 20:43:42 +00:00
Kevin P. Fleming
53a0b36973 handle incoming multipart/mixed message bodies in SIP and find the SDP, if presnet (issue #7124 reported and patched by eborgstrom, but very different fix)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 20:24:07 +00:00
Kevin P. Fleming
bfbf66aec6 use unsigned counters for handling answer/IE lengths while processing DNS results (issue #7174)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:35:55 +00:00
Kevin P. Fleming
2ef43a770b support 'inactive' tag for SDP media streams (simple fix, proper fix will appear in 1.4 release) (issue #7130)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 19:16:40 +00:00
Tilghman Lesher
25d2c99737 Bug 7167 - HasNewVoicemail and VMCOUNT() didn't work when USE_ODBC_STORAGE was defined
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 17:27:59 +00:00
Joshua Colp
3c8d8caca1 Return -1 on error in ODBC messagecount and 0 on success (issue #7133 reported by cfieldmtm)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 16:31:16 +00:00
Joshua Colp
a6d8b31956 Fix endless looping message by checking value of res before doing retries stuff. (issue #7140 reported by tanischen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 14:27:21 +00:00
Olle Johansson
9911943d3d Video in meetme? Hmmm. Removed until we do have some code for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18 12:13:46 +00:00
Joshua Colp
3361be7b6e Fix codec priority stuff during authentication (issue #6194 reported by jkoopmann)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 22:34:08 +00:00
Olle Johansson
8b96daf53e Issue #7176 - Crash in expire_register
(We need to find out what's causing peer to be undefined, so this
 is just a bandaid, not a real fix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 19:27:15 +00:00
Joshua Colp
968d069242 Priority jumping not working on VoiceMail app with new syntax (issue #7164 reported and fixed by alvaro_palma_aste)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 17:07:52 +00:00
Joshua Colp
bc3570ac0f OSPNext does not handle success/failure correctly (issue #7147 reported and fixed by eborgstrom)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 15:17:04 +00:00
Olle Johansson
d5d56f98c3 chan_sip did not use the TRANSFER_CONTEXT for transfers, like res_features. Now fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 09:21:45 +00:00
Tilghman Lesher
728e1d9a31 Bug 7125 - Fix race condition between resequencing and leaving a message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17 02:19:50 +00:00
Joshua Colp
961bcfe98c Inherit channel variables during call forwards when going through chan_local (issue #7095 reported by raarts)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 23:31:56 +00:00
Kevin P. Fleming
e6254eeb34 don't leak frames when deferring DTMF or dropping duplicate ANSWER frames (issue #7041, slightly different fix, reported/patched by clausf)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16 20:05:17 +00:00
Tilghman Lesher
ee46d2d92e Bug 7134 - File descriptor leak with ODBC storage of voicemail
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-13 04:08:29 +00:00
Tilghman Lesher
dd260ec707 Bug 7086 - pbx_checkcondition substitution, so that arbitrary strings are true (for regex)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@27051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 23:02:57 +00:00
Kevin P. Fleming
bb0812be95 backport fix from trunk for bug #6934, ensuring that RTP mark bit is changed when SSRC changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 09:05:22 +00:00
Kevin P. Fleming
78986fe938 ensure that we send a response to REGISTER requests that are successfully authenticated but contain invalid Contact URIs
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11 08:52:46 +00:00
BJ Weschke
adbfc9d3c7 Add the appropriate jumping behavior that is the standard for 1.2.X to SIPGetHeader that is now deprecated in /trunk. #7111 (blitzrage!!!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 14:18:45 +00:00
BJ Weschke
b2e48e3c22 Correct memory leak in find_user_realtime #7118 (fnordian)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@26050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 13:28:39 +00:00
Olle Johansson
6b93396fb9 Issue 7103 - mikma
- The header is named "Require"
- Don't reply to ACK
	(Not using patch against trunk)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:09:55 +00:00
BJ Weschke
6af35712ef Don't show agents as available when they are in wrap-up time. #6726 (ZX81)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 14:12:20 +00:00
BJ Weschke
249760b951 Make QueueStatusComplete event thread safe by wrapping it inside the queue lock clause already there. #7013 (bziherl reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:35:17 +00:00
BJ Weschke
d46fa7e825 Oops. :(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:15:30 +00:00
BJ Weschke
41210a37d6 Don't recheck valid_exit() after getting the result from say_position (which already checks it). Should prevent another loop if the caller hits digits during the position announcement. #6776 (tgj reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 13:11:32 +00:00
Joshua Colp
72fe69919c Incorrect log statement when playing transfer sounds (issue #7008 reported and fixed by nathan)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:16:10 +00:00
BJ Weschke
b3d0a54a6b Fix playback behavior to exit correctly when we receive a hangup during playback of the invalid pin message. #7091 (AntD reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 13:38:11 +00:00
BJ Weschke
053f005508 Reset the value of ast_mainpid if we fork so future remote unix connections display the correct PID. #7098 (tzafrir reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07 12:48:09 +00:00
Russell Bryant
a7987a4d36 re-add a couple of lines that I shouldn't have removed in the previous commit.
I think I should be going to bed now ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:32:23 +00:00
Russell Bryant
960ad9e350 fix a problem where the frame's data pointer is overwritten by the newly
allocated data buffer before the data can be copied from it.  This is in
the ast_frisolate() function which is rarely used.  (issue #6732, stefankroon)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 02:25:48 +00:00
Russell Bryant
eb19888db5 ensure that the appropriate manager events are sent in all of the places where
alarms are detected or cleared (issue #6866, flefoll)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-06 00:05:27 +00:00
Russell Bryant
0f643c18be update chan_h323 to reflect the new prototype for rtp_set_peer (issue #6560, casper)
This was fixed a couple months ago in the trunk, but never in 1.2.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:49:53 +00:00
BJ Weschke
3bc1111ea8 Voicemail fixes along with an API change approved by russellb to fix the bug(s). (jcollie and supczinskib) #7064
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 20:44:53 +00:00
Russell Bryant
d27c901fa2 use the correct function name ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 17:39:03 +00:00
Russell Bryant
9d0eead218 use pbx_checkcondition() instead of ast_true() to evaluate the condition
for MacroIf and WhileIf (issue #7086)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 14:44:50 +00:00
Tilghman Lesher
c7ee76b69f Bug 7023 - reload should not unpause members
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 16:27:20 +00:00
BJ Weschke
092055c3a5 Make sure that only the "|" is a recognized delimiter for Verbose(), as the app documentation already specifies. #7080 (alessiof reporting)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-04 11:17:13 +00:00
BJ Weschke
1b107baf37 Correct application documentation to make users aware that certain options cannot be used in conjunction with others. #6666 (chotaire)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 20:58:10 +00:00
Russell Bryant
83dc76b389 fix up "make rpm"
- don't reference the gzipped man page, because we don't store them
  compressed anymore
- add some files that currently were not listed
(issue #6837)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 18:31:20 +00:00
Olle Johansson
87d78ee383 Issue #7074 - Problem with long contact lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 12:39:55 +00:00
BJ Weschke
316e536e5c Make certain ast_stopstream() sets the channel's stream members to NULL after closing them. #7067 (jcomellas)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 19:39:50 +00:00
Tilghman Lesher
49aa847408 Prompt does not request '#' to end input, so the application should not require it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 02:12:52 +00:00
Tilghman Lesher
00c0af845d Bug 6864 - drop realtime priority on ALL external processes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@24019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 20:44:24 +00:00
BJ Weschke
822ea9615a Correct a condition from the prior patch that could happen in rare circumstances and cause a core dump. Thanks Qwell!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:34:29 +00:00
BJ Weschke
b7f8ee4a6d Make sure that when someone 0's out while recording a msg and then chooses to DELETE the recorded file, the .txt file isn't left around by itself to cause problems later. #7061 (dimitripietro reporting, blitzrage confirmed)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 19:26:43 +00:00
Russell Bryant
d3d73f3499 add missing locking of the dialplan functions list in the "show functions"
CLI command


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 15:12:32 +00:00
Kevin P. Fleming
9426da88b7 fix this to actually compile so people can learn from it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:45:42 +00:00
Kevin P. Fleming
3e1ca33f4e eliminate compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 10:45:24 +00:00
Kevin P. Fleming
37e9f9a15c remove a pointless comparison, since the buffer is smaller than the length being checked for
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 15:46:22 +00:00
Kevin P. Fleming
a7961494bd allow top-level OPTIMIZE setting to affect builds in these subdirectories too
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:27:56 +00:00
Kevin P. Fleming
5d04193649 let the compiler determine whether hardware or software floating point should be used (like we do in the editline subdirectory)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:55:59 +00:00
Kevin P. Fleming
4397e6dd42 remove extraneous -m64 flag that is not needed
remove old 'look' target which is no longer needed
(these are coming from Debian patches <G>)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:38:22 +00:00
Kevin P. Fleming
e5c7e5df97 ensure that the script output is correctly generated when the system's character set does not use the English lowercase/uppercase character groups
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 11:19:04 +00:00
Kevin P. Fleming
8ecd579aec do installation in subdirs as a separate target (so external modules can use the Makefile more easily)
generate final messages -after- running any post-install script that may be present


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 11:40:04 +00:00
Russell Bryant
d762abaf3b note that group assignments must be from 0 to 63 (issue #7048)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@23176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 16:40:32 +00:00
Joshua Colp
d0aef28b0e Queue(somequeue,,,,) -> interpreted as Queue(somequeue,,,,0) (issue #7044 reported nathan fixed by jsmith - sort of)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:11:47 +00:00
Matthew Fredrickson
cecda9a947 Fix buglet in channel reassignment on SETUP_ACK
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 16:12:46 +00:00
Matt O'Gorman
d9b9996a59 do not allow for users to forward voicemail to
themselves, patch from 7001


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 19:18:55 +00:00
Tilghman Lesher
891c6d599e Rolling back change until kpfleming is comfy
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 22:39:10 +00:00
Tilghman Lesher
f2dc4f491d Bug 7004 - release all threads waiting on a condition prior to freeing it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@22112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 22:12:26 +00:00
Kevin P. Fleming
089900af32 support system-specific scripts in safe_asterisk, before starting Asterisk proper
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 21:10:41 +00:00
Tilghman Lesher
95bdc91eaf Bug 6553 - plug memory leaks when ODBC connection is down
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 18:43:17 +00:00
Kevin P. Fleming
9d5f3974d3 properly handle brace-wrapped strings in variable/function references in the dialplan
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:31:10 +00:00
Tilghman Lesher
e6b64adab2 Bug 6984 - off by one error in Random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@21037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 06:26:04 +00:00
Tilghman Lesher
6abf8e5e92 Bug 6544 - when we remove a music class, the thread servicing it should die
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20966 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17 17:00:16 +00:00
Kevin P. Fleming
0c108cb1ec uncomment files that actually do exist (oops)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:21:09 +00:00
Kevin P. Fleming
2939ab99bd update text to match actual prompts being distributed (thanks to Kinsey in the support department for reviewing all the prompts!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@20034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 17:00:32 +00:00
Tilghman Lesher
4bea5adcbf Bug 6947 - Allow vm broadcasts to more than 256 characters worth of mailboxes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 20:37:50 +00:00
Kevin P. Fleming
bd9026f975 oops... let's not set a variable and then immediately overwrite it while assuming its old value will magically return
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 17:40:21 +00:00
Tilghman Lesher
9a13dc9d99 Bug 6957 - variable names beginning with CALLERID weren't substituted correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-13 15:56:35 +00:00
Tilghman Lesher
829bf52765 Bug 6490 - telco intercept should report NOANSWER instead of CHANUNAVAIL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:39:59 +00:00
Tilghman Lesher
b224ed93ca Bug 6061 - Fix ODBC storage of VM on PGSQL and MSSQL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 22:24:46 +00:00
Kevin P. Fleming
c3d195a2b3 don't create a 'voicemail' symlink in the sounds directory; app_voicemail has not needed it since January of 2005 (issue #6613)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:58:47 +00:00
Tilghman Lesher
aea2d73afa Bug 6097 - possible descriptor leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:55:51 +00:00
Kevin P. Fleming
5bc6b3b6fd don't call the originating device as part of the Page() operation (issue #6932)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:50:18 +00:00
Kevin P. Fleming
58c3bdc8f1 simplify spy queue flushing logic, and always force a flush when one side gets full, even if the other side is not empty (issue #6457)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:35:52 +00:00
Kevin P. Fleming
6f7efa99d5 don't destroy the entire dialplan during 'reload', just atomically replace it like 'extensions reload' does (issue #6047)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:14:42 +00:00
Joshua Colp
fb912bc629 Minor linked lists bug fix. When you're dealing with swapping entries around a lot it can cause a seg fault.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:46:38 +00:00
Kevin P. Fleming
95dc3bba01 handle call time limit properly when warning is requested _after_ call would hae already ended (issue #6356)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 20:11:01 +00:00
BJ Weschke
83b525e2cb When using the silence detector in ast_play_and_record() and ast_play_and_prepend(), the truncation code never gets called to remove the detected silence, because the value of res is zero when control gets to that point. #6903 w/some mods (softins)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@19008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 01:05:01 +00:00
BJ Weschke
4a40420978 Don't say that we can pass an 'exten' argument in the documentation of Park() when we really cannot. #6902 (opsys)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 17:29:51 +00:00
Tilghman Lesher
08cc142495 Bug 6914 - .txt file fails to rename on operator out
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 19:20:45 +00:00
Tilghman Lesher
48d13f84a5 Bug 6913 - fix for possible buffer overflow
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 22:07:38 +00:00
Olle Johansson
7b12d67e50 - Fix cause codes
- Add cause code for incompatible formats


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 14:16:41 +00:00
Olle Johansson
d98317c7ad - Fix possible minor memory leak in chan_sip
- Return proper cause code on memory allocation error



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07 13:47:32 +00:00
Kevin P. Fleming
ce8275960e fix typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:15:20 +00:00
Kevin P. Fleming
a6e5c98723 small fix... don't try to check conference details if it couldn't be created or found
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:09:54 +00:00
Kevin P. Fleming
60df6b45d2 don't try to support 'i' or 'r' options if chan_zap is not loaded, and warn the user when they attempt to use them (issue #6675)
update application help text to more clearly define when Zaptel and chan_zap are required


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@18087 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 22:04:58 +00:00
Russell Bryant
235212182e move continue out of block that checks verbose level (issue #6880)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:24:25 +00:00
Joshua Colp
831a96aac1 Update email address to my Digium one
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 17:00:10 +00:00
Joshua Colp
bdea273046 Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:01:19 +00:00
Olle Johansson
f08096e951 Issue #6654: Enum crash on ADDRESS record, possibly bad record, but still a crash
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 06:50:35 +00:00
Olle Johansson
d5a3b59ccf Issue #6878 - Unhide DNDstate manager events (thanks casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 18:28:14 +00:00
Olle Johansson
457bdd22bb Issue #6882 - move "res=-1" out of verbosity block, minor code cleanups (casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 17:59:18 +00:00
Matt O'Gorman
43fde6acce Adds documentation to show what the w flag.
Patch from Ian Kinner at Digium.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-04 15:24:50 +00:00
Olle Johansson
adf51ade80 Issue 6870 - document that parking lots need to be numeric
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:38:11 +00:00
Olle Johansson
65f95fee51 Issue #6848 take two - Use the tag provided by the SUBSCRIBE request when sending NOTIFY
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 20:22:21 +00:00
Olle Johansson
bca4868578 Ugly patch to avoid hangup causes in non-final responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@17074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-03 17:49:17 +00:00
Russell Bryant
9a729f7aff move a NULL check to before the first time the pointer is dereferenced (issue #6832)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 19:11:26 +00:00
Russell Bryant
d125a1a278 fix the situation where bindport is specified but bindaddr is not (issue #6616)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:42:09 +00:00
Kevin P. Fleming
6c0ac0721e ensure that hint watchers (subscribers) cannot be added or removed while the dialplan is being modified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:24:22 +00:00
Tilghman Lesher
65acfca5af Bug 6853 - Manager fixes: 1) extra ActionID, 2) missing colon
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:56:35 +00:00
Tilghman Lesher
3585625b40 Bug 6849 - trivial typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 22:46:06 +00:00
Joshua Colp
c43f01c211 Add another check for 64-bit goodness (issue #6850 reported by evilbunny)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:44:03 +00:00
Joshua Colp
52aa07e2b2 Do not exceed the array size for maximum allowed moh files. (issue #6842)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 17:55:28 +00:00
Olle Johansson
b97c1529fc Set initial value on adsipark
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:34:53 +00:00
Olle Johansson
0a48c19845 Typo fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 01:28:41 +00:00
Olle Johansson
8aa27f2c5c Typo (Issue 6839, casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 00:28:59 +00:00
Tilghman Lesher
0bb7b71572 Bug 6830 - Let GosubIf work with the same conditions as a GotoIf (change in API approved by Russell)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:11:18 +00:00
Tilghman Lesher
ac1e4d72dd Bug 6835 - Updates to GotoIf help text
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 14:10:23 +00:00
Russell Bryant
ecf158b51e tell unsetenv for solaris to return the result of the setenv call
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@16008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 04:15:11 +00:00
Olle Johansson
8d417967ce Issue #6823
- Portability issue with the registration port number patch from yesterday.
  Be compatible with more systems than OS/X :-)
  Thanks Rizzo for the advice.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:58:49 +00:00
Kevin P. Fleming
8d1c316519 ensure that list traversal loops which skip entries properly update the 'previous entry' pointer so when entries _are_ removed the list does not get damaged
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 00:32:10 +00:00
Russell Bryant
70bd3bebc5 backport astmm + sparch fixes from the trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 20:22:05 +00:00
Russell Bryant
8c63eaec22 fix Bus Error on sparc (issue #6354)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:47:03 +00:00
Olle Johansson
35ea822831 Fix breakage of NAT support for peers with qualify=yes.
Thanks Damin for access to your system, sorry folks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 19:07:34 +00:00
Russell Bryant
420f3d12aa fix the order in which for loops are expanded (issue #6810)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:09:05 +00:00
Tilghman Lesher
469e6d539a Bug 6815 - Adding quotes to make bash happy
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 17:48:18 +00:00
Olle Johansson
09bf0c3032 Issue #6736 - Use flags for OPTION messages. Thanks Casper!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:45:31 +00:00
Olle Johansson
3db3883d3d Issue #6597 - sip show registry shows incorrect port
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 23:29:55 +00:00
Olle Johansson
b85f9ea8fb Issue #6409 - Use "s" extension when there's no username in the URI
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 22:50:41 +00:00
Tilghman Lesher
84b4d40f79 Bug 6601 - More configuration abilities for the RH init script
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:07:52 +00:00
Tilghman Lesher
ea4baa91d0 Fix incorrect size of zeroing (left over from when maxmsg was hardcoded at 100)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 05:01:16 +00:00
Tilghman Lesher
eb76fca6a3 Bug 6783 - When context is specified, voicemail should look for mailboxes in that context
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-25 04:09:04 +00:00
Russell Bryant
677ed9a31a use the correct variable in an error message (issue #6791)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 14:48:11 +00:00
BJ Weschke
dea7edda6b Fix a typo in the app description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 04:53:42 +00:00
BJ Weschke
da3df5ec26 Doxygen comment typo corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24 00:48:03 +00:00
Joshua Colp
0a0470ad00 Issue #6764 - Return BUSY signal when other party is busy at Attended Transfer (Reported by mnachev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:51:50 +00:00
Matthew Fredrickson
b89b296584 Fix SETUP_ACK handling so that we change channels if so requested
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:44:36 +00:00
BJ Weschke
41feb1c7ff Bug #5884 - fix a possible race state in app_meetme when a channel has gone away and we are reading continuously for more frames. (mneuhauser)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:43:05 +00:00
Russell Bryant
9884c9637a don't crash when asked to read from a file that doesn't exist (issue #6786)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 20:13:48 +00:00
Joshua Colp
b0f4874196 Fix a minor code issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:18:32 +00:00
Joshua Colp
3667b25224 Issue #6781 - Verbose levels not enforced in app_voicemail (Reported by flobi)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 22:13:30 +00:00
Joshua Colp
dcccda229d Issue #5918 - Disposition showing FAILED even though call is answered successfully (Reported by tracinet)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 21:38:32 +00:00
Joshua Colp
d31a0d9e7b Issue #6780 - ast_pbx_outgoing_cdr_failed description fix. (Reported and fixed by casper)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 20:59:21 +00:00
Olle Johansson
674425a343 Issue #6766 - fix ;user=phone functionality. (Reported by alein, fix by russell - thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@14140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-22 09:10:13 +00:00
Russell Bryant
efd60d1d1f add a note explaining how to set the DYNAMIC_FEATURES variable to allow the use
of custom features (issue #6747)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:59:29 +00:00
Russell Bryant
0cfcb22bbc fix crash when using the ParkAndAnnounce application. When using this application,
there will be no peer channel to play the parking announcement to. (issue #6756)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 18:21:47 +00:00
Russell Bryant
9925080ca6 fix REGEX on strings that contain quotes (issue #6678)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 17:45:56 +00:00
Russell Bryant
e34983cde0 fix spelling of whiskey
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 16:22:16 +00:00
Russell Bryant
17187101f6 don't add conference participant if the user hangs up while recording their name (issue #6661)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 15:53:27 +00:00
Russell Bryant
747495fc0e re-add the Account parameter to the sample call file since it's not really
deprecated since the CDR function is no longer built in


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 14:20:28 +00:00
Tilghman Lesher
d564b81083 Bug 6714 - Workaround to avoid retrieving incomplete voicemail message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 06:24:56 +00:00
Tilghman Lesher
50249c732b Do away with some warnings and fix some indentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-21 05:27:33 +00:00
Olle Johansson
108275cf6c Do not overwrite ANI if it's set by IE (sendany=yes in the peer)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-20 17:36:45 +00:00
Russell Bryant
13b57f8255 revert the change made in revision 12927 in favor of keeping the original
behavior of the option.  The documentation has now been updated to reflect
the actual behavior.  (issue #6523)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:59:55 +00:00
Olle Johansson
6b8f2a96f1 Reset global_rtautoclear at sip reload
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-19 09:25:09 +00:00
Tilghman Lesher
b21dc2c0c2 Bug 6737 - Fix compile warning on OS X
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 20:05:00 +00:00
Olle Johansson
f096152b20 Issue #6690 - clarify progressinband default setting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 17:58:54 +00:00
Russell Bryant
3b776cdfdc always use the callerid signalling method set in the zt_pvt strucutre as
opposed to the last one read from the config file (issue #6734, with mods)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 17:42:46 +00:00
Olle Johansson
9593aa0aa1 To quote giant developers: "Oops". Thanks, Tony!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-16 06:56:20 +00:00
Russell Bryant
4edd97a713 - remove some calculations that will always result in 0
- if a CDR was never started, don't try to calculate a duration and consider it failed


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 22:16:15 +00:00
Tilghman Lesher
eb1b6f313e Reverting patch from bug 6667
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 18:07:06 +00:00
Olle Johansson
38ca23948d Issue #6728: Remove parameters to Event: header on SUBSCRIBE requests
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@13026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-15 13:01:23 +00:00
Russell Bryant
e6ae8990bc when using the G() option to Dial, fix sending the called channel to 1 priority
beyond what was specified (issue #6523)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12927 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:41:05 +00:00
Russell Bryant
14e8c4c5a3 fix a problem with not loading realtime queue members by always reloading a
realtime queue from the database even if it is found in the list (issue #6680)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-14 18:28:39 +00:00
Tilghman Lesher
b2bd6c27db Bug 6667 - Fix for RFC2833 issues
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-13 15:28:35 +00:00
Russell Bryant
d3080cc1ae add locking to protect the list of global dialplan variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 19:26:27 +00:00
Olle Johansson
023a312f65 Set properties on two files that lacked properties for eol etc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 18:54:31 +00:00
Russell Bryant
89995395d9 fix build on parisc (issue #6704)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-12 17:57:37 +00:00
Olle Johansson
fbe6931218 Issue #5937 - Make sure SIP CANCEL's are re-transmitted
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-10 12:13:51 +00:00
Olle Johansson
8545a6d4c0 Issue #6576 - SIP_CODEC not used for early media (reported by gpapadop73)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-09 17:00:36 +00:00
Olle Johansson
3388661f38 Issue #6657 - Ignore 183 session progress without SDP
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-08 10:51:47 +00:00
Tilghman Lesher
1d58eff4a7 Bug 6020 - Race condition where packet could be lost if first packet on list is acked
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-07 00:05:27 +00:00
Tilghman Lesher
cc4595f85e Bug 6664 - More fixes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 23:03:54 +00:00
Olle Johansson
ac9f562712 Revert earlier change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 14:23:14 +00:00
Olle Johansson
b3af62dc4f Fix for astmm compilation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@12036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 11:03:46 +00:00
Russell Bryant
a70900ccd0 fix a typo in the description of the ringtimeout option
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-06 02:32:35 +00:00
Olle Johansson
782eb432ab Clear page2 flags at reload too
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-05 12:40:10 +00:00
BJ Weschke
4e3b9d6389 Substitute variables in the post_process string (if it exists) before those variables could possibly disappear (channel hangup) #6462
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-04 11:45:37 +00:00
Tilghman Lesher
dbc0f5d2e2 Bug 6638 - Solaris is starting to remind me of RedHat...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 17:13:37 +00:00
Olle Johansson
ea27f3c186 Change of URL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 08:12:33 +00:00
Tilghman Lesher
2dc23188a2 Bug 6638 - Use POSIX command for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 00:38:14 +00:00
Tilghman Lesher
a4725e9c73 Bug 6638 - Change from a historic BSD command to a POSIX command for determining username
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-03 00:34:52 +00:00
Tilghman Lesher
575c2bccd5 Bug 6637 - Fixes for Solaris
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:26:30 +00:00
Tilghman Lesher
2d5cc8be5c If debugging, the frame pointer is helpful
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 22:19:52 +00:00
Russell Bryant
10191fe126 fix inaccurate ack message to ChangeMonitor action (issue #6630)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 19:05:40 +00:00
Russell Bryant
4a391da1bd make the terminology used in the synopsis match the option description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:16:26 +00:00
Russell Bryant
86406e8ba0 add the -L option to the synopsis on the man page
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-02 06:11:53 +00:00
Tilghman Lesher
536dcc2058 Bug 6615 - Fix 64bit conversion errors by using a long int
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:41:52 +00:00
Tilghman Lesher
c4c44af8e3 Bug 6618 - Solaris compatibility fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 06:39:10 +00:00
Russell Bryant
b26f150b75 fix the output that indicates whether qualify smoothing is on or not (issue #6608)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:46:04 +00:00
Russell Bryant
271ccecaf2 adjust the keys directory when astvarlibdir is specified in asterisk.conf (issue #6602)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 19:31:10 +00:00
Russell Bryant
0742e08800 add a missing newline in the agi app description (thanks wunderkin!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28 18:31:04 +00:00
Russell Bryant
34a135da3b don't try to print the help text for a CLI command when RESULT_SHOWUSAGE is
returned if there is no help text available (issue #6604)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:20:48 +00:00
Russell Bryant
39139b2802 fix finding realtime peers that are not dynamic by ip address (issue #6093)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 15:14:53 +00:00
Russell Bryant
799247b4d5 don't hang up the channel if its state is set to UP before we return from ast_call (issue #6569)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-27 02:50:09 +00:00
Tilghman Lesher
677a22c209 Bug 5950 - reenable queue log rotation; also, eliminate redundant code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-26 16:26:39 +00:00
Matthew Fredrickson
973a1dec88 Backport of fix to translation optimizations. Thanks again file!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 19:54:40 +00:00
Kevin P. Fleming
dfc0e65f4b factor the number of translation steps required into translation path decisions, so that equal cost paths that require fewer translations are preferred
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 05:08:46 +00:00
Kevin P. Fleming
1e94621214 reformat code to fit guidelines
remember which translation paths are multi-step paths


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:59:50 +00:00
Kevin P. Fleming
5fbe407b98 ensure that spy frame queueing is able to deal with translation failing for any reason (issue #6546)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-25 04:23:48 +00:00
Tilghman Lesher
a3ce65e5cd Oops, this was broken in 1.2, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 23:06:42 +00:00
Kevin P. Fleming
fcf8040825 backport list handling fix from trunk (solves memory leak problem in cdr variables and device state watchers)
remove unusued variable to silence compiler warning


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 14:57:53 +00:00
Kevin P. Fleming
842e9246a6 add comment warning people about trying to use hostnames/IPs in the sample config
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-22 17:32:15 +00:00
Tilghman Lesher
6b682d34ff Would be nice to tell people to look in the right file to increase a constant
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 23:01:12 +00:00
Mark Spencer
1ef0003131 Handle ACKing properly (remove gratuitous -1)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 06:17:26 +00:00
Mark Spencer
4e884dbd28 Fix numerous places in jitter buffer where freed memory is referenced
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-20 05:54:10 +00:00
Tilghman Lesher
0a1d8918d8 Okay, fseek doesn't return an offset
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 18:29:16 +00:00
Tilghman Lesher
3da520e492 Fix possible lack of initialization of useadsi
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:26:31 +00:00
Tilghman Lesher
0a0cf51877 Bug 6539 - Division by two negates error flag
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-19 17:11:02 +00:00
Tilghman Lesher
cab988b595 Bug 6529 - memory leak in ast_play_and_prepend
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-18 00:17:09 +00:00
Russell Bryant
507c47ffa4 fix incorrent index calculation for jitterbuffer history (issue #6517)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-17 01:55:10 +00:00
Russell Bryant
7c92ffe150 when executing the Directory application from voicemail and a context is not
specified, use the "default" context, not the channel's current context (issue #6507)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-16 18:07:52 +00:00
Kevin P. Fleming
f522e07cbd ensure that agents logged in via the manager interface are stored in the persistence database (related to issue #6301)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 01:21:33 +00:00
Kevin P. Fleming
df18b234b1 handle longer ENUM lookup results (issue #6476)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:46:18 +00:00
Kevin P. Fleming
7652fdda20 ensure that FastAGI launcher can handle system call interruption (issue #6449)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 00:36:57 +00:00
Matt O'Gorman
bab77bbab1 bug fix from 6485 with musiconhold not being turned
off by app_meetme


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:56:41 +00:00
Kevin P. Fleming
ce008d40a1 don't double-increment abandon counter for calls that are hung up while dialing members (issue #6289)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@10018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 20:20:15 +00:00
Mark Spencer
710445b5b1 Fix stopstream in menus (bug #6137)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 19:11:25 +00:00
BJ Weschke
ba001a7d15 #ifdef the include too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:50:42 +00:00
BJ Weschke
4f144aa5e3 #ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:45:34 +00:00
Kevin P. Fleming
8d66f50877 when answering INVITE, don't send codecs the peer didn't offer (issue #6052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:30:10 +00:00
Kevin P. Fleming
e0db36550e revert yesterday's temporary fix for issue #6052
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 18:23:13 +00:00
BJ Weschke
13f4e66b14 Fixed my silly backport error from r9861
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 04:45:14 +00:00
BJ Weschke
ae8fe3738b Merged changes from r9844 from /trunk. Make sure that PR_SET_DUMPABLE is set to make certain that we still dump core if Asterisk has setuid'd to run as non-root.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 03:08:17 +00:00
Kevin P. Fleming
b5111fb985 don't try to use peer's dynamic codec numbers, it leads to duplication (issue #6052)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-14 00:46:00 +00:00
Josh Roberson
671cde62de Don't set the formats before we stop indications. (issue #6380)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 17:37:53 +00:00
Russell Bryant
0ea76a52a9 fix memory leak from not destroying the scheduler context on module unload
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:23:20 +00:00
Russell Bryant
db467378b4 fix due to CDR changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:16:23 +00:00
Russell Bryant
e27d844918 now that CDR is a loadable module, don't depend on it elsewhere (issue #6460)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:15:00 +00:00
Kevin P. Fleming
3b0edd5cfe clean up my mess from thread-starting change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 15:22:55 +00:00
BJ Weschke
74eef60486 kpfleming's fix from r9472 backported to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 06:29:34 +00:00
Kevin P. Fleming
b3a8fbf495 don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-10 20:38:59 +00:00
Tilghman Lesher
bae6e7b617 Revert behavior change from previous commit (fixes only)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:10:10 +00:00
Tilghman Lesher
cf015dbefc Backport 5929 to 1.2
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 21:02:05 +00:00
Russell Bryant
32cc1bedc1 add another location for postgresql headers (issue #6419)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 02:31:21 +00:00
Russell Bryant
a96ecb64a6 reload peercontext on iax2 reload (issue #6442)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-09 01:24:55 +00:00
Tilghman Lesher
d1757b3b49 Leave it to RH/CentOS to put the freetds headers in a completely nonstandard location.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 22:34:38 +00:00
Matt O'Gorman
917259bcd3 Make logger report error,warning,notice if logger.conf
not found, also updated chan_oss to give correct
error message if its config file is not found.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-08 22:12:34 +00:00
Tilghman Lesher
eb177856db Bug 6176 - Fix race condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-05 17:10:19 +00:00
Kevin P. Fleming
9849ad993d don't override ASTERISKVERSIONNUM to 000000 for non-svn builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 18:37:04 +00:00
Matthew Fredrickson
bb886dd488 Fix for (#6309), potential (highly unlikely) memory leak in res_odbc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9073 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-02 16:12:13 +00:00
Kevin P. Fleming
48fb967c05 disable buggy PRI user-user code until it can be fixed
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-30 17:08:28 +00:00
Olle Johansson
e74a7116e5 Issue 6182 - Don't remove scheduled event until it's really done.
(reported by malverian) 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-28 13:52:15 +00:00
Olle Johansson
fd25b81993 Issue 6362 - Register without Contact: and Expires: fails (reporter: op)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 08:02:16 +00:00
Tilghman Lesher
dcd9d8d58f Bug 6072 - Revisions to the source bison and flex files don't auto-regenerate these files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-27 00:52:12 +00:00
Russell Bryant
1d9b2a9df1 fix problem with dtmf on e&m (issue #6364)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 19:42:35 +00:00
Olle Johansson
659da47b95 Issue 5898: Registrations does not get deleted if there's an active SIP dialog
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-26 14:39:36 +00:00
Russell Bryant
e83bfee678 don't call ast_update_realtime with uninitialized variables if we get a
registration with an expirey of 0 seconds (issue #6173)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 19:14:43 +00:00
Russell Bryant
ab209c7d92 fix memory leak (inspired by issue #6351)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8666 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 18:39:44 +00:00
Olle Johansson
dc08bd8501 Issue #6439 - the "timebomb" bug. Patch by Markster over GPRS
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 09:46:43 +00:00
Russell Bryant
aca3c1f79d don't leak almost 200 bytes for each new channel (issue #6330)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8619 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 05:38:36 +00:00
Kevin P. Fleming
e07c977f18 ensure hangup cause code is handled properly when channel does not return a frame (issue #6346)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-25 01:50:52 +00:00
Russell Bryant
2ae21cc5c3 completely arbitrary whitespace change for testing something with svnmerge ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:55:32 +00:00
Kevin P. Fleming
05fed23d06 ensure that channel cannot become zombie after we check but before we try to start indications
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 22:32:09 +00:00
Matthew Fredrickson
2f43722570 Backport fix for #6229, hangup on polarity reversal
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 20:37:30 +00:00
Olle Johansson
7ea315539c Issue 6114: Don't hangup on BYE/ALSO with no channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 19:21:15 +00:00
Olle Johansson
10d527906a Issue #6308 - never send response to ACK. (Reported by whiskerp)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-24 13:15:13 +00:00
Russell Bryant
2f1d118537 fix memory leak from not freeing the queue member list when freeing an old queue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 19:03:53 +00:00
Russell Bryant
696922defe fix MixMonitor crash (issue #6321, probably others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 17:47:13 +00:00
BJ Weschke
cea50c9247 Bug fix: Correct some scenarios where CALL_LIMIT could not be getting adjusted properly allowing chan_sip to send calls when it really shouldn't. Bug #6111
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 15:13:41 +00:00
Tilghman Lesher
636f956bf0 Bug 6281 - Cannot set more than a single header with SIPAddHeader
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 08:52:49 +00:00
Russell Bryant
64b1d91701 add a modified fix to prevent writing outside of the provided workspace when
calculating a substring (issue #6271)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-22 02:05:41 +00:00
Russell Bryant
ff83f7c6ed temporarily revert substring fix pending the result of the discussion in issue #6271
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 23:43:14 +00:00
Russell Bryant
87c0cd2667 prevent the possibility of writing outside of the available workspace (issue #6271)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 23:17:06 +00:00
Tilghman Lesher
366c8a99ef Bug 5936 - AddQueueMember fails on realtime queue, if queue not yet loaded
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21 18:29:39 +00:00
Russell Bryant
30f2aff526 fix invalid value of prev_q (issue #6302)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 18:34:42 +00:00
Matt O'Gorman
962cffffc7 solved problem with delayreject and iax trunking
bug 4291


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-20 01:00:46 +00:00
Olle Johansson
f196484187 Enable "musicclass" setting for sip peers as per the config sample.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:40:28 +00:00
Tilghman Lesher
c40fe2f71a Bug 6072 - Memory leaks in the expression parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 19:14:37 +00:00
Russell Bryant
74c149e891 fix Message-Account header to use the ip address if the fromdomain
isn't set (issue #6278)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:56:48 +00:00
Russell Bryant
57c82eb66f fix a seg fault due to assuming that space gets allocatted on the stack in the
same order that we declare the variables (issue #6290)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-19 04:17:45 +00:00
Matt O'Gorman
5460606cff Solves issue with the login proccess in meetme
patch from 6136


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 21:02:06 +00:00
Russell Bryant
1a509417a4 remove ChangeLog from the 1.2 branch. It will only be present in the tags.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 02:49:21 +00:00
Matt O'Gorman
898cd20ceb Changed order of autoload so that pbx_ comes before
channels, and in doing so cause bug 6002 to not
be an issue


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 00:47:04 +00:00
Matt O'Gorman
792b78b317 Stop any generators running on a channel when
festival is called as described in 5996


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 20:10:29 +00:00
Matthew Fredrickson
4efe647169 Backport of fix for #6094
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 18:29:57 +00:00
Matt O'Gorman
4fbba55f14 Fixed code ordering of logger_init and queue_log_init
bug 6263


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 16:55:30 +00:00
Kevin P. Fleming
2efc5a9e83 update CLI copyright notice
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 13:11:55 +00:00
Kevin P. Fleming
57144d5102 do rlimit check _after_ reading config file, in case 'dumpcore' is specified there
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8112 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 23:51:37 +00:00
Tilghman Lesher
555bbffec3 Bug 6238 - Fix segfault when delimiter not specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-14 19:06:44 +00:00
Russell Bryant
e22510658b fix spelling errors (issue #6227)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@8047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-13 06:07:39 +00:00
Tilghman Lesher
cb08e49303 Bug 6211 - Add option deletevoicemail as equivalent to option delete for Realtime
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-12 06:14:22 +00:00
Russell Bryant
dee03d2b80 move variable to correct scope (issue #6197)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 19:08:53 +00:00
Russell Bryant
b5ec3e47fa fix temp greetings with ODBC storage (issue #6078)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 07:18:16 +00:00
Russell Bryant
ffb11fb950 fix mem leak on module unload (issue #6190)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:46:39 +00:00
Russell Bryant
fbee1f0ed7 don't override an error condition that occurred when acting on the primary channel
when stopping the autoservice on the peer channel.  (from issue #6087)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 05:26:21 +00:00
Russell Bryant
131ada1116 lock list of translators *before* recalculating the translation matrix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:53:24 +00:00
Matt O'Gorman
b0609b29aa Minor typo refrenced in 6191
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:38:07 +00:00
Russell Bryant
bbb59b8c5e fix locking error - lock instead of unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 04:19:21 +00:00
Russell Bryant
72deed0c37 fix a little typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 03:12:44 +00:00
Tilghman Lesher
b9f8c60fa7 Bug 6192 - behave correctly when mailbox is specified as argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-11 01:30:10 +00:00
Olle Johansson
87b36e1ff1 - Adding reference to README.tds
- Reformatting table


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-10 08:48:14 +00:00
Kevin P. Fleming
d8c5d338cb re-initialize _all_ sequence numbers when transfer completes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:48:48 +00:00
Russell Bryant
417438fea0 add missing unlock (issue #6112)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 22:07:26 +00:00
Tilghman Lesher
5488ffb6d4 Bug 6157 - Memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 20:08:24 +00:00
Tilghman Lesher
e8725ce940 Update variable documentation to match the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:37:50 +00:00
Kevin P. Fleming
0e734920e8 commit user/group-related changes from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:11:23 +00:00
Kevin P. Fleming
ad598a2060 backport fix from revision 7856 of trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:09:53 +00:00
Kevin P. Fleming
bb47f95262 fix breakage introduced in revision 7871
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7898 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 18:08:07 +00:00
Russell Bryant
a7a2115b9c fix seg fault when using greek syntax in VoicemMailMain (issue #6142)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 05:11:44 +00:00
Russell Bryant
18429f2a69 backport fix for unnecessary unlock (issue #6171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 04:52:16 +00:00
Tilghman Lesher
7e6430787c Bug 6156 - catch all threading errors, not just simple failure
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 07:27:18 +00:00
Tilghman Lesher
dc3ba8c223 Dumb error messages - "Context 'context' already included in 'in' context"
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:34:40 +00:00
Kevin P. Fleming
2fd6520a7e update agent persistence when an agent gets logged off by autologoff
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:21:00 +00:00
Tilghman Lesher
7a61b36104 Bug 6076 - Fix documentation of ast_trim_blank return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:53:07 +00:00
Kevin P. Fleming
2f4783a770 eliminate rounding errors that caused call time limits to be inaccurate (issue #5913)
round 'time left' reported during call limit warnings up to sound more accurate


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:49:50 +00:00
Tilghman Lesher
6056391a78 Bug 6081 - fix for memory leak, formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 23:07:08 +00:00
Kevin P. Fleming
213b3575ce ensure that variable is initialized
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 20:52:38 +00:00
Olle Johansson
3821e18d08 Fix copyright of changed file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 09:13:21 +00:00
Kevin P. Fleming
224c6e3f7c send device state updates for auto-logoff of agents as well
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:58:29 +00:00
Kevin P. Fleming
18ab6f429c doh... fseek() has no useful return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-05 00:18:46 +00:00
Kevin P. Fleming
07f8542ce7 use proper fwrite() parameters and return value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:51:03 +00:00
Kevin P. Fleming
cf293c224d return properly after extending file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:45:34 +00:00
Kevin P. Fleming
e234ad0011 ensure that ulaw/alaw sound files are filled with silence when extended (not zeroes)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:27:57 +00:00
Kevin P. Fleming
229b778b0b make monitoring more tolerant of peers that deliver frames in bursts
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 23:02:38 +00:00
Olle Johansson
66f484defe Issue #5980: Removing extra CR+LF in manager events - needs port to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:46:40 +00:00
Olle Johansson
ed523e248a Fixing typo in XML for video updates.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 21:43:14 +00:00
Russell Bryant
3c49f27bf4 use a more correct way of determining the size of the destination buffer
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 07:06:50 +00:00
BJ Weschke
226d146b25 Fix the 'if' clause to be true under the right conditions. Bug #6126
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-04 05:27:38 +00:00
Kevin P. Fleming
1892289329 remove unused 'old' expression parser
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 20:22:18 +00:00
Tilghman Lesher
5529fc0355 Bug 6121 - typo in application description
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 18:15:12 +00:00
Kevin P. Fleming
73ef559240 revert incorrect fix for bug #6048 from revision 7709
put in correct (simpler) fix
add doxygen docs for channel spy 'state' values


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:24:56 +00:00
Kevin P. Fleming
b59a63c8cd backport rport scanning fix from trunk (bug #6071)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 17:00:01 +00:00
Kevin P. Fleming
c36927137f don't leak memory for (most) expression evaluations
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-03 16:34:12 +00:00
Tilghman Lesher
649aaad100 Bug 6084 - MixMonitor after a 'cli stop monitor' deadlocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 07:31:54 +00:00
BJ Weschke
ea4c262482 Fix compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-02 02:04:14 +00:00
Tilghman Lesher
89de6c9df6 Bug 6091 - Fix race condition around uniqueid
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7677 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 14:54:19 +00:00
Russell Bryant
4578bc3b0c fix memory leak in build_rpid (issue #6070)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-28 17:35:56 +00:00
Russell Bryant
8df1e4866a backport fix for permissions of created recordings (issue #6067)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 21:07:08 +00:00
Kevin P. Fleming
9f92220a9c backport fix to ensure that DSP is never enabled on pseudo channels
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-27 00:07:45 +00:00
Tilghman Lesher
09a9e7bcb7 Remove copy of code in libc, preferring code in utils.c (public domain code)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 20:32:50 +00:00
Russell Bryant
a434f8877a cast time_t to an int in printf/scanf (issue #5635)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 18:19:12 +00:00
Tilghman Lesher
ef891dc0a7 Bug 6051 - VMCOUNT should work as documented and count all, not quit after finding 1
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 06:38:08 +00:00
Kevin P. Fleming
3ebe29c983 add license reference to copyright notice displayed when CLI session begins
add 'show warranty' and 'show license' CLI commands (still need a complete list of non-GPL components included in Asterisk)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 03:01:24 +00:00
BJ Weschke
1028e43464 Another app documentation tweak.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-23 00:00:11 +00:00
Tilghman Lesher
4979f66f28 Bug 6050 SQL requires the use of single ticks to delimit values, not quotes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 22:04:13 +00:00
Russell Bryant
a5e9fe97c8 revert changes to videosupport to allow per-peer setting, since it isn't quite
complete and there is not an obvious fix at this point


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 20:36:47 +00:00
Russell Bryant
2293cfaf84 remove stray unlock (issue #5955)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-22 16:17:43 +00:00
Josh Roberson
d252dde933 Actually put in the per-peer settings for sip video, as they didn't make it in at astricon somehow, and I've been too busy up until now to redo it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 22:23:39 +00:00
Tilghman Lesher
37a49a5992 Allow a chan_alsa that failed to open sound devices to be unloaded.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 20:01:16 +00:00
BJ Weschke
2783801610 Bug #6040 - Documentation correction
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:53:49 +00:00
Tilghman Lesher
82f19c9a91 Bug 5777 - Remove parentheses on Goto in AEL, so that it parses correctly
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:23:12 +00:00
Russell Bryant
71d9531e45 check array bounds when parsing arguments to AGI (issue #5868)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 20:21:26 +00:00
Russell Bryant
3bbeaefa57 backport fix for reloading peer context (issue #6007)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 18:05:45 +00:00
Russell Bryant
4611be805a backport fix for segfault on directed pickup when no CDR is available (issue #5998)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 17:34:00 +00:00
Kevin P. Fleming
587493fdfc backport fix for larger-than-20ms-frames from trunk (bug #5697)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20 12:58:37 +00:00
Russell Bryant
50079144e3 I messed up and accidently committed this to the trunk first ...
- add note on required values of sip_methods struct
- remove duplicate function prototype
- remove duplicate ast_mutex_lock (issue #6025)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 23:47:23 +00:00
Tilghman Lesher
2ca80e76a0 Bug 5988 - record append option not working
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 19:06:46 +00:00
Tilghman Lesher
68e6502484 Bug 6026 - segfault for the sequence NoCDR(), SetAMAFlags()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-19 05:38:44 +00:00
Tilghman Lesher
1e91dfa5df Document that curley braces must be on the same line as the keyword.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 18:55:38 +00:00
Tilghman Lesher
e4e5f7c65b Bug 6009 - off by one error
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 17:19:32 +00:00
Kevin P. Fleming
8ef66261f1 Max-Forwards headers must only be present on requests, not responses
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:59:05 +00:00
Kevin P. Fleming
90812b536c forcibly expire previous subscriptions from a peer when they resubscribe (keeps them from building up and waiting for expiration, and stops us sending unwanted NOTIFY messages to devices)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 03:44:30 +00:00
Kevin P. Fleming
2b880d3ef8 fix some buglet when building team branch version strings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7510 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 02:20:04 +00:00
Tilghman Lesher
6ab729aeb3 We want to check the previous value, not the current value (which was just changed).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-17 01:02:29 +00:00
Tilghman Lesher
c9f97f49c5 First field is truncated
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-16 00:49:39 +00:00
Christian Richter
8b352fcb94 * Added mISDN/mISDNuser Echo cancel Patch
* Fixed Makefiles so that chan_misdn can be compiled again
* added some hints, that mISDN cannot be compiled against gcc-4, SMP, Spinlock Debug
* fixed some Minor issues in chan_misdn, regarding Type Of Number and Presentation






git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 10:52:30 +00:00
BJ Weschke
5a06af4d57 Bug #6003 - Don't free the channel structure until after having sent the manager event.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-15 02:51:54 +00:00
Kevin P. Fleming
2ede900bfd clarify substring documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 18:54:22 +00:00
Kevin P. Fleming
fb0ffc7784 correct broken math in tvfix() for timestamp values over one million
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 16:06:27 +00:00
Kevin P. Fleming
e69171dc06 restore ability of caller to hangup calls that are still ringing (issue #5839)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 05:53:00 +00:00
Kevin P. Fleming
8452f6b494 ensure that hangups while incoming calls are in early state are handled properly (issue #5919)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 05:14:27 +00:00
Kevin P. Fleming
f9bc6f8afc only report AGENT_IDLE for callback mode agents when they are actually idle (issue #5902)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 04:43:38 +00:00
Kevin P. Fleming
f9f44d7d9b use the stream's current point when pausing/unpausing, instead of elapsed time (which doesn't work when the stream has been skipped forward or backward) (issue #5897)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-13 04:25:14 +00:00
Kevin P. Fleming
86bb1472cc set all the child file descriptors to non-blocking so that we don't hang if the child fails to send a newline-terminated command or error message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:30:59 +00:00
Tilghman Lesher
ef09c506c8 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-12 17:19:29 +00:00
Russell Bryant
af7b3b420e silence a couple of compiler warnings about pointer signedness
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 06:08:56 +00:00
Tilghman Lesher
3b80a35a66 Bug 5965 - major bug in AST_LIST_REMOVE
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7429 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 01:26:51 +00:00
Tilghman Lesher
f59b27258c Bug 5967
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-11 01:15:15 +00:00
BJ Weschke
d38fff38f9 Bug #5877
Make sure the digit string from E&M wink DNIS collection is properly null terminated as it grows.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-10 18:10:50 +00:00
Tilghman Lesher
91c5b12f25 Bug 5960
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:45:36 +00:00
Tilghman Lesher
894bdd5cda Documenting two keywords that were previously missing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 23:32:08 +00:00
Kevin P. Fleming
d8c58ca6c8 initialize the buffer before using it...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-08 01:05:43 +00:00
Kevin P. Fleming
43f7956422 ensure that hints are allowed to use global variable references
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-07 20:46:55 +00:00
Kevin P. Fleming
96fcc02900 ensure that sound/music files are handled as binary
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:23:05 +00:00
Kevin P. Fleming
2e8b6e7f20 replace with unmodified file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:19:17 +00:00
Kevin P. Fleming
3ed93398e9 _really_ don't mess with line endings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:08:19 +00:00
Kevin P. Fleming
d84e0caea8 don't try to expand keywords in this file
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:07:48 +00:00
Kevin P. Fleming
5c1da58b90 set this file to binary mode, so it won't be mangled on export/checkout
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-06 00:02:08 +00:00
Russell Bryant
018c617199 remove ASTERISKVERSIONNUM from the version string given to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 06:47:51 +00:00
Russell Bryant
a49f954f6a don't delete dynamic queue members when reloading the static members from a realtime database (issue #5922)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:09:12 +00:00
Russell Bryant
03a8791440 fix the order of arguments to an error message (issue #5927)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-05 00:01:17 +00:00
Kevin P. Fleming
78ad17381e use a more efficient way to get the revision number, that will also report if the working copy contains uncommitted modifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 18:03:07 +00:00
Tilghman Lesher
5b03803e2f Bug 5925: check for "Unknown", as that's what app_voicemail puts into the field for Unknown callerid
Also, remove useless res checks (initialized to 0; never set)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 19:55:05 +00:00
Olle Johansson
ee1e461a57 Documenting the default registerattempts setting as 0, continue hammering the server for ever and ever ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-03 01:24:40 +00:00
Tilghman Lesher
a543725311 Turn on executable bits for startup scripts, and fix bash var interpolation for Mandrake
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 21:12:05 +00:00
Olle Johansson
8c701a0861 Bug #5907. Improve SIP INFO DTMF debugging output. (1.2 & Trunk)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:52:13 +00:00
Kevin P. Fleming
5fbe566524 inherit channel variables into channels created by Page() application (issue #5888)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:51:15 +00:00
Kevin P. Fleming
e14cf31bc9 allow previous context-searching behavior to be used if desired (issue #5899)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:42:40 +00:00
Kevin P. Fleming
0042c03c7e properly handle password changes when mailbox is last line of config file and not followed by a newline (issue #5870)
reformat password changing code to conform to coding guidelines (issue #5870)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:39:00 +00:00
Kevin P. Fleming
41023ecb9c protect agent_bridgedchannel() from segfaulting when there is no bridged channel (issue #5879)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:28:48 +00:00
Kevin P. Fleming
fb8d0a544d allow variables to exist on both 'halves' of the Local channel (issue #5810)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-02 00:26:12 +00:00
Kevin P. Fleming
acaf8c9cc9 don't block waiting for the Festival server forever when it goes away (issue #5882)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:49:44 +00:00
Kevin P. Fleming
0d3fc8d103 ensure channel's scheduling context is freed (issue #5788)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:34:58 +00:00
Kevin P. Fleming
9bbfbacacc Makefile 'update' target now supports updating from Subversion repositories (issue #5875)
remove support for 'patches' subdirectory, it's no longer useful


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:18:29 +00:00
Olle Johansson
8e301c629f Changing bug report address to the Asterisk issue tracker
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 23:18:14 +00:00
Olle Johansson
9576d8a081 Removing references to 1.1dev, replacing with 1.2, in documentation files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 22:21:13 +00:00
Olle Johansson
7db96672bf Fixing some spelling errors, as well as changing "cvs" to "subversion" in misdn documentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 21:38:38 +00:00
Kevin P. Fleming
0d8f099ca2 ensure that 'svn info' output is in the expected language for the script to parse (issue #5880)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 19:25:06 +00:00
Russell Bryant
0a4d7e5068 use ast_app_separate_args to split arguments (issue #5686)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 02:33:58 +00:00
Russell Bryant
a32f75b800 fix queue weight feature - compare member interfaces instead of pointers to
the members, since each queue has its own list of members. (issue #5863)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 01:19:04 +00:00
Russell Bryant
78f37c51ef use '=' instead of '==' for string comparisons. /bin/bash is ok with this, but
/bin/sh is not.  (issue #5885)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-01 00:44:34 +00:00
Russell Bryant
d6e5eb75ee remove outdated redhat init script and provide the updated one in 'make rpm' (issue #5786)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:31:18 +00:00
Russell Bryant
6f433a7e7b Comment out LD_ASSUME_KERNEL by default.
Print error messages if the asterisk executable or the asterisk configuration
directory are not found. (issue #5785, #5708)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 21:24:52 +00:00
Russell Bryant
ce2ecb5582 fix DIALEDTIME when call has not been answered (issue #5862)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 17:39:36 +00:00
Russell Bryant
45c15e8561 do not allow an rtp message with zero type (issue #5749)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 14:27:59 +00:00
Russell Bryant
5e3f4186da fix hint case sensitivity (issue #5856)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 07:22:42 +00:00
Russell Bryant
d03694df19 add description of the "fromdomain" option (issue #5874)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 05:26:26 +00:00
Josh Roberson
d52e8fa7d2 backport fix from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:52:18 +00:00
Kevin P. Fleming
77c6cd0bff remove remaining CVS references
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:37:37 +00:00
Kevin P. Fleming
463ebe8b4b port memory leak fix from rev 7223 in trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7224 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-30 03:20:42 +00:00
Kevin P. Fleming
a563eab49a remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming
bf9d4b103d do the multiple-lock check for cond_wait properly...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 14:26:22 +00:00
Russell Bryant
7dc2449f3a print an error message if invalid arguments are specified
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 06:12:29 +00:00
Russell Bryant
27cc20db11 fix a couple of typos and a buglet
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 05:11:05 +00:00
Kevin P. Fleming
4e04f5f731 if the lock protected a pthread_cond is held recursively, warn before waiting onthe condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 01:25:28 +00:00
Kevin P. Fleming
5ec3844077 remove CVS ignore lists, set SVN ignore lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 00:46:54 +00:00
Kevin P. Fleming
f641c7cd0d port version string computation from trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-28 04:01:06 +00:00
Kevin P. Fleming
49aa54cafc branch renames
remove unneeded branches


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-27 16:04:52 +00:00
Russell Bryant
e3b81e66a1 issue #5850
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-25 14:17:38 +00:00
Russell Bryant
7bb6b928b5 fix typo - thanks twisted :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 06:02:32 +00:00
Russell Bryant
ad4dc7c4a9 fix the date
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:59:05 +00:00
Russell Bryant
feb9764721 issue #5828
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:57:10 +00:00
Russell Bryant
8c74501001 issue #5826
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:49:35 +00:00
Russell Bryant
5861d3fd64 issue #5829
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-23 05:43:27 +00:00
Kevin P. Fleming
08acdc6a86 backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:34:09 +00:00
Kevin P. Fleming
3b50570c9b backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:31:26 +00:00
Kevin P. Fleming
00d7e962a7 backport fix from HEAD branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 19:29:51 +00:00
Russell Bryant
192f7413c2 revert previous change for Darwin
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 15:57:51 +00:00
Russell Bryant
5bdb8074aa issue #5789
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:40:34 +00:00
Russell Bryant
6abe5e1b23 don't hardcode poll.o for Darwin
fix incorrect portion of yesterday's Solaris fixes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:23:53 +00:00
Russell Bryant
4612b4ccca issue #5815
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 13:17:32 +00:00
Russell Bryant
3245bf61a1 issue #5775
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:44:06 +00:00
Russell Bryant
9ee13167bb issue #5787
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 02:03:23 +00:00
Russell Bryant
ca9633ca9b issue #5794
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 01:00:51 +00:00
Russell Bryant
e04884545c issue #5806
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-21 00:03:40 +00:00
Russell Bryant
aa2239a050 issue #5773
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:56:49 +00:00
Russell Bryant
40a1b60cbd issue #5774
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:51:58 +00:00
Russell Bryant
cccb11916f fix logic for n+101 jumps
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:42:43 +00:00
Russell Bryant
49641825eb issue #5795
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:36:45 +00:00
Russell Bryant
c14c078405 issue #5792
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:33:03 +00:00
Russell Bryant
f2af073588 issue #5799
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:27:28 +00:00
Russell Bryant
b9a5eddb6d fix issue number for previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:22:10 +00:00
Russell Bryant
bffc815375 issue #5791
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:21:40 +00:00
Russell Bryant
5c3f322364 Shorten the module description (issue #5791)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 23:18:01 +00:00
Russell Bryant
3a6fae817c fix the output of Makefile generated variables to doxygen
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-18 04:13:39 +00:00
Russell Bryant
d8f74ecb94 Add missing carriage return and line feed to the SDP line indicating that we don't support VAD (issue #5780)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 20:26:27 +00:00
Kevin P. Fleming
f7f2b1b033 fix remaining breakage related to chan_modem modules
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-17 04:26:07 +00:00
Admin Commit
601ab7ff82 This commit was manufactured by cvs2svn to create branch 'v1-2'.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-16 22:40:43 +00:00
1162 changed files with 27346 additions and 19026 deletions

2
.cleancount Executable file → Normal file
View File

@@ -1 +1 @@
8
9

View File

@@ -1,16 +0,0 @@
asterisk
defaults.h
ast_expr2.output
.version
.depend
.applied
mpg123-0.59r
mpg123-0.59r.tar.gz
update.out
.lastclean
.cleancount
.tags-depend
.tags-sources
tags
TAGS
testexpr2

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
9

1
.version Normal file
View File

@@ -0,0 +1 @@
1.2.30.3

2
BUGS Executable file → Normal file
View File

@@ -10,7 +10,7 @@ For more information on using the bug tracker, or to
learn how you can contribute by acting as a bug marshall
please see:
http://www.digium.com/index.php?menu=bugguidelines
http://www.asterisk.org/developers/bug-guidelines
If you would like to submit a feature request, please
resist the temptation to post it to the bug tracker.

0
CHANGES Executable file → Normal file
View File

0
COPYING Executable file → Normal file
View File

10
CREDITS Executable file → Normal file
View File

@@ -13,6 +13,8 @@ Telesthetic - for supporting SIP development
Christos Ricudis - for substantial code contributions
nic.at - ENUM support in Asterisk
Paul Bagyenda, Digital Solutions - for initial Voicetronix driver development
=== WISHLIST CONTRIBUTERS ===
@@ -31,6 +33,14 @@ Jim Dixon - Zapata Telephony and app_rpt
Russell Bryant - Asterisk 1.0 maintainer and misc. enhancements
russelb@clemson.edu
Anthony Minessale II - Countless big and small fixes, and relentless forward push
ChanSpy, ForkCDR, ControlPlayback, While/EndWhile, DumpChan, Dictate,
MacroIf, ExecIf, ExecIfTime, RetryDial, MixMonitor applications; res_odbc;
many realtime concepts and implementation pieces, including res_config_odbc;
format_slin; cdr_custom; several features in Dial including L(), G() and
enhancements to M() and D(); several CDR enhancements including CDR variables;
attended transfer; one touch record; native MOH; manager eventmask; command
line '-t' flag to allow recording/voicemail on nfs shares; #exec command and
multiline comments in config files; setvar in iax and sip configs.
anthmct@yahoo.com http://www.asterlink.com
James Golovich - Innumerable contributions
You can find him and asterisk-perl at http://asterisk.gnuinter.net

6390
ChangeLog Executable file → Normal file

File diff suppressed because it is too large Load Diff

0
HARDWARE Executable file → Normal file
View File

16
LICENSE Executable file → Normal file
View File

@@ -5,6 +5,18 @@ applies to all loadable Asterisk modules used on your system as well,
except as defined below. The GPL (version 2) is included in this
source tree in the file COPYING.
This package also includes various components that are not part of
Asterisk itself; these components are in the 'contrib' directory
and its subdirectories. Most of these components are also
distributed under the GPL version 2 as well, except for the following:
contrib/firmware/iax/iaxy.bin:
This file is Copyright (C) Digium, Inc. and is licensed for
use with Digium IAXy hardware devices only. It can be
distributed freely as long as the distribution is in the
original form present in this package (not reformatted or
modified).
Digium, Inc. (formerly Linux Support Services) holds copyright
and/or sufficient licenses to all components of the Asterisk
package, and therefore can grant, at its sole discretion, the ability
@@ -20,7 +32,7 @@ GPL'd products (although if you've written a module for Asterisk we
would strongly encourage you to make the same exception that we do).
Specific permission is also granted to link Asterisk with OpenSSL and
OpenH323.
OpenH323 and distribute the resulting binary files.
In addition, Asterisk implements two management/control protocols: the
Asterisk Manager Interface (AMI) and the Asterisk Gateway Interface
@@ -46,7 +58,7 @@ contact us:
+1.877.546.8963 (via telephone in the USA)
+1.256.428.6000 (via telephone outside the USA)
+1.256.864.0464 (via FAX inside or outside the USA)
IAX2/misery.digium.com/6000 (via IAX2)
IAX2/pbx.digium.com (via IAX2)
licensing@digium.com (via email)
Digium, Inc.

223
Makefile Executable file → Normal file
View File

@@ -28,6 +28,7 @@ HOST_CC=gcc
ifeq ($(CROSS_COMPILE),)
OSARCH=$(shell uname -s)
OSREV=$(shell uname -r)
OSCPU=$(shell uname -m)
else
OSARCH=$(CROSS_ARCH)
OSREV=$(CROSS_REV)
@@ -36,6 +37,8 @@ endif
# Remember the MAKELEVEL at the top
MAKETOPLEVEL?=$(MAKELEVEL)
PWD=$(shell pwd)
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
######### More GSM codec optimization
######### Uncomment to enable MMXTM optimizations for x86 architecture CPU's
@@ -81,6 +84,8 @@ TRACE_FRAMES = #-DTRACE_FRAMES
#
MALLOC_DEBUG = #-include $(PWD)/include/asterisk/astmm.h
INSTALL=install
# Where to install asterisk after compiling
# Default -> leave empty
INSTALL_PREFIX?=
@@ -179,7 +184,6 @@ ifeq ($(OSARCH),Linux)
# You must have GCC 3.4 to use k8, otherwise use athlon
PROC=k8
#PROC=athlon
OPTIONS+=-m64
endif
ifeq ($(PROC),sparc64)
@@ -200,21 +204,25 @@ ifeq ($(OSARCH),Linux)
OPTIONS+=-fsigned-char -mcpu=ep9312
else
ifeq ($(SUB_PROC),xscale)
OPTIONS+=-fsigned-char -msoft-float -mcpu=xscale
OPTIONS+=-fsigned-char -mcpu=xscale
else
OPTIONS+=-fsigned-char -msoft-float
OPTIONS+=-fsigned-char
endif
endif
endif
MPG123TARG=linux
endif
PWD=$(shell pwd)
GREP=grep
LN=ln
ID=id
ifeq ($(OSARCH),SunOS)
GREP=/usr/xpg4/bin/grep
M4=/usr/local/bin/m4
ID=/usr/xpg4/bin/id
LN=/usr/xpg4/bin/ln
INSTALL=ginstall
endif
INCLUDE+=-Iinclude -I../include
@@ -281,7 +289,10 @@ endif
ifeq ($(OSARCH),SunOS)
ASTCFLAGS+=-Wcast-align -DSOLARIS
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
INCLUDE+=-Iinclude/solaris-compat -I$(CROSS_COMPILE_TARGET)/opt/ssl/include -I$(CROSS_COMPILE_TARGET)/usr/local/ssl/include
ifeq ($(OSCPU),sun4u)
OPTIMIZE+=-mcpu=v9 -mcpu=ultrasparc
endif
endif
ifeq ($(findstring CYGWIN,$(OSARCH)),CYGWIN)
@@ -305,22 +316,24 @@ endif # WITHOUT_ZAPTEL
LIBEDIT=editline/libedit.a
ifneq ($(wildcard .version),)
ASTERISKVERSION=$(shell cat .version)
ASTERISKVERSIONNUM=$(shell awk -F. '{printf "%02d%02d%02d", $$1, $$2, $$3}' .version)
RPMVERSION=$(shell sed 's/[-\/:]/_/g' .version)
ASTERISKVERSION:=$(shell cat .version)
ASTERISKVERSIONNUM:=$(shell awk -F. '{printf "%01d%02d%02d", $$1, $$2, $$3}' .version)
RPMVERSION:=$(shell sed 's/[-\/:]/_/g' .version)
else
RPMVERSION=unknown
endif
ifneq ($(wildcard CVS),)
# CVS mirrors of SVN have .svnrevision files showing
# which SVN revision they are based on, and .svnbranch
# showing the branch they are made from
ifneq ($(wildcard .svnrevision),)
ASTERISKVERSIONNUM=999999
ifneq ($(wildcard CVS/Tag),)
ASTERISKVERSION=$(shell echo "CVS-`sed 's/^T//g' CVS/Tag`-`date +"%D-%T"`")
else
ASTERISKVERSION=CVS HEAD
endif
ASTERISKVERSION:=SVN-$(shell cat .svnbranch)-r$(shell cat .svnrevision)
else
ASTERISKVERSIONNUM=000000
ifneq ($(wildcard .svn),)
ASTERISKVERSIONNUM=999999
ASTERISKVERSION=SVN-$(shell build_tools/make_svn_branch_name)
endif
endif
ASTCFLAGS+= $(DEBUG_THREADS)
@@ -328,7 +341,9 @@ ASTCFLAGS+= $(TRACE_FRAMES)
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
ASTCFLAGS+= -fomit-frame-pointer
endif
SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
@@ -339,7 +354,7 @@ OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o
cryptostub.o astobj2.o
ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
OBJS+= poll.o
@@ -354,7 +369,11 @@ endif
ifeq ($(OSARCH),Linux)
LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
else
LIBS+=-lncurses -lm
ifeq ($(OSARCH),SunOS)
LIBS+=-lm -lcurses
else
LIBS+=-lncurses -lm
endif
endif
ifeq ($(OSARCH),Darwin)
@@ -363,7 +382,7 @@ ifeq ($(OSARCH),Darwin)
AUDIO_LIBS=-framework CoreAudio
ASTLINK=-Wl,-dynamic
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
OBJS+=poll.o
OBJS+= poll.o
ASTCFLAGS+=-DPOLLCOMPAT
else
#These are used for all but Darwin
@@ -384,10 +403,10 @@ ifeq ($(OSARCH),OpenBSD)
endif
ifeq ($(OSARCH),SunOS)
LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
LIBS+=-lpthread -ldl -lnsl -lsocket -lresolv -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
OBJS+=strcompat.o
ASTLINK=
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
SOLINK=-shared -fpic -L$(CROSS_COMPILE_TARGET)/opt/ssl/lib -L$(CROSS_COMPILE_TARGET)/usr/local/ssl/lib
endif
ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
@@ -403,8 +422,6 @@ endif
LIBS+=-lssl
INSTALL=install
_all: all
@echo " +--------- Asterisk Build Complete ---------+"
@echo " + Asterisk has successfully been built, but +"
@@ -427,10 +444,10 @@ endif
noclean: depend asterisk subdirs
editline/config.h:
cd editline && unset CFLAGS LIBS && ./configure ; \
cd editline && unset CFLAGS LIBS && CFLAGS="$(OPTIMIZE)" ./configure ; \
editline/libedit.a: FORCE
cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
cd editline && unset CFLAGS LIBS && test -f config.h || CFLAGS="$(OPTIMIZE)" ./configure
$(MAKE) -C editline libedit.a
db1-ast/libdb1.a: FORCE
@@ -534,8 +551,9 @@ clean:
$(MAKE) -C stdtime clean
datafiles: all
if test $$(id -u) = 0; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
if [ x`$(ID) -un` = xroot ]; then sh mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/silence
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
for x in sounds/digits/*.gsm; do \
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
@@ -545,6 +563,14 @@ datafiles: all
exit 1; \
fi; \
done
for x in sounds/silence/*.gsm; do \
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds/silence ; \
else \
echo "No description for $$x"; \
exit 1; \
fi; \
done
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/dictate
for x in sounds/dictate/*.gsm; do \
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
@@ -572,7 +598,7 @@ datafiles: all
exit 1; \
fi; \
done
for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-*; do \
for x in sounds/demo-* sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-* sounds/spy-* sounds/priv-* sounds/screen-* sounds/hello-* sounds/hours* sounds/minute* sounds/second* ; do \
if $(GREP) -q "^%`basename $$x`%" sounds.txt; then \
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
else \
@@ -588,17 +614,16 @@ datafiles: all
mkdir -p $(DESTDIR)$(AGI_DIR)
update:
@if [ -d CVS ]; then \
if [ -f patches/.applied ]; then \
patches=`cat patches/.applied`; \
fi; \
if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
echo "Unapplying $$x..."; \
patch -R -p0 < patches/$$x; \
done; \
rm -f patches/.applied; \
@if [ -d .svn ]; then \
echo "Updating from Subversion..." ; \
svn update | tee update.out; \
rm -f .version; \
if [ `grep -c ^C update.out` -gt 0 ]; then \
echo ; echo "The following files have conflicts:" ; \
grep ^C update.out | cut -b4- ; \
fi ; \
rm -f update.out; \
elif [ -d CVS ]; then \
echo "Updating from CVS..." ; \
cvs -q -z3 update -Pd | tee update.out; \
rm -f .version; \
@@ -607,19 +632,8 @@ update:
grep ^C update.out | cut -d' ' -f2- ; \
fi ; \
rm -f update.out; \
if [ ! -z "$$patches" ]; then \
for x in $$patches; do \
if [ -f patches/$$x ]; then \
echo "Applying patch $$x..."; \
patch -p0 < patches/$$x; \
echo $$x >> patches/.applied; \
else \
echo "Patch $$x no longer relevant"; \
fi; \
done; \
fi; \
else \
echo "Not CVS"; \
echo "Not under version control"; \
fi
NEWHEADERS=$(notdir $(wildcard include/asterisk/*.h))
@@ -636,23 +650,22 @@ bininstall: all
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/system
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
if [ -f asterisk ]; then $(INSTALL) -m 755 asterisk $(DESTDIR)$(ASTSBINDIR)/; fi
if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
ln -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
$(INSTALL) -m 755 contrib/scripts/astgenkey $(DESTDIR)$(ASTSBINDIR)/
$(INSTALL) -m 755 contrib/scripts/autosupport $(DESTDIR)$(ASTSBINDIR)/
if [ ! -f $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ]; then \
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
cat contrib/scripts/safe_asterisk | sed 's|__ASTERISK_SBIN_DIR__|$(ASTSBINDIR)|;s|__ASTERISK_VARRUN_DIR__|$(ASTVARRUNDIR)|;' > $(DESTDIR)$(ASTSBINDIR)/safe_asterisk ;\
chmod 755 $(DESTDIR)$(ASTSBINDIR)/safe_asterisk;\
fi
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
$(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)
$(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
if [ -n "$(OLDHEADERS)" ]; then \
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
fi
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
@@ -671,30 +684,10 @@ bininstall: all
else \
echo "You need to do cvs update -d not just cvs update" ; \
fi
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@echo " + +"
@echo " + Asterisk has successfully been installed. +"
@echo " + If you would like to install the sample +"
@echo " + configuration files (overwriting any +"
@echo " + existing config files), run: +"
@echo " + +"
@echo " + $(MAKE) samples +"
@echo " + +"
@echo " +----------------- or ---------------------+"
@echo " + +"
@echo " + You can go ahead and install the asterisk +"
@echo " + program documentation now or later run: +"
@echo " + +"
@echo " + $(MAKE) progdocs +"
@echo " + +"
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
@$(MAKE) -s oldmodcheck
install-subdirs:
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
NEWMODS=$(notdir $(wildcard */*.so))
OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
@@ -717,10 +710,32 @@ oldmodcheck:
echo " WARNING WARNING WARNING" ;\
fi
install: all datafiles bininstall
install: all datafiles bininstall install-subdirs
@if [ -x /usr/sbin/asterisk-post-install ]; then \
/usr/sbin/asterisk-post-install $(DESTDIR) . ; \
fi
@echo " +---- Asterisk Installation Complete -------+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@echo " + +"
@echo " + Asterisk has successfully been installed. +"
@echo " + If you would like to install the sample +"
@echo " + configuration files (overwriting any +"
@echo " + existing config files), run: +"
@echo " + +"
@echo " + $(MAKE) samples +"
@echo " + +"
@echo " +----------------- or ---------------------+"
@echo " + +"
@echo " + You can go ahead and install the asterisk +"
@echo " + program documentation now or later run: +"
@echo " + +"
@echo " + $(MAKE) progdocs +"
@echo " + +"
@echo " + **Note** This requires that you have +"
@echo " + doxygen installed on your local system +"
@echo " +-------------------------------------------+"
@$(MAKE) -s oldmodcheck
upgrade: all bininstall
@@ -780,7 +795,7 @@ samples: adsi
fi; \
done
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
for x in sounds/*.mp3; do \
for x in sounds/moh/*.mp3 sounds/moh/LICENSE; do \
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/mohmp3 ; \
done
rm -f $(DESTDIR)$(ASTVARLIBDIR)/mohmp3/sample-hold.mp3
@@ -831,12 +846,12 @@ __rpm: include/asterisk/version.h spec
$(MAKE) DESTDIR=/tmp/asterisk install ; \
$(MAKE) DESTDIR=/tmp/asterisk samples ; \
mkdir -p /tmp/asterisk/etc/rc.d/init.d ; \
cp -f redhat/asterisk /tmp/asterisk/etc/rc.d/init.d/ ; \
cp -f contrib/init.d/rc.redhat.asterisk /tmp/asterisk/etc/rc.d/init.d/asterisk ; \
rpmbuild --rcfile /usr/lib/rpm/rpmrc:redhat/rpmrc -bb asterisk.spec
progdocs:
(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT) \
PROJECT_NUMBER=$(ASTERISKVERSION) - $(ASTERISKVERSIONNUM)") | doxygen -
(cat contrib/asterisk-ng-doxygen; echo "HAVE_DOT=$(HAVEDOT)"; \
echo "PROJECT_NUMBER=$(ASTERISKVERSION)") | doxygen -
mpg123:
@wget -V >/dev/null || (echo "You need wget" ; false )
@@ -849,7 +864,9 @@ config:
$(INSTALL) -m 755 contrib/init.d/rc.redhat.asterisk /etc/rc.d/init.d/asterisk; \
/sbin/chkconfig --add asterisk; \
elif [ -d /etc/init.d ]; then \
$(INSTALL) -m 755 init.asterisk /etc/init.d/asterisk; \
echo "Only distros that use rc.d based init scripts are currently supported."; \
echo "You may be able to copy one of the scripts in contrib/init.d/ into your /etc/init.d/ directory."; \
exit 1; \
fi
dont-optimize: install
@@ -906,47 +923,3 @@ cleantest:
if cmp -s .cleancount .lastclean ; then echo ; else \
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
patchlist:
@echo "Experimental Patches:"
@for x in patches/*; do \
patch=`basename $$x`; \
if [ "$$patch" = "CVS" ]; then \
continue; \
fi; \
if grep -q ^$$patch$$ patches/.applied; then \
echo "$$patch (applied)"; \
else \
echo "$$patch (available)"; \
fi; \
done
apply:
@if [ -z "$(PATCH)" ]; then \
echo "Usage: make PATCH=<patchname> apply"; \
elif grep -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \
echo "Patch $(PATCH) is already applied"; \
elif [ -f "patches/$(PATCH)" ]; then \
echo "Applying patch $(PATCH)"; \
patch -p0 < patches/$(PATCH); \
echo "$(PATCH)" >> patches/.applied; \
else \
echo "No such patch $(PATCH) in patches directory"; \
fi
unapply:
@if [ -z "$(PATCH)" ]; then \
echo "Usage: make PATCH=<patchname> unapply"; \
elif grep -v -q ^$(PATCH)$$ patches/.applied 2>/dev/null; then \
echo "Patch $(PATCH) is not applied"; \
elif [ -f "patches/$(PATCH)" ]; then \
echo "Un-applying patch $(PATCH)"; \
patch -p0 -R < patches/$(PATCH); \
rm -f patches/.tmpapplied || :; \
mv patches/.applied patches/.tmpapplied; \
cat patches/.tmpapplied | grep -v ^$(PATCH)$$ > patches/.applied; \
rm -f patches/.tmpapplied; \
else \
echo "No such patch $(PATCH) in patches directory"; \
fi

2
README Executable file → Normal file
View File

@@ -67,7 +67,7 @@ made every effort possible to maintain backwards compatibility.
In order to discover new features to use, please check the configuration
examples in the /configs directory of the source code distribution.
To discover the major new features of Asterisk 1.2, please visit
http://www.astricon.net/asterisk1-2/
http://edvina.net/asterisk1-2/
* NEW INSTALLATIONS

0
README.fpm Executable file → Normal file
View File

6
SECURITY Executable file → Normal file
View File

@@ -65,3 +65,9 @@ exten => 6123,Dial(Zap/1)
DON'T FORGET TO TAKE THE DEMO CONTEXT OUT OF YOUR DEFAULT CONTEXT. There
isn't really a security reason, it just will keep people from wanting to
play with your Asterisk setup remotely.
* LOG SECURITY
Please note that the Asterisk log files, as well as information printed to the
Asterisk CLI, may contain sensitive information such as passwords and call
history. Keep this in mind when providing access to these resources.

23
UPGRADE.txt Executable file → Normal file
View File

@@ -52,8 +52,10 @@ Dialing:
IAX:
* The naming convention for IAX channels has changed in a minor way such
that the call number follows a "-" rather than a "/" character.
* The naming convention for IAX channels has changed in two ways:
1. The call number follows a "-" rather than a "/" character.
2. The name of the channel has been simplified to IAX2/peer-callno,
rather than IAX2/peer@peer-callno or even IAX2/peer@peer/callno.
SIP:
@@ -129,6 +131,11 @@ Applications:
'mailbox options' menu, and 'change your password' option has been
moved to option 5.
* The application VoiceMailMain now only matches the 'default' context if
none is specified in the arguments. (This was the previously
documented behavior, however, we didn't follow that behavior.) The old
behavior can be restored by setting searchcontexts=yes in voicemail.conf.
Queues:
* A queue is now considered empty not only if there are no members but if
@@ -196,3 +203,15 @@ GetVar Manager Action:
This has been changed to a manner similar to the SetVar action and is now
> Variable: name
> Value: value
iLBC Codec:
* Previously, the Asterisk source code distribution included the iLBC
encoder/decoder source code, from Global IP Solutions
(http://www.gipscorp.com). This code is not licensed for
distribution, and thus has been removed from the Asterisk source
code distribution. If you wish to use codec_ilbc to support iLBC
channels in Asterisk, you can run the contrib/scripts/get_ilbc_source.sh
script to download the source and put it in the proper place in
the Asterisk build tree. Once that is done you can follow your normal
steps of building Asterisk.

4
acl.c Executable file → Normal file
View File

@@ -176,12 +176,12 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
} else if (!inet_aton(nm, &ha->netmask)) {
ast_log(LOG_WARNING, "%s is not a valid netmask\n", nm);
free(ha);
return path;
return ret;
}
if (!inet_aton(tmp, &ha->netaddr)) {
ast_log(LOG_WARNING, "%s is not a valid IP\n", tmp);
free(ha);
return path;
return ret;
}
ha->netaddr.s_addr &= ha->netmask.s_addr;
if (!strncasecmp(sense, "p", 1)) {

0
aescrypt.c Executable file → Normal file
View File

0
aeskey.c Executable file → Normal file
View File

0
aesopt.h Executable file → Normal file
View File

0
aestab.c Executable file → Normal file
View File

View File

@@ -1,3 +0,0 @@
eagi-test
eagi-sphinx-test
.depend

0
agi/DialAnMp3.agi Executable file → Normal file
View File

2
agi/Makefile Executable file → Normal file
View File

@@ -13,7 +13,7 @@
AGIS=agi-test.agi eagi-test eagi-sphinx-test
CFLAGS+=
CFLAGS+=-DNO_AST_MM
LIBS=
ifeq ($(OSARCH),SunOS)

0
agi/agi-test.agi Executable file → Normal file
View File

0
agi/eagi-sphinx-test.c Executable file → Normal file
View File

0
agi/eagi-test.c Executable file → Normal file
View File

0
agi/fastagi-test Executable file → Normal file
View File

0
agi/numeralize Executable file → Normal file
View File

0
alaw.c Executable file → Normal file
View File

259
app.c Executable file → Normal file
View File

@@ -48,9 +48,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/indications.h"
#include "asterisk/linkedlists.h"
#define MAX_OTHER_FORMATS 10
static AST_LIST_HEAD_STATIC(groups, ast_group_info);
/* !
This function presents a dialtone and reads an extension into 'collect'
@@ -84,14 +86,11 @@ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect,
ast_playtones_stop(chan);
if (res < 1)
break;
collect[x++] = res;
if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num)) {
if (collect[x-1] == '#') {
/* Not a valid extension, ending in #, assume the # was to finish dialing */
collect[x-1] = '\0';
}
if (res == '#')
break;
collect[x++] = res;
if (!ast_matchmore_extension(chan, context, collect, 1, chan->cid.cid_num))
break;
}
}
if (res >= 0) {
if (ast_exists_extension(chan, context, collect, 1, chan->cid.cid_num))
@@ -316,8 +315,12 @@ int ast_dtmf_stream(struct ast_channel *chan,struct ast_channel *peer,char *digi
}
}
}
if (peer)
res = ast_autoservice_stop(peer);
if (peer) {
/* Stop autoservice on the peer channel, but don't overwrite any error condition
that has occurred previously while acting on the primary channel */
if (ast_autoservice_stop(peer) && !res)
res = -1;
}
}
return res;
}
@@ -430,11 +433,11 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
const char *stop, const char *pause,
const char *restart, int skipms)
{
long elapsed = 0, last_elapsed = 0;
char *breaks = NULL;
char *end = NULL;
int blen = 2;
int res;
long pause_restart_point = 0;
if (stop)
blen += strlen(stop);
@@ -456,9 +459,6 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (chan)
ast_stopstream(chan);
if (file) {
if ((end = strchr(file,':'))) {
if (!strcasecmp(end, ":end")) {
@@ -469,25 +469,18 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
}
for (;;) {
struct timeval started = ast_tvnow();
if (chan)
ast_stopstream(chan);
ast_stopstream(chan);
res = ast_streamfile(chan, file, chan->language);
if (!res) {
if (end) {
if (pause_restart_point) {
ast_seekstream(chan->stream, pause_restart_point, SEEK_SET);
pause_restart_point = 0;
}
else if (end) {
ast_seekstream(chan->stream, 0, SEEK_END);
end=NULL;
}
res = 1;
if (elapsed) {
ast_stream_fastforward(chan->stream, elapsed);
last_elapsed = elapsed - 200;
}
if (res)
res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
else
break;
end = NULL;
};
res = ast_waitstream_fr(chan, breaks, fwd, rev, skipms);
}
if (res < 1)
@@ -496,17 +489,16 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
/* We go at next loop if we got the restart char */
if (restart && strchr(restart, res)) {
ast_log(LOG_DEBUG, "we'll restart the stream here at next loop\n");
elapsed=0; /* To make sure the next stream will start at beginning */
pause_restart_point = 0;
continue;
}
if (pause != NULL && strchr(pause, res)) {
elapsed = ast_tvdiff_ms(ast_tvnow(), started) + last_elapsed;
for(;;) {
if (chan)
ast_stopstream(chan);
if (pause && strchr(pause, res)) {
pause_restart_point = ast_tellstream(chan->stream);
for (;;) {
ast_stopstream(chan);
res = ast_waitfordigit(chan, 1000);
if (res == 0)
if (!res)
continue;
else if (res == -1 || strchr(pause, res) || (stop && strchr(stop, res)))
break;
@@ -516,17 +508,16 @@ int ast_control_streamfile(struct ast_channel *chan, const char *file,
continue;
}
}
if (res == -1)
break;
/* if we get one of our stop chars, return it to the calling function */
if (stop && strchr(stop, res)) {
/* res = 0; */
if (stop && strchr(stop, res))
break;
}
}
if (chan)
ast_stopstream(chan);
ast_stopstream(chan);
return res;
}
@@ -545,7 +536,7 @@ int ast_play_and_wait(struct ast_channel *chan, const char *fn)
static int global_silence_threshold = 128;
static int global_maxsilence = 0;
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path)
int ast_play_and_record_full(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path, const char *acceptdtmf, const char *canceldtmf)
{
int d;
char *fmts;
@@ -559,7 +550,6 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
struct ast_dsp *sildet=NULL; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
struct ast_silence_generator *silgen = NULL;
@@ -597,7 +587,7 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
@@ -682,7 +672,7 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
res = 'S';
outmsg=2;
break;
}
@@ -697,19 +687,18 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
/* Write only once */
ast_writestream(others[0], f);
} else if (f->frametype == AST_FRAME_DTMF) {
if (f->subclass == '#') {
if (strchr(acceptdtmf, f->subclass)) {
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = '#';
ast_verbose(VERBOSE_PREFIX_3 "User ended message by pressing %c\n", f->subclass);
res = f->subclass;
outmsg = 2;
ast_frfree(f);
break;
}
if (f->subclass == '0') {
/* Check for a '0' during message recording also, in case caller wants operator */
if (strchr(canceldtmf, f->subclass)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User cancelled by pressing %c\n", f->subclass);
res = '0';
ast_verbose(VERBOSE_PREFIX_3 "User cancelled message by pressing %c\n", f->subclass);
res = f->subclass;
outmsg = 0;
ast_frfree(f);
break;
@@ -771,6 +760,14 @@ int ast_play_and_record(struct ast_channel *chan, const char *playfile, const ch
return res;
}
static char default_acceptdtmf[] = "#";
static char default_canceldtmf[] = "0";
int ast_play_and_record(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, int silencethreshold, int maxsilence, const char *path)
{
return ast_play_and_record_full(chan, playfile, recordfile, maxtime, fmt, duration, silencethreshold, maxsilence, path, default_acceptdtmf, default_canceldtmf);
}
int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int *duration, int beep, int silencethreshold, int maxsilence)
{
int d = 0;
@@ -786,7 +783,6 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
struct ast_dsp *sildet; /* silence detector dsp */
int totalsilence = 0;
int dspsilence = 0;
int gotsilence = 0; /* did we timeout for silence? */
int rfmt=0;
char prependfile[80];
@@ -827,7 +823,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
while((fmt = strsep(&stringp, "|"))) {
if (fmtcnt > MAX_OTHER_FORMATS - 1) {
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app_voicemail.c\n");
ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
break;
}
sfmt[fmtcnt++] = ast_strdupa(fmt);
@@ -855,6 +851,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
ast_dsp_free(sildet);
return -1;
}
}
@@ -904,7 +901,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording automatically stopped after a silence of %d seconds\n", totalsilence/1000);
ast_frfree(f);
gotsilence = 1;
res = 'S';
outmsg=2;
break;
}
@@ -959,6 +956,7 @@ int ast_play_and_prepend(struct ast_channel *chan, char *playfile, char *recordf
} else {
ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]);
}
ast_dsp_free(sildet);
*duration = end - start;
#if 0
if (outmsg > 1) {
@@ -1027,61 +1025,78 @@ int ast_app_group_split_group(char *data, char *group, int group_max, char *cate
else
res = -1;
if (cat)
snprintf(category, category_max, "%s_%s", GROUP_CATEGORY_PREFIX, cat);
else
ast_copy_string(category, GROUP_CATEGORY_PREFIX, category_max);
if (!ast_strlen_zero(cat))
ast_copy_string(category, cat, category_max);
return res;
}
int ast_app_group_set_channel(struct ast_channel *chan, char *data)
{
int res=0;
char group[80] = "";
char category[80] = "";
int res = 0;
char group[80] = "", category[80] = "";
struct ast_group_info *gi = NULL;
size_t len = 0;
if (!ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category))) {
pbx_builtin_setvar_helper(chan, category, group);
} else
if (ast_app_group_split_group(data, group, sizeof(group), category, sizeof(category)))
return -1;
/* Calculate memory we will need if this is new */
len = sizeof(*gi) + strlen(group) + 1;
if (!ast_strlen_zero(category))
len += strlen(category) + 1;
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) {
if ((gi->chan == chan) && ((ast_strlen_zero(category) && ast_strlen_zero(gi->category)) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category)))) {
AST_LIST_REMOVE_CURRENT(&groups, list);
free(gi);
break;
}
}
AST_LIST_TRAVERSE_SAFE_END
if ((gi = calloc(1, len))) {
gi->chan = chan;
gi->group = (char *) gi + sizeof(*gi);
strcpy(gi->group, group);
if (!ast_strlen_zero(category)) {
gi->category = (char *) gi + sizeof(*gi) + strlen(group) + 1;
strcpy(gi->category, category);
}
AST_LIST_INSERT_TAIL(&groups, gi, list);
} else {
res = -1;
}
AST_LIST_UNLOCK(&groups);
return res;
}
int ast_app_group_get_count(char *group, char *category)
{
struct ast_channel *chan;
struct ast_group_info *gi = NULL;
int count = 0;
char *test;
char cat[80];
char *s;
if (ast_strlen_zero(group))
return 0;
s = (!ast_strlen_zero(category)) ? category : GROUP_CATEGORY_PREFIX;
ast_copy_string(cat, s, sizeof(cat));
chan = NULL;
while ((chan = ast_channel_walk_locked(chan)) != NULL) {
test = pbx_builtin_getvar_helper(chan, cat);
if (test && !strcasecmp(test, group))
count++;
ast_mutex_unlock(&chan->lock);
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE(&groups, gi, list) {
if (!strcasecmp(gi->group, group) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
count++;
}
AST_LIST_UNLOCK(&groups);
return count;
}
int ast_app_group_match_get_count(char *groupmatch, char *category)
{
struct ast_group_info *gi = NULL;
regex_t regexbuf;
struct ast_channel *chan;
int count = 0;
char *test;
char cat[80];
char *s;
if (ast_strlen_zero(groupmatch))
return 0;
@@ -1090,22 +1105,64 @@ int ast_app_group_match_get_count(char *groupmatch, char *category)
if (regcomp(&regexbuf, groupmatch, REG_EXTENDED | REG_NOSUB))
return 0;
s = (!ast_strlen_zero(category)) ? category : GROUP_CATEGORY_PREFIX;
ast_copy_string(cat, s, sizeof(cat));
chan = NULL;
while ((chan = ast_channel_walk_locked(chan)) != NULL) {
test = pbx_builtin_getvar_helper(chan, cat);
if (test && !regexec(&regexbuf, test, 0, NULL, 0))
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE(&groups, gi, list) {
if (!regexec(&regexbuf, gi->group, 0, NULL, 0) && (ast_strlen_zero(category) || (!ast_strlen_zero(gi->category) && !strcasecmp(gi->category, category))))
count++;
ast_mutex_unlock(&chan->lock);
}
AST_LIST_UNLOCK(&groups);
regfree(&regexbuf);
return count;
}
int ast_app_group_update(struct ast_channel *old, struct ast_channel *new)
{
struct ast_group_info *gi = NULL;
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE(&groups, gi, list) {
if (gi->chan == old)
gi->chan = new;
}
AST_LIST_UNLOCK(&groups);
return 0;
}
int ast_app_group_discard(struct ast_channel *chan)
{
struct ast_group_info *gi = NULL;
AST_LIST_LOCK(&groups);
AST_LIST_TRAVERSE_SAFE_BEGIN(&groups, gi, list) {
if (gi->chan == chan) {
AST_LIST_REMOVE_CURRENT(&groups, list);
free(gi);
}
}
AST_LIST_TRAVERSE_SAFE_END
AST_LIST_UNLOCK(&groups);
return 0;
}
int ast_app_group_list_lock(void)
{
return AST_LIST_LOCK(&groups);
}
struct ast_group_info *ast_app_group_list_head(void)
{
return AST_LIST_FIRST(&groups);
}
int ast_app_group_list_unlock(void)
{
return AST_LIST_UNLOCK(&groups);
}
unsigned int ast_app_separate_args(char *buf, char delim, char **array, int arraylen)
{
int argc;
@@ -1159,7 +1216,7 @@ enum AST_LOCK_RESULT ast_lock_path(const char *path)
snprintf(fs, strlen(path) + 19, "%s/.lock-%08x", path, rand());
fd = open(fs, O_WRONLY | O_CREAT | O_EXCL, 0600);
if (fd < 0) {
fprintf(stderr, "Unable to create lock file '%s': %s\n", path, strerror(errno));
ast_log(LOG_ERROR, "Unable to create lock file '%s': %s\n", path, strerror(errno));
return AST_LOCK_PATH_NOT_FOUND;
}
close(fd);
@@ -1168,11 +1225,13 @@ enum AST_LOCK_RESULT ast_lock_path(const char *path)
time(&start);
while (((res = link(fs, s)) < 0) && (errno == EEXIST) && (time(NULL) - start < 5))
usleep(1);
unlink(fs);
if (res) {
ast_log(LOG_WARNING, "Failed to lock path '%s': %s\n", path, strerror(errno));
return AST_LOCK_TIMEOUT;
} else {
unlink(fs);
ast_log(LOG_DEBUG, "Locked path '%s'\n", path);
return AST_LOCK_SUCCESS;
}
@@ -1181,12 +1240,22 @@ enum AST_LOCK_RESULT ast_lock_path(const char *path)
int ast_unlock_path(const char *path)
{
char *s;
int res;
s = alloca(strlen(path) + 10);
if (!s)
if (!s) {
ast_log(LOG_WARNING, "Out of memory!\n");
return -1;
}
snprintf(s, strlen(path) + 9, "%s/%s", path, ".lock");
ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
return unlink(s);
if ((res = unlink(s)))
ast_log(LOG_ERROR, "Could not unlock path '%s': %s\n", path, strerror(errno));
else
ast_log(LOG_DEBUG, "Unlocked path '%s'\n", path);
return res;
}
int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path)

View File

@@ -1 +0,0 @@
.depend

7
apps/Makefile Executable file → Normal file
View File

@@ -86,7 +86,7 @@ endif
all: $(APPS)
clean:
rm -f *.so *.o look .depend
rm -f *.so *.o .depend
%.so : %.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB}
@@ -103,7 +103,7 @@ app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
app_sql_postgres.o: app_sql_postgres.c
$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
app_sql_postgres.so: app_sql_postgres.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
@@ -111,9 +111,6 @@ app_sql_postgres.so: app_sql_postgres.o
app_sql_odbc.so: app_sql_odbc.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
look: look.c
$(CC) -pipe -O6 -g look.c -o look -lncurses
ifeq (SunOS,$(shell uname))
app_chanspy.so: app_chanspy.o
$(CC) $(SOLINK) -o $@ $< -lrt

0
apps/app_adsiprog.c Executable file → Normal file
View File

7
apps/app_alarmreceiver.c Executable file → Normal file
View File

@@ -145,7 +145,7 @@ static void database_increment( char *key )
res = ast_db_put(db_family, key, value);
if((res)&&(option_verbose >= 4))
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: database_increment write error");
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: database_increment write error\n");
return;
}
@@ -215,6 +215,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
i += wf.datalen / 8;
if (i > duration) {
ast_frfree(f);
break;
}
if (ast_write(chan, &wf)){
@@ -222,6 +223,7 @@ static int send_tone_burst(struct ast_channel *chan, float freq, int duration, i
ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: Failed to write frame on %s\n", chan->name);
ast_log(LOG_WARNING, "AlarmReceiver Failed to write frame on %s\n",chan->name);
res = -1;
ast_frfree(f);
break;
}
}
@@ -558,11 +560,10 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
if(checksum){
database_increment("checksum-errors");
if(option_verbose >= 2){
if(option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Nonzero checksum\n");
ast_log(LOG_DEBUG, "AlarmReceiver: Nonzero checksum\n");
continue;
}
}
/* Check the message type for correctness */

2
apps/app_authenticate.c Executable file → Normal file
View File

@@ -186,7 +186,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_waitstream(chan, "");
} else {
if (jump && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
if (jump && ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101) == 0) {
res = 0;
} else {
if (!ast_streamfile(chan, "vm-goodbye", chan->language))

0
apps/app_cdr.c Executable file → Normal file
View File

0
apps/app_chanisavail.c Executable file → Normal file
View File

206
apps/app_chanspy.c Executable file → Normal file
View File

@@ -3,7 +3,8 @@
*
* Copyright (C) 2005 Anthony Minessale II (anthmct@yahoo.com)
*
* Disclaimed to Digium
* A license has been granted to Digium (via disclaimer) for the use of
* this code.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -52,7 +53,7 @@ AST_MUTEX_DEFINE_STATIC(modlock);
#define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
static const char *synopsis = "Listen to the audio of an active channel\n";
static const char *synopsis = "Listen to the audio of an active channel";
static const char *app = "ChanSpy";
static const char *desc =
" ChanSpy([chanprefix][|options]): This application is used to listen to the\n"
@@ -130,7 +131,7 @@ static struct ast_channel *local_get_channel_begin_name(char *name)
ast_mutex_lock(&modlock);
chan = local_channel_walk(NULL);
while (chan) {
if (!strncmp(chan->name, name, strlen(name))) {
if (!strncmp(chan->name, name, strlen(name)) && strncmp(chan->name, "Zap/pseudo", 10)) {
ret = chan;
break;
}
@@ -206,21 +207,6 @@ static int start_spying(struct ast_channel *chan, struct ast_channel *spychan, s
return res;
}
static void stop_spying(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
return;
if (!chan)
return;
ast_mutex_lock(&chan->lock);
ast_channel_spy_remove(chan, spy);
ast_mutex_unlock(&chan->lock);
};
/* Map 'volume' levels from -4 through +4 into
decibel (dB) settings for channel drivers
*/
@@ -251,102 +237,112 @@ static void set_volume(struct ast_channel *chan, struct chanspy_translation_help
static int channel_spy(struct ast_channel *chan, struct ast_channel *spyee, int *volfactor, int fd)
{
struct chanspy_translation_helper csth;
int running, res = 0, x = 0;
char inp[24];
char *name=NULL;
struct ast_frame *f;
int running = 0, res = 0, x = 0;
char inp[24] = "", *name = NULL;
struct ast_frame *f = NULL;
running = (chan && !ast_check_hangup(chan) && spyee && !ast_check_hangup(spyee));
if ((chan && ast_check_hangup(chan)) || (spyee && ast_check_hangup(spyee)))
return 0;
if (running) {
memset(inp, 0, sizeof(inp));
name = ast_strdupa(spyee->name);
if (option_verbose >= 2)
ast_verbose(VERBOSE_PREFIX_2 "Spying on channel %s\n", name);
name = ast_strdupa(spyee->name);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Spying on channel %s\n", name);
memset(&csth, 0, sizeof(csth));
ast_set_flag(&csth.spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&csth.spy, CHANSPY_TRIGGER_NONE);
ast_set_flag(&csth.spy, CHANSPY_MIXAUDIO);
csth.spy.type = chanspy_spy_type;
csth.spy.status = CHANSPY_RUNNING;
csth.spy.read_queue.format = AST_FORMAT_SLINEAR;
csth.spy.write_queue.format = AST_FORMAT_SLINEAR;
ast_mutex_init(&csth.spy.lock);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
memset(&csth, 0, sizeof(csth));
ast_set_flag(&csth.spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&csth.spy, CHANSPY_TRIGGER_NONE);
ast_set_flag(&csth.spy, CHANSPY_MIXAUDIO);
csth.spy.type = chanspy_spy_type;
csth.spy.status = CHANSPY_RUNNING;
csth.spy.read_queue.format = AST_FORMAT_SLINEAR;
csth.spy.write_queue.format = AST_FORMAT_SLINEAR;
ast_mutex_init(&csth.spy.lock);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
if (csth.volfactor) {
ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
csth.spy.read_vol_adjustment = csth.volfactor;
ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
csth.spy.write_vol_adjustment = csth.volfactor;
csth.fd = fd;
}
csth.fd = fd;
if (start_spying(spyee, chan, &csth.spy))
running = 0;
if (start_spying(spyee, chan, &csth.spy)) {
ast_channel_spy_free(&csth.spy);
return 0;
}
if (running) {
running = 1;
ast_activate_generator(chan, &spygen, &csth);
ast_activate_generator(chan, &spygen, &csth);
while (csth.spy.status == CHANSPY_RUNNING &&
chan && !ast_check_hangup(chan) &&
spyee &&
!ast_check_hangup(spyee) &&
running == 1 &&
(res = ast_waitfor(chan, -1) > -1)) {
if ((f = ast_read(chan))) {
res = 0;
if (f->frametype == AST_FRAME_DTMF) {
res = f->subclass;
}
ast_frfree(f);
if (!res) {
continue;
}
} else {
while (csth.spy.status == CHANSPY_RUNNING &&
(res = ast_waitfor(chan, -1) > -1)) {
/* Read in frame from channel, break out if no frame */
if (!(f = ast_read(chan)))
break;
/* Now if this is DTMF then we have to handle it as such, otherwise just skip it */
res = 0;
if (f->frametype == AST_FRAME_DTMF)
res = f->subclass;
ast_frfree(f);
if (!res)
continue;
if (x == sizeof(inp))
x = 0;
if (res < 0) {
running = -1;
break;
}
/* Process DTMF digits */
if (res == '#') {
if (!ast_strlen_zero(inp)) {
running = x ? atoi(inp) : -1;
break;
}
if (x == sizeof(inp)) {
x = 0;
}
if (res < 0) {
running = -1;
}
if (res == 0) {
continue;
} else if (res == '*') {
running = 0;
} else if (res == '#') {
if (!ast_strlen_zero(inp)) {
running = x ? atoi(inp) : -1;
break;
} else {
(*volfactor)++;
if (*volfactor > 4) {
*volfactor = -4;
}
if (option_verbose > 2) {
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
}
csth.volfactor = *volfactor;
set_volume(chan, &csth);
} else {
(*volfactor)++;
if (*volfactor > 4)
*volfactor = -1;
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting spy volume on %s to %d\n", chan->name, *volfactor);
csth.volfactor = *volfactor;
set_volume(chan, &csth);
if (csth.volfactor) {
ast_set_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
csth.spy.read_vol_adjustment = csth.volfactor;
ast_set_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
csth.spy.write_vol_adjustment = csth.volfactor;
} else {
ast_clear_flag(&csth.spy, CHANSPY_READ_VOLADJUST);
ast_clear_flag(&csth.spy, CHANSPY_WRITE_VOLADJUST);
}
} else if (res >= 48 && res <= 57) {
inp[x++] = res;
}
} else if (res == '*') {
break;
} else if (res >= 48 && res <= 57) {
inp[x++] = res;
}
ast_deactivate_generator(chan);
stop_spying(spyee, &csth.spy);
if (option_verbose >= 2) {
ast_verbose(VERBOSE_PREFIX_2 "Done Spying on channel %s\n", name);
}
} else {
running = 0;
}
ast_mutex_destroy(&csth.spy.lock);
ast_deactivate_generator(chan);
csth.spy.status = CHANSPY_DONE;
ast_mutex_lock(&csth.spy.lock);
if (csth.spy.chan) {
ast_mutex_lock(&csth.spy.chan->lock);
ast_channel_spy_remove(csth.spy.chan, &csth.spy);
ast_mutex_unlock(&csth.spy.chan->lock);
}
ast_mutex_unlock(&csth.spy.lock);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Done Spying on channel %s\n", name);
ast_channel_spy_free(&csth.spy);
return running;
}
@@ -418,29 +414,31 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
char *opts[OPT_ARG_ARRAY_SIZE];
ast_app_parse_options(chanspy_opts, &flags, opts, options);
if (ast_test_flag(&flags, OPTION_GROUP)) {
mygroup = opts[1];
mygroup = opts[OPT_ARG_GROUP];
}
if (ast_test_flag(&flags, OPTION_RECORD)) {
if (!(recbase = opts[2])) {
if (!(recbase = opts[OPT_ARG_RECORD])) {
recbase = "chanspy";
}
}
silent = ast_test_flag(&flags, OPTION_QUIET);
bronly = ast_test_flag(&flags, OPTION_BRIDGED);
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[1]) {
if (ast_test_flag(&flags, OPTION_VOLUME) && opts[OPT_ARG_VOLUME]) {
int vol;
if ((sscanf(opts[0], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &vol) != 1) || (vol > 4) || (vol < -4))
ast_log(LOG_NOTICE, "Volume factor must be a number between -4 and 4\n");
else
volfactor = vol;
}
}
else
ast_clear_flag(&flags, AST_FLAGS_ALL);
if (recbase) {
char filename[512];
snprintf(filename,sizeof(filename),"%s/%s.%ld.raw",ast_config_AST_MONITOR_DIR, recbase, time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC)) <= 0) {
snprintf(filename,sizeof(filename),"%s/%s.%d.raw",ast_config_AST_MONITOR_DIR, recbase, (int)time(NULL));
if ((fd = open(filename, O_CREAT | O_WRONLY, O_TRUNC, 0644)) <= 0) {
ast_log(LOG_WARNING, "Cannot open %s for recording\n", filename);
fd = 0;
}
@@ -482,7 +480,7 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
}
}
if (igrp && (!spec || ((strlen(spec) < strlen(peer->name) &&
if (igrp && (!spec || ((strlen(spec) <= strlen(peer->name) &&
!strncasecmp(peer->name, spec, strlen(spec)))))) {
if (peer && (!bronly || ast_bridged_channel(peer)) &&
!ast_check_hangup(peer) && !ast_test_flag(peer, AST_FLAG_SPYING)) {

2
apps/app_controlplayback.c Executable file → Normal file
View File

@@ -140,7 +140,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
} else {
if (res < 0) {
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
ast_log(LOG_WARNING, "ControlPlayback tried to jump to priority n+101 as requested, but priority didn't exist\n");
}
}

3
apps/app_curl.c Executable file → Normal file
View File

@@ -94,7 +94,6 @@ static int curl_internal(struct MemoryStruct *chunk, char *url, char *post)
{
CURL *curl;
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if (!curl) {
@@ -224,6 +223,7 @@ int unload_module(void)
res |= ast_unregister_application(app);
STANDARD_HANGUP_LOCALUSERS;
curl_global_cleanup();
return res;
}
@@ -232,6 +232,7 @@ int load_module(void)
{
int res;
curl_global_init(CURL_GLOBAL_ALL);
res = ast_custom_function_register(&acf_curl);
res |= ast_register_application(app, curl_exec, synopsis, descrip);

12
apps/app_cut.c Executable file → Normal file
View File

@@ -36,7 +36,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/version.h"
#include "asterisk/app.h"
/* Maximum length of any variable */
@@ -49,7 +48,7 @@ static char *app_cut = "Cut";
static char *cut_synopsis = "Splits a variable's contents using the specified delimiter";
static char *cut_descrip =
" Cut(newvar=varname,delimiter,fieldspec): This applicaiton will split the\n"
" Cut(newvar=varname,delimiter,fieldspec): This application will split the\n"
"contents of a variable based on the given delimeter and store the result in\n"
"a new variable.\n"
"Parameters:\n"
@@ -67,7 +66,7 @@ static char *app_sort_descrip =
" Sort(newvar=key1:val1[,key2:val2[[...],keyN:valN]]): This application will\n"
"sort the list provided in ascending order. The result will be stored in the\n"
"specified variable name.\n"
" This applicaiton has been deprecated in favor of the SORT function.\n";
" This application has been deprecated in favor of the SORT function.\n";
STANDARD_LOCAL_USER;
@@ -146,8 +145,9 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
int blen = strlen(buffer);
if (element_count++) {
strncat(buffer + blen, ",", buflen - blen - 1);
blen++;
}
strncat(buffer + blen + 1, sortable_keys[count2].key, buflen - blen - 2);
strncat(buffer + blen, sortable_keys[count2].key, buflen - blen - 1);
}
return 0;
@@ -253,6 +253,8 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
}
}
}
} else {
return ERROR_NOARG;
}
return 0;
}
@@ -386,7 +388,7 @@ static char *acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Cut() requires an argument\n");
ast_log(LOG_ERROR, "CUT() requires an argument\n");
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");

0
apps/app_datetime.c Executable file → Normal file
View File

2
apps/app_db.c Executable file → Normal file
View File

@@ -63,7 +63,7 @@ static char *p_descrip =
" This application has been deprecated in favor of the DB function.\n";
static char *d_descrip =
" DBdel(family/key): This applicaiton will delete a key from the Asterisk\n"
" DBdel(family/key): This application will delete a key from the Asterisk\n"
"database.\n";
static char *dt_descrip =

179
apps/app_dial.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 1999 - 2005, Digium, Inc.
* Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster@digium.com>
*
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include "asterisk.h"
@@ -64,7 +65,7 @@ static char *synopsis = "Place a call and connect to the current channel";
static char *descrip =
" Dial(Technology/resource[&Tech2/resource2...][|timeout][|options][|URL]):\n"
"This applicaiton will place calls to one or more specified channels. As soon\n"
"This application will place calls to one or more specified channels. As soon\n"
"as one of the requested channels answers, the originating channel will be\n"
"answered, if it has not already been answered. These two channels will then\n"
"be active in a bridged call. All other channels that were requested will then\n"
@@ -75,11 +76,11 @@ static char *descrip =
"continue if no requested channels can be called, or if the timeout expires.\n\n"
" This application sets the following channel variables upon completion:\n"
" DIALEDTIME - This is the time from dialing a channel until when it\n"
" answers.\n"
" is disconnected.\n"
" ANSWEREDTIME - This is the amount of time for actual call.\n"
" DIALSTATUS - This is the status of the call:\n"
" CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL\n"
" DONTCALL | TORTURE\n"
" DONTCALL | TORTURE | INVALIDARGS\n"
" For the Privacy and Screening Modes, the DIALSTATUS variable will be set to\n"
"DONTCALL if the called party chooses to send the calling party to the 'Go Away'\n"
"script. The DIALSTATUS variable will be set to TORTURE if the called party\n"
@@ -89,7 +90,10 @@ static char *descrip =
"ends the call.\n"
" The optional URL will be sent to the called party if the channel supports it.\n"
" If the OUTBOUND_GROUP variable is set, all peer channels created by this\n"
"application will be put into that group (as in Set(GROUP()=...).\n\n"
"application will be put into that group (as in Set(GROUP()=...).\n"
" If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this\n"
"application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,\n"
"however, the variable will be unset after use.\n\n"
" Options:\n"
" A(x) - Play an announcement to the called party, using 'x' as the file.\n"
" C - Reset the CDR for this call.\n"
@@ -108,9 +112,11 @@ static char *descrip =
" other than the number assigned to the caller.\n"
" g - Proceed with dialplan execution at the current extension if the\n"
" destination channel hangs up.\n"
" G(context^exten^pri) - If the call is answered, transfer both parties to\n"
" the specified priority. Optionally, an extension, or extension and\n"
" context may be specified. Otherwise, the current extension is used.\n"
" G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
" the specified priority and the called party to the specified priority+1.\n"
" Optionally, an extension, or extension and context may be specified. \n"
" Otherwise, the current extension is used. You cannot use any additional\n"
" action post answer options in conjunction with this option.\n"
" h - Allow the called party to hang up by sending the '*' DTMF digit.\n"
" H - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
" j - Jump to priority n+101 if all of the requested channels were busy.\n"
@@ -143,6 +149,8 @@ static char *descrip =
" * GOTO:<context>^<exten>^<priority> - Transfer the call to the\n"
" specified priority. Optionally, an extension, or\n"
" extension and priority can be specified.\n"
" You cannot use any additional action post answer options in conjunction\n"
" with this option.\n"
" n - This option is a modifier for the screen/privacy mode. It specifies\n"
" that no introductions are to be saved in the priv-callerintros\n"
" directory.\n"
@@ -161,7 +169,7 @@ static char *descrip =
" S(x) - Hang up the call after 'x' seconds *after* the called party has\n"
" answered the call.\n"
" t - Allow the called party to transfer the calling party by sending the\n"
" DTMF sequence defiend in features.conf.\n"
" DTMF sequence defined in features.conf.\n"
" T - Allow the calling party to transfer the called party by sending the\n"
" DTMF sequence defined in features.conf.\n"
" w - Allow the called party to enable recording of the call by sending\n"
@@ -303,6 +311,8 @@ static void hanguptree(struct localuser *outgoing, struct ast_channel *exception
ast_cdr_failed(chan->cdr); \
numnochan++; \
break; \
case AST_CAUSE_NORMAL_CLEARING: \
break; \
default: \
numnochan++; \
break; \
@@ -463,7 +473,11 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
/* Setup parameters */
o->chan = ast_request(tech, in->nativeformats, stuff, &cause);
if (!o->chan)
if (o->chan) {
if (single)
ast_channel_make_compatible(o->chan, in);
ast_channel_inherit_variables(in, o->chan);
} else
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
} else {
if (option_verbose > 2)
@@ -512,10 +526,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (in->cid.cid_ani) {
if (o->chan->cid.cid_ani)
free(o->chan->cid.cid_ani);
o->chan->cid.cid_ani = malloc(strlen(in->cid.cid_ani) + 1);
if (o->chan->cid.cid_ani)
ast_copy_string(o->chan->cid.cid_ani, in->cid.cid_ani, sizeof(o->chan->cid.cid_ani));
else
o->chan->cid.cid_ani = strdup(in->cid.cid_ani);
if (!o->chan->cid.cid_ani)
ast_log(LOG_WARNING, "Out of memory\n");
}
if (o->chan->cid.cid_rdnis)
@@ -650,6 +662,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
ast_hangup(o->chan);
o->chan = NULL;
ast_clear_flag(o, DIAL_STILLGOING);
HANDLE_CAUSE(in->hangupcause, in);
}
}
o = o->next;
@@ -665,6 +678,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
/* Got hung up */
*to=-1;
ast_cdr_noanswer(in->cdr);
strcpy(status, "CANCEL");
if (f)
ast_frfree(f);
@@ -678,6 +692,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
ast_cdr_noanswer(in->cdr);
*result = f->subclass;
strcpy(status, "CANCEL");
ast_frfree(f);
@@ -690,6 +705,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
ast_cdr_noanswer(in->cdr);
strcpy(status, "CANCEL");
ast_frfree(f);
return NULL;
@@ -714,13 +730,17 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
}
if (!*to && (option_verbose > 2))
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
if (!*to || ast_check_hangup(in)) {
ast_cdr_noanswer(in->cdr);
}
}
return peer;
}
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags)
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags, int *continue_exec)
{
int res=-1;
struct localuser *u;
@@ -737,6 +757,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
char numsubst[AST_MAX_EXTENSION];
char restofit[AST_MAX_EXTENSION];
char cidname[AST_MAX_EXTENSION];
char toast[80];
char *newnum;
char *l;
int privdb_val=0;
@@ -750,7 +771,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
char *start_sound=NULL;
char *dtmfcalled=NULL, *dtmfcalling=NULL;
char *var;
char status[256];
char status[256] = "INVALIDARGS";
int play_to_caller=0,play_to_callee=0;
int sentringing=0, moh=0;
char *outbound_group = NULL;
@@ -771,21 +792,19 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
return -1;
}
LOCAL_USER_ADD(u);
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory allocation failure\n");
LOCAL_USER_REMOVE(u);
return -1;
}
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
if (!ast_strlen_zero(args.options)) {
if (ast_app_parse_options(dial_exec_options, &opts, opt_args, args.options)) {
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -793,6 +812,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (ast_strlen_zero(args.peers)) {
ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n");
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -826,6 +846,21 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (!timelimit) {
timelimit = play_to_caller = play_to_callee = play_warning = warning_freq = 0;
warning_sound = NULL;
} else if (play_warning > timelimit) {
/* If the first warning is requested _after_ the entire call would end,
and no warning frequency is requested, then turn off the warning. If
a warning frequency is requested, reduce the 'first warning' time by
that frequency until it falls within the call's total time limit.
*/
if (!warning_freq) {
play_warning = 0;
} else {
while (play_warning > timelimit)
play_warning -= warning_freq;
if (play_warning < 1)
play_warning = warning_freq = 0;
}
}
var = pbx_builtin_getvar_helper(chan,"LIMIT_PLAYAUDIO_CALLER");
@@ -916,27 +951,39 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if( privdb_val == AST_PRIVACY_DENY ) {
strcpy(status, "NOANSWER");
ast_verbose( VERBOSE_PREFIX_3 "Privacy DB reports PRIVACY_DENY for this callerid. Dial reports unavailable\n");
res=0;
goto out;
}
else if( privdb_val == AST_PRIVACY_KILL ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
strcpy(status, "DONTCALL");
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 201);
}
res = 0;
goto out; /* Is this right? */
}
else if( privdb_val == AST_PRIVACY_TORTURE ) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
strcpy(status, "TORTURE");
if (option_priority_jumping || ast_test_flag(&opts, OPT_PRIORITY_JUMP)) {
ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 301);
}
res = 0;
goto out; /* is this right??? */
}
else if( privdb_val == AST_PRIVACY_UNKNOWN ) {
/* Get the user's intro, store it in priv-callerintros/$CID,
unless it is already there-- this should be done before the
call is actually dialed */
/* make sure the priv-callerintros dir exists? */
/* make sure the priv-callerintros dir actually exists */
snprintf(privintro, sizeof(privintro), "%s/sounds/priv-callerintros", ast_config_AST_VAR_DIR);
if (mkdir(privintro, 0755) && errno != EEXIST) {
ast_log(LOG_WARNING, "privacy: can't create directory priv-callerintros: %s\n", strerror(errno));
res = -1;
goto out;
}
snprintf(privintro,sizeof(privintro),"priv-callerintros/%s", privcid);
if( ast_fileexists(privintro,NULL,NULL ) > 0 && strncmp(privcid,"NOCALLERID",10) != 0) {
@@ -953,17 +1000,35 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
"At the tone, please say your name:"
*/
ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to 4 sec */
/* don't think we'll need a lock removed, we took care of
conflicts by naming the privintro file */
ast_answer(chan);
res = ast_play_and_record(chan, "priv-recordintro", privintro, 4, "gsm", &duration, 128, 2000, 0); /* NOTE: I've reduced the total time to */
/* 4 sec don't think we'll need a lock removed, we
took care of conflicts by naming the privintro file */
if (res == -1) {
/* Delete the file regardless since they hung up during recording */
ast_filedelete(privintro, NULL);
if( ast_fileexists(privintro,NULL,NULL ) > 0 )
ast_log(LOG_NOTICE,"privacy: ast_filedelete didn't do its job on %s\n", privintro);
else if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Successfully deleted %s intro file\n", privintro);
goto out;
}
}
}
}
if (continue_exec)
*continue_exec = 0;
/* If a channel group has been specified, get it for use when we create peer channels */
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID);
if ((outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP_ONCE"))) {
outbound_group = ast_strdupa(outbound_group);
pbx_builtin_setvar_helper(chan, "OUTBOUND_GROUP_ONCE", NULL);
} else {
outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP");
}
ast_copy_flags(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP);
cur = args.peers;
do {
/* Remember where to start next time */
@@ -1013,6 +1078,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
cur = rest;
if (!cur)
chan->hangupcause = cause;
free(tmp);
continue;
}
pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", numsubst);
@@ -1039,6 +1105,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
tmp->chan = ast_request(tech, chan->nativeformats, stuff, &cause);
if (!tmp->chan)
ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
else
ast_channel_inherit_variables(chan, tmp->chan);
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Too many forwards from %s\n", tmp->chan->name);
@@ -1049,6 +1117,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (!tmp->chan) {
HANDLE_CAUSE(cause, chan);
cur = rest;
free(tmp);
continue;
}
}
@@ -1111,11 +1180,12 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
/* Again, keep going even if there's an error */
if (option_debug)
ast_log(LOG_DEBUG, "ast call on peer returned %d\n", res);
else if (option_verbose > 2)
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Couldn't call %s\n", numsubst);
ast_hangup(tmp->chan);
tmp->chan = NULL;
cur = rest;
free(tmp);
continue;
} else {
senddialevent(chan, tmp->chan);
@@ -1150,6 +1220,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
strcpy(status, "NOANSWER");
if (ast_test_flag(outgoing, OPT_MUSICBACK)) {
moh=1;
ast_indicate(chan, AST_CONTROL_PROGRESS);
ast_moh_start(chan, opt_args[OPT_ARG_MUSICBACK]);
} else if (ast_test_flag(outgoing, OPT_RINGBACK)) {
ast_indicate(chan, AST_CONTROL_RINGING);
@@ -1227,18 +1298,18 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
do {
if (!res2)
res2 = ast_play_and_wait(peer,"priv-callpending");
if( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
if ( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
res2 = 0;
/* priv-callpending script:
"I have a caller waiting, who introduces themselves as:"
*/
if (!res2)
res2 = ast_play_and_wait(peer,privintro);
if( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
res2 = ast_play_and_wait(peer, privintro);
if ( res2 < '1' || (ast_test_flag(&opts, OPT_PRIVACY) && res2>'5') || (ast_test_flag(&opts, OPT_SCREENING) && res2 > '4') ) /* uh, interrupting with a bad answer is ... ignorable! */
res2 = 0;
/* now get input from the called party, as to their choice */
if( !res2 ) {
if (!res2) {
if( ast_test_flag(&opts, OPT_PRIVACY) )
res2 = ast_play_and_wait(peer,"priv-callee-options");
if( ast_test_flag(&opts, OPT_SCREENING) )
@@ -1285,6 +1356,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
opt_args[OPT_ARG_PRIVACY], privcid);
ast_privacy_set(opt_args[OPT_ARG_PRIVACY], privcid, AST_PRIVACY_DENY);
}
strcpy(status,"NOANSWER");
if (ast_test_flag(&opts, OPT_MUSICBACK)) {
ast_moh_stop(chan);
} else if (ast_test_flag(&opts, OPT_RINGBACK)) {
@@ -1418,6 +1490,8 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
ast_pbx_start(peer);
hanguptree(outgoing, NULL);
LOCAL_USER_REMOVE(u);
if (continue_exec)
*continue_exec = 1;
return 0;
}
@@ -1500,7 +1574,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
time_t now;
time(&now);
chan->whentohangup = now + calldurationlimit;
peer->whentohangup = now + calldurationlimit;
}
if (!ast_strlen_zero(dtmfcalled)) {
if (option_verbose > 2)
@@ -1515,8 +1589,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
if (!res) {
char toast[80];
memset(&config,0,sizeof(struct ast_bridge_config));
if (play_to_caller)
ast_set_flag(&(config.features_caller), AST_FEATURE_PLAY_WARNING);
@@ -1560,13 +1632,15 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
res = ast_bridge_call(chan,peer,&config);
time(&end_time);
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - answer_time));
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", toast);
} else
} else {
time(&end_time);
res = -1;
}
snprintf(toast, sizeof(toast), "%ld", (long)(end_time - start_time));
pbx_builtin_setvar_helper(chan, "DIALEDTIME", toast);
if (res != AST_PBX_NO_HANGUP_PEER) {
if (!chan->_softhangup)
@@ -1586,8 +1660,11 @@ out:
pbx_builtin_setvar_helper(chan, "DIALSTATUS", status);
ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE))
if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) {
if (calldurationlimit)
chan->whentohangup = 0;
res=0;
}
LOCAL_USER_REMOVE(u);
@@ -1597,8 +1674,10 @@ out:
static int dial_exec(struct ast_channel *chan, void *data)
{
struct ast_flags peerflags;
memset(&peerflags, 0, sizeof(peerflags));
return dial_exec_full(chan, data, &peerflags);
return dial_exec_full(chan, data, &peerflags, NULL);
}
static int retrydial_exec(struct ast_channel *chan, void *data)
@@ -1627,7 +1706,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
if ((dialdata = strchr(announce, '|'))) {
*dialdata = '\0';
dialdata++;
if ((sleep = atoi(dialdata))) {
if (sscanf(dialdata, "%d", &sleep) == 1) {
sleep *= 1000;
} else {
ast_log(LOG_ERROR, "%s requires the numerical argument <sleep>\n",rapp);
@@ -1637,7 +1716,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
if ((dialdata = strchr(dialdata, '|'))) {
*dialdata = '\0';
dialdata++;
if (!(loops = atoi(dialdata))) {
if (sscanf(dialdata, "%d", &loops) != 1) {
ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
LOCAL_USER_REMOVE(u);
return -1;
@@ -1663,11 +1742,16 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
context = pbx_builtin_getvar_helper(chan, "EXITCONTEXT");
while (loops) {
int continue_exec;
chan->data = "Retrying";
if (ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_stop(chan);
if ((res = dial_exec_full(chan, dialdata, &peerflags)) == 0) {
res = dial_exec_full(chan, dialdata, &peerflags, &continue_exec);
if (continue_exec)
break;
if (res == 0) {
if (ast_test_flag(&peerflags, OPT_DTMF_EXIT)) {
if (!(res = ast_streamfile(chan, announce, chan->language)))
res = ast_waitstream(chan, AST_DIGIT_ANY);
@@ -1704,7 +1788,6 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
LOCAL_USER_REMOVE(u);
return loops ? res : 0;
}
int unload_module(void)

5
apps/app_dictate.c Executable file → Normal file
View File

@@ -257,7 +257,8 @@ static int dictate_exec(struct ast_channel *chan, void *data)
if (lastop != DFLAG_PLAY) {
lastop = DFLAG_PLAY;
ast_closestream(fs);
fs = ast_openstream(chan, path, chan->language);
if (!(fs = ast_openstream(chan, path, chan->language)))
break;
ast_seekstream(fs, samples, SEEK_SET);
chan->stream = NULL;
}
@@ -320,7 +321,7 @@ static int dictate_exec(struct ast_channel *chan, void *data)
ast_set_read_format(chan, oldr);
}
LOCAL_USER_REMOVE(u);
return res;
return 0;
}
int unload_module(void)

6
apps/app_directed_pickup.c Executable file → Normal file
View File

@@ -3,7 +3,7 @@
*
* Copyright (C) 2005, Joshua Colp
*
* Joshua Colp <jcolp@asterlink.com>
* Joshua Colp <jcolp@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -77,7 +77,7 @@ static int pickup_exec(struct ast_channel *chan, void *data)
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
if (origin) {
if (origin && origin->cdr) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0);
if (tmp) {
@@ -89,6 +89,8 @@ static int pickup_exec(struct ast_channel *chan, void *data)
}
ast_mutex_unlock(&origin->lock);
} else {
if (origin)
ast_mutex_unlock(&origin->lock);
ast_log(LOG_DEBUG, "No originating channel found.\n");
}

170
apps/app_directory.c Executable file → Normal file
View File

@@ -42,6 +42,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/say.h"
#include "asterisk/utils.h"
#ifdef USE_ODBC_STORAGE
#include <errno.h>
#include <sys/mman.h>
#include "asterisk/res_odbc.h"
static char odbc_database[80] = "asterisk";
static char odbc_table[80] = "voicemessages";
static char vmfmts[80] = "wav";
#endif
static char *tdesc = "Extension Directory";
static char *app = "Directory";
@@ -51,7 +61,7 @@ static char *descrip =
"the calling channel with a directory of extensions from which they can search\n"
"by name. The list of names and corresponding extensions is retrieved from the\n"
"voicemail configuration file, voicemail.conf.\n"
" This applicaiton will immediate exit if one of the following DTMF digits are\n"
" This application will immediately exit if one of the following DTMF digits are\n"
"received and the extension to jump to exists:\n"
" 0 - Jump to the 'o' extension, if it exists.\n"
" * - Jump to the 'a' extension, if it exists.\n\n"
@@ -77,6 +87,101 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
#ifdef USE_ODBC_STORAGE
static void retrieve_file(char *dir)
{
int x = 0;
int res;
int fd=-1;
size_t fdlen = 0;
void *fdm = MAP_FAILED;
SQLHSTMT stmt;
char sql[256];
char fmt[80]="", empty[10] = "";
char *c;
SQLLEN colsize;
char full_fn[256];
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
do {
ast_copy_string(fmt, vmfmts, sizeof(fmt));
c = strchr(fmt, '|');
if (c)
*c = '\0';
if (!strcasecmp(fmt, "wav49"))
strcpy(fmt, "WAV");
snprintf(full_fn, sizeof(full_fn), "%s.%s", dir, fmt);
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
break;
}
snprintf(sql, sizeof(sql), "SELECT recording FROM %s WHERE dir=? AND msgnum=-1", odbc_table);
res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dir), 0, (void *)dir, 0, NULL);
res = odbc_smart_execute(obj, stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
res = SQLFetch(stmt);
if (res == SQL_NO_DATA) {
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
} else if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, 0770);
if (fd < 0) {
ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
res = SQLGetData(stmt, 1, SQL_BINARY, empty, 0, &colsize);
fdlen = colsize;
if (fd > -1) {
char tmp[1]="";
lseek(fd, fdlen - 1, SEEK_SET);
if (write(fd, tmp, 1) != 1) {
close(fd);
fd = -1;
break;
}
if (fd > -1)
fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
}
if (fdm != MAP_FAILED) {
memset(fdm, 0, fdlen);
res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, fdlen, &colsize);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
break;
}
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} while (0);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
if (fdm != MAP_FAILED)
munmap(fdm, fdlen);
if (fd > -1)
close(fd);
return;
}
#endif
static char *convert(char *lastname)
{
char *tmp;
@@ -151,7 +256,7 @@ static char *convert(char *lastname)
* '1' for selected entry from directory
* '*' for skipped entry from directory
*/
static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dialcontext, char *ext, char *name) {
static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dialcontext, char *ext, char *name, int fromappvm) {
int res = 0;
int loop = 3;
char fn[256];
@@ -160,10 +265,16 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dia
/* Check for the VoiceMail2 greeting first */
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, context, ext);
#ifdef USE_ODBC_STORAGE
retrieve_file(fn);
#endif
/* Otherwise, check for an old-style Voicemail greeting */
snprintf(fn2, sizeof(fn2), "%s/vm/%s/greet",
(char *)ast_config_AST_SPOOL_DIR, ext);
#ifdef USE_ODBC_STORAGE
retrieve_file(fn2);
#endif
if (ast_fileexists(fn, NULL, chan->language) > 0) {
res = ast_streamfile(chan, fn, chan->language);
@@ -181,6 +292,10 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dia
res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : ext,
AST_DIGIT_ANY, chan->language);
}
#ifdef USE_ODBC_STORAGE
ast_filedelete(fn, NULL);
ast_filedelete(fn2, NULL);
#endif
while (loop) {
if (!res) {
@@ -199,12 +314,17 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dia
case '1':
/* Name selected */
loop = 0;
if (ast_goto_if_exists(chan, dialcontext, ext, 1)) {
ast_log(LOG_WARNING,
"Can't find extension '%s' in context '%s'. "
"Did you pass the wrong context to Directory?\n",
ext, dialcontext);
res = -1;
if (fromappvm) {
/* We still want to set the exten */
ast_copy_string(chan->exten, ext, sizeof(chan->exten));
} else {
if (ast_goto_if_exists(chan, dialcontext, ext, 1)) {
ast_log(LOG_WARNING,
"Can't find extension '%s' in context '%s'. "
"Did you pass the wrong context to Directory?\n",
ext, dialcontext);
res = -1;
}
}
break;
@@ -288,7 +408,7 @@ static struct ast_config *realtime_directory(char *context)
return cfg;
}
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *context, char *dialcontext, char digit, int last)
static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *context, char *dialcontext, char digit, int last, int fromappvm)
{
/* Read in the first three digits.. "digit" is the first digit, already read */
char ext[NUMDIGITS + 1];
@@ -306,7 +426,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
return -1;
}
if (digit == '0') {
if (!ast_goto_if_exists(chan, chan->context, "o", 1) ||
if (!ast_goto_if_exists(chan, dialcontext, "o", 1) ||
(!ast_strlen_zero(chan->macrocontext) &&
!ast_goto_if_exists(chan, chan->macrocontext, "o", 1))) {
return 0;
@@ -317,7 +437,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
}
}
if (digit == '*') {
if (!ast_goto_if_exists(chan, chan->context, "a", 1) ||
if (!ast_goto_if_exists(chan, dialcontext, "a", 1) ||
(!ast_strlen_zero(chan->macrocontext) &&
!ast_goto_if_exists(chan, chan->macrocontext, "a", 1))) {
return 0;
@@ -350,7 +470,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
pos = strrchr(pos, ' ') + 1;
conv = convert(pos);
if (conv) {
if (!strcmp(conv, ext)) {
if (!strncmp(conv, ext, strlen(ext))) {
/* Match! */
found++;
free(conv);
@@ -367,7 +487,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
if (v) {
/* We have a match -- play a greeting if they have it */
res = play_mailbox_owner(chan, context, dialcontext, v->name, name);
res = play_mailbox_owner(chan, context, dialcontext, v->name, name, fromappvm);
switch (res) {
case -1:
/* user pressed '1' but extension does not exist, or
@@ -414,6 +534,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
struct localuser *u;
struct ast_config *cfg;
int last = 1;
int fromappvm = 0;
char *context, *dialcontext, *dirintro, *options;
if (ast_strlen_zero(data)) {
@@ -434,6 +555,8 @@ static int directory_exec(struct ast_channel *chan, void *data)
options++;
if (strchr(options, 'f'))
last = 0;
if (strchr(options, 'v'))
fromappvm = 1;
}
} else
dialcontext = context;
@@ -466,7 +589,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
if (!res)
res = ast_waitfordigit(chan, 5000);
if (res > 0) {
res = do_directory(chan, cfg, context, dialcontext, res, last);
res = do_directory(chan, cfg, context, dialcontext, res, last, fromappvm);
if (res > 0) {
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
@@ -495,6 +618,25 @@ int unload_module(void)
int load_module(void)
{
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG);
char *tmp;
if (cfg) {
if ((tmp = ast_variable_retrieve(cfg, "general", "odbcstorage"))) {
ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
}
if ((tmp = ast_variable_retrieve(cfg, "general", "odbctable"))) {
ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
}
if ((tmp = ast_variable_retrieve(cfg, "general", "format"))) {
ast_copy_string(vmfmts, tmp, sizeof(vmfmts));
}
ast_config_destroy(cfg);
} else
ast_log(LOG_WARNING, "Unable to load " VOICEMAIL_CONFIG " - ODBC defaults will be used\n");
#endif
return ast_register_application(app, directory_exec, synopsis, descrip);
}

0
apps/app_disa.c Executable file → Normal file
View File

3
apps/app_dumpchan.c Executable file → Normal file
View File

@@ -5,7 +5,8 @@
*
* Anthony Minessale <anthmct@yahoo.com>
*
* disclaimed to Digium
* A license has been granted to Digium (via disclaimer) for the use of
* this code.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact

0
apps/app_echo.c Executable file → Normal file
View File

0
apps/app_enumlookup.c Executable file → Normal file
View File

0
apps/app_eval.c Executable file → Normal file
View File

0
apps/app_exec.c Executable file → Normal file
View File

54
apps/app_externalivr.c Executable file → Normal file
View File

@@ -31,6 +31,7 @@
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include "asterisk.h"
@@ -43,6 +44,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
static const char *tdesc = "External IVR Interface Application";
@@ -93,9 +96,9 @@ static void send_child_event(FILE *handle, const char event, const char *data,
char tmp[256];
if (!data) {
snprintf(tmp, sizeof(tmp), "%c,%10ld", event, time(NULL));
snprintf(tmp, sizeof(tmp), "%c,%10d", event, (int)time(NULL));
} else {
snprintf(tmp, sizeof(tmp), "%c,%10ld,%s", event, time(NULL), data);
snprintf(tmp, sizeof(tmp), "%c,%10d,%s", event, (int)time(NULL), data);
}
fprintf(handle, "%s\n", tmp);
@@ -150,7 +153,7 @@ static int gen_nextfile(struct gen_state *state)
if (state->current) {
file_to_stream = state->current->filename;
} else {
file_to_stream = "silence-10";
file_to_stream = "silence/10";
u->playing_silence = 1;
}
@@ -250,16 +253,19 @@ static int app_exec(struct ast_channel *chan, void *data)
int res = -1;
int gen_active = 0;
int pid;
char *command;
char *argv[32];
int argc = 1;
char *buf;
char *buf, *command;
FILE *child_commands = NULL;
FILE *child_errors = NULL;
FILE *child_events = NULL;
sigset_t fullset, oldset;
LOCAL_USER_ADD(u);
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
AST_LIST_HEAD_INIT(&u->playlist);
AST_LIST_HEAD_INIT(&u->finishlist);
u->abort_current_sound = 0;
@@ -270,11 +276,13 @@ static int app_exec(struct ast_channel *chan, void *data)
}
buf = ast_strdupa(data);
command = strsep(&buf, "|");
memset(argv, 0, sizeof(argv) / sizeof(argv[0]));
argv[0] = command;
while ((argc < 31) && (argv[argc++] = strsep(&buf, "|")));
argv[argc] = NULL;
if (!buf) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
if (pipe(child_stdin)) {
ast_chan_log(LOG_WARNING, chan, "Could not create pipe for child input: %s\n", strerror(errno));
@@ -311,14 +319,20 @@ static int app_exec(struct ast_channel *chan, void *data)
/* child process */
int i;
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
if (option_highpriority)
ast_set_priority(0);
dup2(child_stdin[0], STDIN_FILENO);
dup2(child_stdout[1], STDOUT_FILENO);
dup2(child_stderr[1], STDERR_FILENO);
for (i = STDERR_FILENO + 1; i < 1024; i++)
close(i);
execv(command, argv);
fprintf(stderr, "Failed to execute '%s': %s\n", command, strerror(errno));
exit(1);
execv(argv[0], argv);
fprintf(stderr, "Failed to execute '%s': %s\n", argv[0], strerror(errno));
_exit(1);
} else {
/* parent process */
int child_events_fd = child_stdin[1];
@@ -331,6 +345,8 @@ static int app_exec(struct ast_channel *chan, void *data)
int waitfds[2] = { child_errors_fd, child_commands_fd };
struct ast_channel *rchan;
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
close(child_stdin[0]);
child_stdin[0] = 0;
close(child_stdout[1]);
@@ -343,8 +359,6 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
if (!(child_commands = fdopen(child_commands_fd, "r"))) {
ast_chan_log(LOG_WARNING, chan, "Could not open stream for child commands\n");
goto exit;
@@ -355,6 +369,10 @@ static int app_exec(struct ast_channel *chan, void *data)
goto exit;
}
setvbuf(child_events, NULL, _IONBF, 0);
setvbuf(child_commands, NULL, _IONBF, 0);
setvbuf(child_errors, NULL, _IONBF, 0);
res = 0;
while (1) {
@@ -439,7 +457,7 @@ static int app_exec(struct ast_channel *chan, void *data)
continue;
if (input[0] == 'S') {
if (ast_fileexists(&input[2], NULL, NULL) == -1) {
if (ast_fileexists(&input[2], NULL, u->chan->language) == -1) {
ast_chan_log(LOG_WARNING, chan, "Unknown file requested '%s'\n", &input[2]);
send_child_event(child_events, 'Z', NULL, chan);
strcpy(&input[2], "exception");
@@ -458,7 +476,7 @@ static int app_exec(struct ast_channel *chan, void *data)
AST_LIST_INSERT_TAIL(&u->playlist, entry, list);
AST_LIST_UNLOCK(&u->playlist);
} else if (input[0] == 'A') {
if (ast_fileexists(&input[2], NULL, NULL) == -1) {
if (ast_fileexists(&input[2], NULL, u->chan->language) == -1) {
ast_chan_log(LOG_WARNING, chan, "Unknown file requested '%s'\n", &input[2]);
send_child_event(child_events, 'Z', NULL, chan);
strcpy(&input[2], "exception");

35
apps/app_festival.c Executable file → Normal file
View File

@@ -53,6 +53,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
#define FESTIVAL_CONFIG "festival.conf"
@@ -126,16 +127,26 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
#ifdef __PPC__
char c;
#endif
sigset_t fullset, oldset;
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
if (res) {
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
}
for (x=0;x<256;x++) {
if (x != fd)
close(x);
}
if (option_highpriority)
ast_set_priority(0);
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
/*IAS */
#ifdef __PPC__
for( x=0; x<length; x+=2)
@@ -175,7 +186,8 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
if (chan->_state != AST_STATE_UP)
ast_answer(chan);
ast_stopstream(chan);
ast_indicate(chan, -1);
owriteformat = chan->writeformat;
res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
@@ -229,11 +241,13 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
myf.f.data = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
ast_frfree(f);
break;
}
if (res < needed) { /* last frame */
ast_log(LOG_DEBUG, "Last frame\n");
res=0;
ast_frfree(f);
break;
}
} else {
@@ -455,8 +469,23 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
/* This assumes only one waveform will come back, also LP is unlikely */
wave = 0;
do {
int read_data;
for (n=0; n < 3; )
n += read(fd,ack+n,3-n);
{
read_data = read(fd,ack+n,3-n);
/* this avoids falling in infinite loop
* in case that festival server goes down
* */
if ( read_data == -1 )
{
ast_log(LOG_WARNING,"Unable to read from cache/festival fd\n");
close(fd);
ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
return -1;
}
n += read_data;
}
ack[3] = '\0';
if (strcmp(ack,"WV\n") == 0) { /* receive a waveform */
ast_log(LOG_DEBUG,"Festival WV command\n");

0
apps/app_flash.c Executable file → Normal file
View File

0
apps/app_forkcdr.c Executable file → Normal file
View File

0
apps/app_getcpeid.c Executable file → Normal file
View File

48
apps/app_groupcount.c Executable file → Normal file
View File

@@ -70,7 +70,8 @@ static int group_count_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(group)) {
grp = pbx_builtin_getvar_helper(chan, category);
strncpy(group, grp, sizeof(group) - 1);
if (!ast_strlen_zero(grp))
ast_copy_string(group, grp, sizeof(group));
}
count = ast_app_group_get_count(group, category);
@@ -154,6 +155,11 @@ static int group_check_exec(struct ast_channel *chan, void *data)
deprecation_warning = 1;
}
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "CheckGroup requires an argument(max[@category][|options])\n");
return 0;
}
if (!(parse = ast_strdupa(data))) {
ast_log(LOG_WARNING, "Memory Error!\n");
LOCAL_USER_REMOVE(u);
@@ -195,10 +201,8 @@ static int group_show_channels(int fd, int argc, char *argv[])
{
#define FORMAT_STRING "%-25s %-20s %-20s\n"
struct ast_channel *c = NULL;
int numchans = 0;
struct ast_var_t *current;
struct varshead *headp;
struct ast_group_info *gi = NULL;
regex_t regexbuf;
int havepattern = 0;
@@ -212,26 +216,20 @@ static int group_show_channels(int fd, int argc, char *argv[])
}
ast_cli(fd, FORMAT_STRING, "Channel", "Group", "Category");
while ( (c = ast_channel_walk_locked(c)) != NULL) {
headp=&c->varshead;
AST_LIST_TRAVERSE(headp,current,entries) {
if (!strncmp(ast_var_name(current), GROUP_CATEGORY_PREFIX "_", strlen(GROUP_CATEGORY_PREFIX) + 1)) {
if (!havepattern || !regexec(&regexbuf, ast_var_value(current), 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, c->name, ast_var_value(current),
(ast_var_name(current) + strlen(GROUP_CATEGORY_PREFIX) + 1));
numchans++;
}
} else if (!strcmp(ast_var_name(current), GROUP_CATEGORY_PREFIX)) {
if (!havepattern || !regexec(&regexbuf, ast_var_value(current), 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, c->name, ast_var_value(current), "(default)");
numchans++;
}
}
ast_app_group_list_lock();
gi = ast_app_group_list_head();
while (gi) {
if (!havepattern || !regexec(&regexbuf, gi->group, 0, NULL, 0)) {
ast_cli(fd, FORMAT_STRING, gi->chan->name, gi->group, (ast_strlen_zero(gi->category) ? "(default)" : gi->category));
numchans++;
}
numchans++;
ast_mutex_unlock(&c->lock);
gi = AST_LIST_NEXT(gi, list);
}
ast_app_group_list_unlock();
if (havepattern)
regfree(&regexbuf);
@@ -257,8 +255,8 @@ static char *group_count_descrip =
" Calculates the group count for the specified group, or uses\n"
"the current channel's group if not specifed (and non-empty).\n"
"Stores result in GROUPCOUNT. \n"
"This application has been deprecated, please use the function\n"
"GroupCount.\n";
"Note: This application has been deprecated, please use the function\n"
"GROUP_COUNT.\n";
static char *group_set_descrip =
"Usage: SetGroup(groupname[@category])\n"
@@ -284,8 +282,8 @@ static char *group_match_count_descrip =
" Calculates the group count for all groups that match the specified\n"
"pattern. Uses standard regular expression matching (see regex(7)).\n"
"Stores result in GROUPCOUNT. Always returns 0.\n"
"This application has been deprecated, please use the function\n"
"GroupMatchCount.\n";
"Note: This application has been deprecated, please use the function\n"
"GROUP_MATCH_COUNT.\n";
static char show_channels_usage[] =
"Usage: group show channels [pattern]\n"

134
apps/app_hasnewvoicemail.c Executable file → Normal file
View File

@@ -47,6 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
#ifdef USE_ODBC_STORAGE
#include "asterisk/res_odbc.h"
static char odbc_database[80];
static char odbc_table[80];
#endif
static char *tdesc = "Indicator for whether a voice mailbox has messages in a given folder.";
static char *app_hasvoicemail = "HasVoicemail";
@@ -68,7 +74,7 @@ static char *hasnewvoicemail_descrip =
"Assumes folder 'INBOX' if folder is not specified. Optionally sets <varname> to the number of messages\n"
"in that folder.\n"
" The option string may contain zero of the following character:\n"
" 'j' -- jump to priority n+101, if there is new voicemail in tolder 'folder' or INBOX\n"
" 'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX\n"
" This application sets the following channel variable upon completion:\n"
" HASVMSTATUS The result of the new voicemail check returned as a text string as follows\n"
" <# of messages in the folder, 0 for NONE>\n";
@@ -77,26 +83,93 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static int hasvoicemail_internal(char *context, char *box, char *folder)
#ifdef USE_ODBC_STORAGE
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
char vmpath[256];
DIR *vmdir;
struct dirent *vment;
int count=0;
int nummsgs = 0;
int res;
SQLHSTMT stmt;
char sql[256];
char rowdata[20];
snprintf(vmpath,sizeof(vmpath), "%s/voicemail/%s/%s/%s", (char *)ast_config_AST_SPOOL_DIR, context, box, folder);
if ((vmdir = opendir(vmpath))) {
/* No matter what the format of VM, there will always be a .txt file for each message. */
while ((vment = readdir(vmdir))) {
if (!strncmp(vment->d_name + 7, ".txt", 4)) {
count++;
break;
}
if (!folder)
folder = "INBOX";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
if (ast_strlen_zero(context))
context = "default";
odbc_obj *obj;
obj = fetch_odbc_obj(odbc_database, 0);
if (obj) {
res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
goto yuck;
}
closedir(vmdir);
snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s/voicemail/%s/%s/%s'", odbc_table, ast_config_AST_SPOOL_DIR, context, mailbox, folder);
res = SQLPrepare(stmt, sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = odbc_smart_execute(obj, stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLFetch(stmt);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
goto yuck;
}
nummsgs = atoi(rowdata);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
} else
ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
yuck:
return nummsgs;
}
#else
static int hasvoicemail_internal(const char *context, const char *mailbox, const char *folder)
{
DIR *dir;
struct dirent *de;
char fn[256];
int count = 0;
if (ast_strlen_zero(folder))
folder = "INBOX";
if (ast_strlen_zero(context))
context = "default";
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox))
return 0;
snprintf(fn, sizeof(fn), "%s/voicemail/%s/%s/%s", ast_config_AST_SPOOL_DIR, context, mailbox, folder);
dir = opendir(fn);
if (!dir)
return 0;
while ((de = readdir(dir))) {
if (!strncasecmp(de->d_name, "msg", 3) && !strcasecmp(de->d_name + 8, "txt"))
count++;
}
closedir(dir);
return count;
}
#endif
static int hasvoicemail_exec(struct ast_channel *chan, void *data)
{
@@ -163,7 +236,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
if (vmcount > 0) {
/* Branch to the next extension */
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s has new voicemail, but extension %s, priority %d doesn't exist\n", vmbox, context, chan->exten, chan->priority + 101);
}
}
@@ -187,7 +260,7 @@ static char *acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *data, c
args = ast_strdupa(data);
if (!args) {
ast_log(LOG_ERROR, "Out of memory");
ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return buf;
}
@@ -223,6 +296,31 @@ struct ast_custom_function acf_vmcount = {
.read = acf_vmcount_exec,
};
static int load_config(void)
{
#ifdef USE_ODBC_STORAGE
struct ast_config *cfg;
char *tmp;
cfg = ast_config_load("voicemail.conf");
if (cfg) {
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbcstorage")))
tmp = "asterisk";
ast_copy_string(odbc_database, tmp, sizeof(odbc_database));
if (! (tmp = ast_variable_retrieve(cfg, "general", "odbctable")))
tmp = "voicemessages";
ast_copy_string(odbc_table, tmp, sizeof(odbc_table));
ast_config_destroy(cfg);
}
#endif
return 0;
}
int reload(void)
{
return load_config();
}
int unload_module(void)
{
int res;
@@ -239,7 +337,7 @@ int unload_module(void)
int load_module(void)
{
int res;
load_config();
res = ast_custom_function_register(&acf_vmcount);
res |= ast_register_application(app_hasvoicemail, hasvoicemail_exec, hasvoicemail_synopsis, hasvoicemail_descrip);
res |= ast_register_application(app_hasnewvoicemail, hasvoicemail_exec, hasnewvoicemail_synopsis, hasnewvoicemail_descrip);

22
apps/app_ices.c Executable file → Normal file
View File

@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define ICES "/usr/bin/ices"
#define LOCAL_ICES "/usr/local/bin/ices"
@@ -67,13 +68,27 @@ static int icesencode(char *filename, int fd)
{
int res;
int x;
sigset_t fullset, oldset;
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
if (res) {
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
}
/* Stop ignoring PIPE */
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDIN_FILENO);
for (x=STDERR_FILENO + 1;x<256;x++) {
for (x=STDERR_FILENO + 1;x<1024;x++) {
if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))
close(x);
}
@@ -84,7 +99,7 @@ static int icesencode(char *filename, int fd)
/* As a last-ditch effort, try to use PATH */
execlp("ices", "ices", filename, (char *)NULL);
ast_log(LOG_WARNING, "Execute of ices failed\n");
return -1;
_exit(0);
}
static int ices_exec(struct ast_channel *chan, void *data)
@@ -172,6 +187,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Write failed to pipe: %s\n", strerror(errno));
res = -1;
ast_frfree(f);
break;
}
}

0
apps/app_image.c Executable file → Normal file
View File

0
apps/app_intercom.c Executable file → Normal file
View File

0
apps/app_ivrdemo.c Executable file → Normal file
View File

0
apps/app_lookupblacklist.c Executable file → Normal file
View File

0
apps/app_lookupcidname.c Executable file → Normal file
View File

209
apps/app_macro.c Executable file → Normal file
View File

@@ -60,7 +60,18 @@ static char *descrip =
"If you Goto out of the Macro context, the Macro will terminate and control\n"
"will be returned at the location of the Goto.\n"
"If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue\n"
"at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n";
"at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n"
"Extensions: While a macro is being executed, it becomes the current context.\n"
" This means that if a hangup occurs, for instance, that the macro\n"
" will be searched for an 'h' extension, NOT the context from which\n"
" the macro was called. So, make sure to define all appropriate\n"
" extensions in your macro! (you can use 'catch' in AEL) \n"
"WARNING: Because of the way Macro is implemented (it executes the priorities\n"
" contained within it via sub-engine), and a fixed per-thread\n"
" memory stack allowance, macros are limited to 7 levels\n"
" of nesting (macro calling macro calling macro, etc.); It\n"
" may be possible that stack-intensive applications in deeply nested\n"
" macros could cause asterisk to crash earlier than this limit.\n";
static char *if_descrip =
" MacroIf(<expr>?macroname_a[|arg1][:macroname_b[|arg1]])\n"
@@ -87,6 +98,41 @@ STANDARD_LOCAL_USER;
LOCAL_USER_DECL;
static struct ast_exten *find_matching_priority(struct ast_context *c, const char *exten, int priority, const char *callerid)
{
struct ast_exten *e;
struct ast_include *i;
struct ast_context *c2;
for (e=ast_walk_context_extensions(c, NULL); e; e=ast_walk_context_extensions(c, e)) {
if (ast_extension_match(ast_get_extension_name(e), exten)) {
int needmatch = ast_get_extension_matchcid(e);
if ((needmatch && ast_extension_match(ast_get_extension_cidmatch(e), callerid)) ||
(!needmatch)) {
/* This is the matching extension we want */
struct ast_exten *p;
for (p=ast_walk_extension_priorities(e, NULL); p; p=ast_walk_extension_priorities(e, p)) {
if (priority != ast_get_extension_priority(p))
continue;
return p;
}
}
}
}
/* No match; run through includes */
for (i=ast_walk_context_includes(c, NULL); i; i=ast_walk_context_includes(c, i)) {
for (c2=ast_walk_contexts(NULL); c2; c2=ast_walk_contexts(c2)) {
if (!strcmp(ast_get_context_name(c2), ast_get_include_name(i))) {
e = find_matching_priority(c2, exten, priority, callerid);
if (e)
return e;
}
}
}
return NULL;
}
static int macro_exec(struct ast_channel *chan, void *data)
{
char *tmp;
@@ -94,17 +140,18 @@ static int macro_exec(struct ast_channel *chan, void *data)
char *macro;
char fullmacro[80];
char varname[80];
char runningapp[80], runningdata[1024];
char *oldargs[MAX_ARGS + 1] = { NULL, };
int argc, x;
int res=0;
char oldexten[256]="";
int oldpriority;
int oldpriority, gosub_level = 0;
char pc[80], depthc[12];
char oldcontext[AST_MAX_CONTEXT] = "";
char *offsets;
int offset, depth;
char *offsets, *s, *inhangupc;
int offset, depth = 0, maxdepth = 7;
int setmacrocontext=0;
int autoloopflag;
int autoloopflag, dead = 0, inhangup = 0;
char *save_macro_exten;
char *save_macro_context;
@@ -119,6 +166,11 @@ static int macro_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u);
/* does the user want a deeper rabbit hole? */
s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
if (s)
sscanf(s, "%d", &maxdepth);
/* Count how many levels deep the rabbit hole goes */
tmp = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (tmp) {
@@ -127,7 +179,14 @@ static int macro_exec(struct ast_channel *chan, void *data)
depth = 0;
}
if (depth >= 7) {
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
if (strcmp(chan->exten, "h") == 0)
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP");
if (!ast_strlen_zero(inhangupc))
sscanf(inhangupc, "%d", &inhangup);
if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
LOCAL_USER_REMOVE(u);
return 0;
@@ -205,8 +264,36 @@ static int macro_exec(struct ast_channel *chan, void *data)
autoloopflag = ast_test_flag(chan, AST_FLAG_IN_AUTOLOOP);
ast_set_flag(chan, AST_FLAG_IN_AUTOLOOP);
while(ast_exists_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num)) {
struct ast_context *c;
struct ast_exten *e;
runningapp[0] = '\0';
runningdata[0] = '\0';
/* What application will execute? */
if (ast_lock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
} else {
for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
if (!strcmp(ast_get_context_name(c), chan->context)) {
if (ast_lock_context(c)) {
ast_log(LOG_WARNING, "Unable to lock context?\n");
} else {
e = find_matching_priority(c, chan->exten, chan->priority, chan->cid.cid_num);
if (e) { /* This will only be undefined for pbx_realtime, which is majorly broken. */
ast_copy_string(runningapp, ast_get_extension_app(e), sizeof(runningapp));
ast_copy_string(runningdata, ast_get_extension_app_data(e), sizeof(runningdata));
}
ast_unlock_context(c);
}
break;
}
}
}
ast_unlock_contexts();
/* Reset the macro depth, if it was changed in the last iteration */
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
if ((res = ast_spawn_extension(chan, chan->context, chan->exten, chan->priority, chan->cid.cid_num))) {
/* Something bad happened, or a hangup has been requested. */
if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F')) ||
@@ -216,33 +303,91 @@ static int macro_exec(struct ast_channel *chan, void *data)
break;
}
switch(res) {
case MACRO_EXIT_RESULT:
res = 0;
case MACRO_EXIT_RESULT:
res = 0;
goto out;
case AST_PBX_KEEPALIVE:
if (option_debug)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited KEEPALIVE in macro %s on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
else if (option_verbose > 1)
if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited KEEPALIVE in macro '%s' on '%s'\n", chan->context, chan->exten, chan->priority, macro, chan->name);
goto out;
break;
default:
if (option_debug)
ast_log(LOG_DEBUG, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
else if (option_verbose > 1)
if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", chan->context, chan->exten, chan->priority, chan->name, macro);
dead = 1;
goto out;
}
}
if (strcasecmp(chan->context, fullmacro)) {
ast_log(LOG_DEBUG, "Executed application: %s\n", runningapp);
if (!strcasecmp(runningapp, "GOSUB")) {
gosub_level++;
ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
} else if (!strcasecmp(runningapp, "GOSUBIF")) {
char tmp2[1024] = "", *cond, *app, *app2 = tmp2;
pbx_substitute_variables_helper(chan, runningdata, tmp2, sizeof(tmp2) - 1);
cond = strsep(&app2, "?");
app = strsep(&app2, ":");
if (pbx_checkcondition(cond)) {
if (!ast_strlen_zero(app)) {
gosub_level++;
ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
}
} else {
if (!ast_strlen_zero(app2)) {
gosub_level++;
ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
}
}
} else if (!strcasecmp(runningapp, "RETURN")) {
gosub_level--;
ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
} else if (!strcasecmp(runningapp, "STACKPOP")) {
gosub_level--;
ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
} else if (!strncasecmp(runningapp, "EXEC", 4)) {
/* Must evaluate args to find actual app */
char tmp2[1024] = "", *tmp3 = NULL;
pbx_substitute_variables_helper(chan, runningdata, tmp2, sizeof(tmp2) - 1);
if (!strcasecmp(runningapp, "EXECIF")) {
tmp3 = strchr(tmp2, '|');
if (tmp3)
*tmp3++ = '\0';
if (!pbx_checkcondition(tmp2))
tmp3 = NULL;
} else
tmp3 = tmp2;
if (tmp3)
ast_log(LOG_DEBUG, "Last app: %s\n", tmp3);
if (tmp3 && !strncasecmp(tmp3, "GOSUB", 5)) {
gosub_level++;
ast_log(LOG_DEBUG, "Incrementing gosub_level\n");
} else if (tmp3 && !strncasecmp(tmp3, "RETURN", 6)) {
gosub_level--;
ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
} else if (tmp3 && !strncasecmp(tmp3, "STACKPOP", 8)) {
gosub_level--;
ast_log(LOG_DEBUG, "Decrementing gosub_level\n");
}
}
if (gosub_level == 0 && strcasecmp(chan->context, fullmacro)) {
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Channel '%s' jumping out of macro '%s'\n", chan->name, macro);
break;
}
/* don't stop executing extensions when we're in "h" */
if (chan->_softhangup && strcasecmp(oldexten,"h")) {
ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
chan->exten, chan->priority);
if (chan->_softhangup && !inhangup) {
ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
chan->exten, chan->macroexten, chan->priority);
goto out;
}
chan->priority++;
@@ -250,37 +395,44 @@ static int macro_exec(struct ast_channel *chan, void *data)
out:
/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
snprintf(depthc, sizeof(depthc), "%d", depth);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
for (x=1; x<argc; x++) {
ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
}
for (x = 1; x < argc; x++) {
/* Restore old arguments and delete ours */
snprintf(varname, sizeof(varname), "ARG%d", x);
if (oldargs[x]) {
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
if (!dead)
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
free(oldargs[x]);
} else {
} else if (!dead) {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
}
/* Restore macro variables */
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
if (!dead) {
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
}
if (save_macro_exten)
free(save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
if (save_macro_context)
free(save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_priority)
free(save_macro_priority);
if (setmacrocontext) {
if (!dead && setmacrocontext) {
chan->macrocontext[0] = '\0';
chan->macroexten[0] = '\0';
chan->macropriority = 0;
}
if (!strcasecmp(chan->context, fullmacro)) {
if (!dead && !strcasecmp(chan->context, fullmacro)) {
/* If we're leaving the macro normally, restore original information */
chan->priority = oldpriority;
ast_copy_string(chan->context, oldcontext, sizeof(chan->context));
@@ -299,7 +451,8 @@ static int macro_exec(struct ast_channel *chan, void *data)
}
}
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (!dead)
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
free(save_macro_offset);
LOCAL_USER_REMOVE(u);
@@ -328,10 +481,10 @@ static int macroif_exec(struct ast_channel *chan, void *data)
*label_b = '\0';
label_b++;
}
if (ast_true(expr))
macro_exec(chan, label_a);
if (pbx_checkcondition(expr))
res = macro_exec(chan, label_a);
else if (label_b)
macro_exec(chan, label_b);
res = macro_exec(chan, label_b);
} else
ast_log(LOG_WARNING, "Invalid Syntax.\n");

3
apps/app_math.c Executable file → Normal file
View File

@@ -69,7 +69,8 @@ static char *math_descrip =
"Perform floating point calculation on number 1 to number 2 and \n"
"store the result in returnvar. Valid ops are: \n"
" +,-,/,*,%,<,>,>=,<=,==\n"
"and behave as their C equivalents.\n";
"and behave as their C equivalents.\n"
" This application has been deprecated in favor of the MATH function.\n";
#define ADDFUNCTION 0
#define DIVIDEFUNCTION 1

4
apps/app_md5.c Executable file → Normal file
View File

@@ -157,9 +157,9 @@ static int md5check_exec(struct ast_channel *chan, void *data)
ast_log(LOG_DEBUG, "ERROR: MD5 not verified: %s -- %s\n", args.md5hash, args.string);
pbx_builtin_setvar_helper(chan, "CHECKMD5STATUS", "NOMATCH");
if (priority_jump || option_priority_jumping) {
if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
if (option_debug > 2)
ast_log(LOG_DEBUG, "ERROR: Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
ast_log(LOG_DEBUG, "Can't jump to exten+101 (e%s,p%d), sorry\n", chan->exten,chan->priority+101);
}
LOCAL_USER_REMOVE(u);
return res;

522
apps/app_meetme.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

15
apps/app_milliwatt.c Executable file → Normal file
View File

@@ -73,30 +73,29 @@ static void milliwatt_release(struct ast_channel *chan, void *data)
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame wf;
unsigned char waste[AST_FRIENDLY_OFFSET];
unsigned char buf[640];
unsigned char buf[AST_FRIENDLY_OFFSET + 640];
int i,*indexp = (int *) data;
if (len > sizeof(buf))
if (len + AST_FRIENDLY_OFFSET > sizeof(buf))
{
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)sizeof(buf),len);
len = sizeof(buf);
ast_log(LOG_WARNING,"Only doing %d bytes (%d bytes requested)\n",(int)(sizeof(buf) - AST_FRIENDLY_OFFSET),len);
len = sizeof(buf) - AST_FRIENDLY_OFFSET;
}
waste[0] = 0; /* make compiler happy */
wf.frametype = AST_FRAME_VOICE;
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
wf.data = buf;
wf.data = buf + AST_FRIENDLY_OFFSET;
wf.datalen = len;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
wf.prev = wf.next = NULL;
/* create a buffer containing the digital milliwatt pattern */
for(i = 0; i < len; i++)
{
buf[i] = digital_milliwatt[(*indexp)++];
buf[AST_FRIENDLY_OFFSET + i] = digital_milliwatt[(*indexp)++];
*indexp &= 7;
}
if (ast_write(chan,&wf) < 0)

222
apps/app_mixmonitor.c Executable file → Normal file
View File

@@ -61,14 +61,15 @@ static const char *desc = ""
"Valid options:\n"
" a - Append to the file instead of overwriting it.\n"
" b - Only save audio to the file while the channel is bridged.\n"
" Note: does not include conferences.\n"
" Note: Does not include conferences or sounds played to each bridged\n"
" party.\n"
" v(<x>) - Adjust the heard volume by a factor of <x> (range -4 to 4)\n"
" V(<x>) - Adjust the spoken volume by a factor of <x> (range -4 to 4)\n"
" W(<x>) - Adjust the both heard and spoken volumes by a factor of <x>\n"
" (range -4 to 4)\n\n"
"<command> will be executed when the recording is over\n"
"Any strings matching ^{X} will be unescaped to ${X} and \n"
"all variables will be evaluated at that time.\n"
"Any strings matching ^{X} will be unescaped to ${X}.\n"
"All variables will be evaluated at the time MixMonitor is called.\n"
"The variable MIXMONITOR_FILENAME will contain the filename used to record.\n"
"";
@@ -79,12 +80,11 @@ LOCAL_USER_DECL;
static const char *mixmonitor_spy_type = "MixMonitor";
struct mixmonitor {
struct ast_channel *chan;
struct ast_channel_spy spy;
char *filename;
char *post_process;
char *name;
unsigned int flags;
int readvol;
int writevol;
};
enum {
@@ -110,21 +110,6 @@ AST_APP_OPTIONS(mixmonitor_opts, {
AST_APP_OPTION_ARG('W', MUXFLAG_VOLUME, OPT_ARG_VOLUME),
});
static void stopmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
/* If our status has changed, then the channel we're spying on is gone....
DON'T TOUCH IT!!! RUN AWAY!!! */
if (spy->status != CHANSPY_RUNNING)
return;
if (!chan)
return;
ast_mutex_lock(&chan->lock);
ast_channel_spy_remove(chan, spy);
ast_mutex_unlock(&chan->lock);
}
static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
{
struct ast_channel *peer;
@@ -136,7 +121,7 @@ static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
ast_mutex_lock(&chan->lock);
res = ast_channel_spy_add(chan, spy);
ast_mutex_unlock(&chan->lock);
if (!res && ast_test_flag(chan, AST_FLAG_NBRIDGE) && (peer = ast_bridged_channel(chan)))
ast_softhangup(peer, AST_SOFTHANGUP_UNBRIDGE);
@@ -148,124 +133,83 @@ static int startmon(struct ast_channel *chan, struct ast_channel_spy *spy)
static void *mixmonitor_thread(void *obj)
{
struct mixmonitor *mixmonitor = obj;
struct ast_channel_spy spy;
struct ast_frame *f = NULL;
struct ast_filestream *fs = NULL;
char *ext, *name;
unsigned int oflags;
struct ast_frame *f;
char post_process[1024] = "";
char *ext;
int errflag = 0;
STANDARD_INCREMENT_USECOUNT;
name = ast_strdupa(mixmonitor->chan->name);
oflags = O_CREAT|O_WRONLY;
oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
if ((ext = strrchr(mixmonitor->filename, '.'))) {
*(ext++) = '\0';
} else {
ext = "raw";
}
fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644);
if (!fs) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
goto out;
}
if (ast_test_flag(mixmonitor, MUXFLAG_APPEND))
ast_seekstream(fs, 0, SEEK_END);
memset(&spy, 0, sizeof(spy));
ast_set_flag(&spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&spy, CHANSPY_MIXAUDIO);
spy.type = mixmonitor_spy_type;
spy.status = CHANSPY_RUNNING;
spy.read_queue.format = AST_FORMAT_SLINEAR;
spy.write_queue.format = AST_FORMAT_SLINEAR;
if (mixmonitor->readvol) {
ast_set_flag(&spy, CHANSPY_READ_VOLADJUST);
spy.read_vol_adjustment = mixmonitor->readvol;
}
if (mixmonitor->writevol) {
ast_set_flag(&spy, CHANSPY_WRITE_VOLADJUST);
spy.write_vol_adjustment = mixmonitor->writevol;
}
ast_mutex_init(&spy.lock);
if (startmon(mixmonitor->chan, &spy)) {
ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
spy.type, mixmonitor->chan->name);
goto out2;
}
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", mixmonitor->name);
while (1) {
ast_mutex_lock(&mixmonitor->spy.lock);
while (mixmonitor->spy.chan) {
struct ast_frame *next;
int write;
ast_mutex_lock(&spy.lock);
ast_channel_spy_trigger_wait(&spy);
ast_channel_spy_trigger_wait(&mixmonitor->spy);
if (ast_check_hangup(mixmonitor->chan) || spy.status != CHANSPY_RUNNING) {
ast_mutex_unlock(&spy.lock);
if (!mixmonitor->spy.chan || mixmonitor->spy.status != CHANSPY_RUNNING)
break;
}
while (1) {
if (!(f = ast_channel_spy_read_frame(&spy, SAMPLES_PER_FRAME)))
if (!(f = ast_channel_spy_read_frame(&mixmonitor->spy, SAMPLES_PER_FRAME)))
break;
write = (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) ||
ast_bridged_channel(mixmonitor->chan));
ast_bridged_channel(mixmonitor->spy.chan));
/* it is possible for ast_channel_spy_read_frame() to return a chain
of frames if a queue flush was necessary, so process them
*/
for (; f; f = next) {
next = f->next;
if (write)
ast_writestream(fs, f);
if (write && errflag == 0) {
if (!fs) {
/* Determine creation flags and filename plus extension for filestream */
oflags = O_CREAT | O_WRONLY;
oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
if ((ext = strrchr(mixmonitor->filename, '.')))
*(ext++) = '\0';
else
ext = "raw";
/* Move onto actually creating the filestream */
if (!(fs = ast_writefile(mixmonitor->filename, ext, NULL, oflags, 0, 0644))) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", mixmonitor->filename, ext);
errflag = 1;
}
}
if (fs)
ast_writestream(fs, f);
}
ast_frfree(f);
}
}
ast_mutex_unlock(&spy.lock);
}
ast_mutex_unlock(&mixmonitor->spy.lock);
if (mixmonitor->post_process) {
char *p;
for (p = mixmonitor->post_process; *p ; p++) {
if (*p == '^' && *(p+1) == '{') {
*p = '$';
}
}
pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
}
stopmon(mixmonitor->chan, &spy);
ast_channel_spy_free(&mixmonitor->spy);
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", name);
ast_verbose(VERBOSE_PREFIX_2 "End MixMonitor Recording %s\n", mixmonitor->name);
if (!ast_strlen_zero(post_process)) {
if (mixmonitor->post_process) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", post_process);
ast_safe_system(post_process);
ast_verbose(VERBOSE_PREFIX_2 "Executing [%s]\n", mixmonitor->post_process);
ast_safe_system(mixmonitor->post_process);
}
out2:
ast_mutex_destroy(&spy.lock);
if (fs)
ast_closestream(fs);
out:
free(mixmonitor);
STANDARD_DECREMENT_USECOUNT;
@@ -279,32 +223,76 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
pthread_attr_t attr;
pthread_t thread;
struct mixmonitor *mixmonitor;
int len;
char postprocess2[1024] = "";
size_t len;
len = sizeof(*mixmonitor) + strlen(filename) + 1;
if (!ast_strlen_zero(post_process))
len += strlen(post_process) + 1;
len = sizeof(*mixmonitor) + strlen(chan->name) + strlen(filename) + 2;
/* If a post process system command is given attach it to the structure */
if (!ast_strlen_zero(post_process)) {
char *p1, *p2;
p1 = ast_strdupa(post_process);
for (p2 = p1; *p2 ; p2++) {
if (*p2 == '^' && *(p2+1) == '{') {
*p2 = '$';
}
}
pbx_substitute_variables_helper(chan, p1, postprocess2, sizeof(postprocess2) - 1);
if (!ast_strlen_zero(postprocess2))
len += strlen(postprocess2) + 1;
}
/* Pre-allocate mixmonitor structure and spy */
if (!(mixmonitor = calloc(1, len))) {
ast_log(LOG_ERROR, "Memory Error!\n");
return;
}
mixmonitor->chan = chan;
mixmonitor->filename = (char *) mixmonitor + sizeof(*mixmonitor);
strcpy(mixmonitor->filename, filename);
if (!ast_strlen_zero(post_process)) {
mixmonitor->post_process = mixmonitor->filename + strlen(filename) + 1;
strcpy(mixmonitor->post_process, post_process);
}
mixmonitor->readvol = readvol;
mixmonitor->writevol = writevol;
/* Copy over flags and channel name */
mixmonitor->flags = flags;
mixmonitor->name = (char *) mixmonitor + sizeof(*mixmonitor);
strcpy(mixmonitor->name, chan->name);
if (!ast_strlen_zero(postprocess2)) {
mixmonitor->post_process = mixmonitor->name + strlen(mixmonitor->name) + strlen(filename) + 2;
strcpy(mixmonitor->post_process, postprocess2);
}
mixmonitor->filename = (char *) mixmonitor + sizeof(*mixmonitor) + strlen(chan->name) + 1;
strcpy(mixmonitor->filename, filename);
/* Setup the actual spy before creating our thread */
ast_set_flag(&mixmonitor->spy, CHANSPY_FORMAT_AUDIO);
ast_set_flag(&mixmonitor->spy, CHANSPY_MIXAUDIO);
mixmonitor->spy.type = mixmonitor_spy_type;
mixmonitor->spy.status = CHANSPY_RUNNING;
mixmonitor->spy.read_queue.format = AST_FORMAT_SLINEAR;
mixmonitor->spy.write_queue.format = AST_FORMAT_SLINEAR;
if (readvol) {
ast_set_flag(&mixmonitor->spy, CHANSPY_READ_VOLADJUST);
mixmonitor->spy.read_vol_adjustment = readvol;
}
if (writevol) {
ast_set_flag(&mixmonitor->spy, CHANSPY_WRITE_VOLADJUST);
mixmonitor->spy.write_vol_adjustment = writevol;
}
ast_mutex_init(&mixmonitor->spy.lock);
if (startmon(chan, &mixmonitor->spy)) {
ast_log(LOG_WARNING, "Unable to add '%s' spy to channel '%s'\n",
mixmonitor->spy.type, chan->name);
/* Since we couldn't add ourselves - bail out! */
ast_mutex_destroy(&mixmonitor->spy.lock);
free(mixmonitor);
return;
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&thread, &attr, mixmonitor_thread, mixmonitor);
pthread_attr_destroy(&attr);
}
static int mixmonitor_exec(struct ast_channel *chan, void *data)

19
apps/app_mp3.c Executable file → Normal file
View File

@@ -43,6 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_MPG_123 "/usr/local/bin/mpg123"
#define MPG_123 "/usr/bin/mpg123"
@@ -66,13 +67,25 @@ static int mp3play(char *filename, int fd)
{
int res;
int x;
sigset_t fullset, oldset;
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
if (res) {
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
}
if (option_highpriority)
ast_set_priority(0);
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
for (x=STDERR_FILENO + 1;x<256;x++) {
if (x != STDOUT_FILENO)
close(x);
}
@@ -94,7 +107,7 @@ static int mp3play(char *filename, int fd)
execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
}
ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
return -1;
_exit(0);
}
static int timed_read(int fd, void *data, int datalen, int timeout)

20
apps/app_nbscat.c Executable file → Normal file
View File

@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/options.h"
#define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
#define NBSCAT "/usr/bin/nbscat8k"
@@ -70,13 +71,26 @@ static int NBScatplay(int fd)
{
int res;
int x;
sigset_t fullset, oldset;
sigfillset(&fullset);
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
res = fork();
if (res < 0)
ast_log(LOG_WARNING, "Fork failed\n");
if (res)
if (res) {
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
return res;
}
signal(SIGPIPE, SIG_DFL);
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
if (option_highpriority)
ast_set_priority(0);
dup2(fd, STDOUT_FILENO);
for (x=0;x<256;x++) {
for (x = STDERR_FILENO + 1; x < 1024; x++) {
if (x != STDOUT_FILENO)
close(x);
}
@@ -84,7 +98,7 @@ static int NBScatplay(int fd)
execl(NBSCAT, "nbscat8k", "-d", (char *)NULL);
execl(LOCAL_NBSCAT, "nbscat8k", "-d", (char *)NULL);
ast_log(LOG_WARNING, "Execute of nbscat8k failed\n");
return -1;
_exit(0);
}
static int timed_read(int fd, void *data, int datalen)

32
apps/app_osplookup.c Executable file → Normal file
View File

@@ -216,27 +216,33 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
cause = str2cause(args.cause);
temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
result.handle = -1;
if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "SUCCESS");
}
if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.handle) != 1)) {
result.handle = -1;
}
temp = pbx_builtin_getvar_helper(chan, "OSPRESULTS");
if (ast_strlen_zero(temp) || (sscanf(temp, "%d", &result.numresults) != 1)) {
result.numresults = 0;
}
if ((res = ast_osp_next(&result, cause)) > 0) {
char tmp[80];
snprintf(tmp, sizeof(tmp), "%d", result.handle);
pbx_builtin_setvar_helper(chan, "_OSPHANDLE", tmp);
pbx_builtin_setvar_helper(chan, "_OSPTECH", result.tech);
pbx_builtin_setvar_helper(chan, "_OSPDEST", result.dest);
pbx_builtin_setvar_helper(chan, "_OSPTOKEN", result.token);
snprintf(tmp, sizeof(tmp), "%d", result.numresults);
pbx_builtin_setvar_helper(chan, "_OSPRESULTS", tmp);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "SUCCESS");
} else {
if (!res) {
if (result.handle < 0)
ast_log(LOG_NOTICE, "OSP Lookup Next failed for handle '%d'\n", result.handle);
else
ast_log(LOG_DEBUG, "No OSP handle specified\n");
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "FAILED");
} else
ast_log(LOG_DEBUG, "Got hangup on '%s' while doing OSP Next!\n", chan->name);
pbx_builtin_setvar_helper(chan, "OSPNEXTSTATUS", "FAILED");
}
if (!res) {
/* Look for a "busy" place */

48
apps/app_page.c Executable file → Normal file
View File

@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (c) 2004 - 2005 Digium, Inc. All rights reserved.
* Copyright (c) 2004 - 2006 Digium, Inc. All rights reserved.
*
* Mark Spencer <markster@digium.com>
*
@@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/file.h"
#include "asterisk/app.h"
#include "asterisk/chanvars.h"
static const char *tdesc = "Page Multiple Phones";
@@ -55,7 +56,7 @@ static const char *page_descrip =
"caller is dumped into the conference as a speaker and the room is\n"
"destroyed when the original caller leaves. Valid options are:\n"
" d - full duplex audio\n"
" q - quiet, do not play beep to caller\n";
" q - quiet, do not play beep to caller\n";
STANDARD_LOCAL_USER;
@@ -77,13 +78,14 @@ struct calloutdata {
char tech[64];
char resource[256];
char meetmeopts[64];
struct ast_variable *variables;
};
static void *page_thread(void *data)
{
struct calloutdata *cd = data;
ast_pbx_outgoing_app(cd->tech, AST_FORMAT_SLINEAR, cd->resource, 30000,
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, NULL, NULL);
"MeetMe", cd->meetmeopts, NULL, 0, cd->cidnum, cd->cidname, cd->variables, NULL, NULL);
free(cd);
return NULL;
}
@@ -91,6 +93,9 @@ static void *page_thread(void *data)
static void launch_page(struct ast_channel *chan, const char *meetmeopts, const char *tech, const char *resource)
{
struct calloutdata *cd;
const char *varname;
struct ast_variable *lastvar = NULL;
struct ast_var_t *varptr;
pthread_t t;
pthread_attr_t attr;
cd = malloc(sizeof(struct calloutdata));
@@ -101,12 +106,36 @@ static void launch_page(struct ast_channel *chan, const char *meetmeopts, const
ast_copy_string(cd->tech, tech, sizeof(cd->tech));
ast_copy_string(cd->resource, resource, sizeof(cd->resource));
ast_copy_string(cd->meetmeopts, meetmeopts, sizeof(cd->meetmeopts));
AST_LIST_TRAVERSE(&chan->varshead, varptr, entries) {
if (!(varname = ast_var_full_name(varptr)))
continue;
if (varname[0] == '_') {
struct ast_variable *newvar = NULL;
if (varname[1] == '_') {
newvar = ast_variable_new(varname, ast_var_value(varptr));
} else {
newvar = ast_variable_new(&varname[1], ast_var_value(varptr));
}
if (newvar) {
if (lastvar)
lastvar->next = newvar;
else
cd->variables = newvar;
lastvar = newvar;
}
}
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&t, &attr, page_thread, cd)) {
ast_log(LOG_WARNING, "Unable to create paging thread: %s\n", strerror(errno));
free(cd);
}
pthread_attr_destroy(&attr);
}
}
@@ -121,6 +150,7 @@ static int page_exec(struct ast_channel *chan, void *data)
struct ast_app *app;
char *tmp;
int res=0;
char originator[AST_CHANNEL_NAME];
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
@@ -142,12 +172,21 @@ static int page_exec(struct ast_channel *chan, void *data)
return -1;
}
ast_copy_string(originator, chan->name, sizeof(originator));
if ((tmp = strchr(originator, '-')))
*tmp = '\0';
tmp = strsep(&options, "|");
if (options)
ast_app_parse_options(page_opts, &flags, NULL, options);
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw(5)", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
while ((tech = strsep(&tmp, "&"))) {
/* don't call the originating device */
if (!strcasecmp(tech, originator))
continue;
if ((resource = strchr(tech, '/'))) {
*resource++ = '\0';
launch_page(chan, meetmeopts, tech, resource);
@@ -155,6 +194,7 @@ static int page_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
}
}
if (!ast_test_flag(&flags, PAGE_QUIET)) {
res = ast_streamfile(chan, "beep", chan->language);
if (!res)

0
apps/app_parkandannounce.c Executable file → Normal file
View File

9
apps/app_playback.c Executable file → Normal file
View File

@@ -110,6 +110,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
if (chan->_state != AST_STATE_UP) {
if (option_skip) {
/* At the user's option, skip if the line is not up */
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
LOCAL_USER_REMOVE(u);
return 0;
} else if (!option_noanswer)
@@ -137,11 +138,11 @@ static int playback_exec(struct ast_channel *chan, void *data)
}
front = back;
}
if (mres)
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
else
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
}
if (mres)
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "FAILED");
else
pbx_builtin_setvar_helper(chan, "PLAYBACKSTATUS", "SUCCESS");
LOCAL_USER_REMOVE(u);
return res;
}

16
apps/app_privacy.c Executable file → Normal file
View File

@@ -193,13 +193,21 @@ static int privacy_exec (struct ast_channel *chan, void *data)
}
/*Got a number, play sounds and send them on their way*/
if ((retries < maxretries) && res == 1 ) {
if ((retries < maxretries) && res >= 0 ) {
res = ast_streamfile(chan, "privacy-thankyou", chan->language);
if (!res)
res = ast_waitstream(chan, "");
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s\n",phone);
ast_set_callerid (chan, phone, "Privacy Manager", NULL);
/* Clear the unavailable presence bit so if it came in on PRI
* the caller id will now be passed out to other channels
*/
chan->cid.cid_pres &= (AST_PRES_UNAVAILABLE ^ 0xFF);
if (option_verbose > 2) {
ast_verbose (VERBOSE_PREFIX_3 "Changed Caller*ID to %s, callerpres to %d\n",phone,chan->cid.cid_pres);
}
pbx_builtin_setvar_helper(chan, "PRIVACYMGRSTATUS", "SUCCESS");
} else {
if (priority_jump || option_priority_jumping)

742
apps/app_queue.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

7
apps/app_random.c Executable file → Normal file
View File

@@ -82,7 +82,7 @@ static int random_exec(struct ast_channel *chan, void *data)
if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
probint = 0;
if ((random() % 100) + probint > 100) {
if ((random() % 100) + probint >= 100) {
res = ast_parseable_goto(chan, s);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Random branches to (%s,%s,%d)\n",
@@ -116,9 +116,8 @@ char *description(void)
int usecount(void)
{
int res;
STANDARD_USECOUNT(res);
return res;
/* Don't allow unload, since rand(3) depends upon this module being here. */
return 1;
}
char *key()

0
apps/app_read.c Executable file → Normal file
View File

17
apps/app_readfile.c Executable file → Normal file
View File

@@ -95,15 +95,16 @@ static int readfile_exec(struct ast_channel *chan, void *data)
}
}
returnvar = ast_read_textfile(file);
if(len > 0){
if(len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING,"%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
if ((returnvar = ast_read_textfile(file))) {
if (len > 0) {
if (len < strlen(returnvar))
returnvar[len]='\0';
else
ast_log(LOG_WARNING, "%s is longer than %d, and %d \n", file, len, (int)strlen(returnvar));
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
}
pbx_builtin_setvar_helper(chan, varname, returnvar);
free(returnvar);
LOCAL_USER_REMOVE(u);
return res;
}

0
apps/app_realtime.c Executable file → Normal file
View File

41
apps/app_record.c Executable file → Normal file
View File

@@ -41,6 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/dsp.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/app.h"
static char *tdesc = "Trivial Record Application";
@@ -64,7 +65,8 @@ static char *descrip =
" 't' : use alternate '*' terminator key instead of default '#'\n"
"\n"
"If filename contains '%d', these characters will be replaced with a number\n"
"incremented by one each time the file is recorded. \n\n"
"incremented by one each time the file is recorded. A channel variable\n"
"named RECORDED_FILE will also be set, which contains the final filemname.\n\n"
"Use 'show file formats' to see the available formats on your system\n\n"
"User can press '#' to terminate the recording and continue to the next priority.\n\n"
"If the user should hangup during a recording, all data will be lost and the\n"
@@ -183,8 +185,35 @@ static int record_exec(struct ast_channel *chan, void *data)
/* these are to allow the use of the %d in the config file for a wild card of sort to
create a new file with the inputed name scheme */
if (percentflag) {
AST_DECLARE_APP_ARGS(fname,
AST_APP_ARG(piece)[100];
);
char *tmp2 = ast_strdupa(filename);
char countstring[15];
int i;
/* Separate each piece out by the format specifier */
/* AST_NONSTANDARD_APP_ARGS(fname, tmp2, '%'); */
fname.argc = ast_app_separate_args(tmp2, '%', fname.argv, (sizeof(fname) - sizeof(fname.argc)) / sizeof(fname.argv[0]));
do {
snprintf(tmp, sizeof(tmp), filename, count);
int tmplen;
/* First piece has no leading percent, so it's copied verbatim */
ast_copy_string(tmp, fname.piece[0], sizeof(tmp));
tmplen = strlen(tmp);
for (i = 1; i < fname.argc; i++) {
if (fname.piece[i][0] == 'd') {
/* Substitute the count */
snprintf(countstring, sizeof(countstring), "%d", count);
ast_copy_string(tmp + tmplen, countstring, sizeof(tmp) - tmplen);
tmplen += strlen(countstring);
} else if (tmplen + 2 < sizeof(tmp)) {
/* Unknown format specifier - just copy it verbatim */
tmp[tmplen++] = '%';
tmp[tmplen++] = fname.piece[i][0];
}
/* Copy the remaining portion of the piece */
ast_copy_string(tmp + tmplen, &(fname.piece[i][1]), sizeof(tmp) - tmplen);
}
count++;
} while ( ast_fileexists(tmp, ext, chan->language) != -1 );
pbx_builtin_setvar_helper(chan, "RECORDED_FILE", tmp);
@@ -277,6 +306,7 @@ static int record_exec(struct ast_channel *chan, void *data)
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
@@ -295,16 +325,15 @@ static int record_exec(struct ast_channel *chan, void *data)
break;
}
}
}
if (f->frametype == AST_FRAME_VIDEO) {
} else if (f->frametype == AST_FRAME_VIDEO) {
res = ast_writestream(s, f);
if (res) {
ast_log(LOG_WARNING, "Problem writing frame\n");
ast_frfree(f);
break;
}
}
if ((f->frametype == AST_FRAME_DTMF) &&
} else if ((f->frametype == AST_FRAME_DTMF) &&
(f->subclass == terminator)) {
ast_frfree(f);
break;

100
apps/app_rpt.c Executable file → Normal file
View File

@@ -897,55 +897,54 @@ static int telem_lookup(struct ast_channel *chan, char *node, char *name)
static int get_wait_interval(struct rpt *myrpt, int type)
{
int interval;
char *wait_times;
char *wait_times_save;
wait_times_save = NULL;
wait_times = ast_variable_retrieve(cfg, myrpt->name, "wait_times");
if(wait_times){
wait_times_save = ast_strdupa(wait_times);
if(!wait_times_save){
ast_log(LOG_WARNING, "Out of memory in wait_interval()\n");
wait_times = NULL;
}
}
switch(type){
case DLY_TELEM:
if(wait_times)
interval = retrieve_astcfgint(wait_times_save, "telemwait", 500, 5000, 1000);
else
interval = 1000;
break;
case DLY_ID:
if(wait_times)
interval = retrieve_astcfgint(wait_times_save, "idwait",250,5000,500);
else
interval = 500;
break;
case DLY_UNKEY:
if(wait_times)
interval = retrieve_astcfgint(wait_times_save, "unkeywait",500,5000,1000);
else
interval = 1000;
break;
case DLY_CALLTERM:
if(wait_times)
interval = retrieve_astcfgint(wait_times_save, "calltermwait",500,5000,1500);
else
interval = 1500;
break;
default:
return 0;
}
int interval;
char *wait_times;
char *wait_times_save = NULL;
wait_times = ast_variable_retrieve(cfg, myrpt->name, "wait_times");
if (wait_times) {
wait_times_save = ast_strdupa(wait_times);
if (!wait_times_save) {
ast_log(LOG_WARNING, "Out of memory in wait_interval()\n");
wait_times = NULL;
}
}
switch (type) {
case DLY_TELEM:
if (wait_times)
interval = retrieve_astcfgint(wait_times_save, "telemwait", 500, 5000, 1000);
else
interval = 1000;
break;
case DLY_ID:
if (wait_times)
interval = retrieve_astcfgint(wait_times_save, "idwait", 250, 5000, 500);
else
interval = 500;
break;
case DLY_UNKEY:
if (wait_times)
interval = retrieve_astcfgint(wait_times_save, "unkeywait", 500, 5000, 1000);
else
interval = 1000;
break;
case DLY_CALLTERM:
if (wait_times)
interval = retrieve_astcfgint(wait_times_save, "calltermwait", 500, 5000, 1500);
else
interval = 1500;
break;
default:
return 0;
}
return interval;
}
}
/*
@@ -1522,6 +1521,7 @@ pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&tele->threadid,&attr,rpt_tele_thread,(void *) tele);
pthread_attr_destroy(&attr);
return;
}
@@ -2154,6 +2154,7 @@ static int function_autopatchup(struct rpt *myrpt, char *param, char *digitbuf,
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&myrpt->rpt_call_thread,&attr,rpt_call,(void *) myrpt);
pthread_attr_destroy(&attr);
return DC_COMPLETE;
}
@@ -5240,6 +5241,7 @@ char cmd[MAXDTMF+1] = "";
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&myrpt->rpt_call_thread,&attr,rpt_call,(void *)myrpt);
pthread_attr_destroy(&attr);
continue;
}
}
@@ -5782,6 +5784,7 @@ pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&rpt_vars[i].rpt_thread,&attr,rpt,(void *) &rpt_vars[i]);
pthread_attr_destroy(&attr);
}
usleep(500000);
for(;;)
@@ -5817,6 +5820,7 @@ pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
ast_pthread_create(&rpt_vars[i].rpt_thread,&attr,rpt,(void *) &rpt_vars[i]);
pthread_attr_destroy(&attr);
ast_log(LOG_WARNING, "rpt_thread restarted on node %s\n", rpt_vars[i].name);
}

0
apps/app_sayunixtime.c Executable file → Normal file
View File

2
apps/app_senddtmf.c Executable file → Normal file
View File

@@ -50,7 +50,7 @@ static char *synopsis = "Sends arbitrary DTMF digits";
static char *descrip =
" SendDTMF(digits[|timeout_ms]): Sends DTMF digits on a channel. \n"
" Accepted digits: 0-9, *#abcd\n"
" Accepted digits: 0-9, *#abcd, w (.5s pause)\n"
" The application will either pass the assigned digits or terminate if it\n"
" encounters an error.\n";

0
apps/app_sendtext.c Executable file → Normal file
View File

0
apps/app_setcallerid.c Executable file → Normal file
View File

0
apps/app_setcdruserfield.c Executable file → Normal file
View File

0
apps/app_setcidname.c Executable file → Normal file
View File

0
apps/app_setcidnum.c Executable file → Normal file
View File

0
apps/app_setrdnis.c Executable file → Normal file
View File

0
apps/app_settransfercapability.c Executable file → Normal file
View File

9
apps/app_skel.c Executable file → Normal file
View File

@@ -3,7 +3,7 @@
*
* Copyright (C) <Year>, <Your Name Here>
*
* <Your Name Here> <<You Email Here>>
* <Your Name Here> <<Your Email Here>>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -20,7 +20,7 @@
*
* \brief Skeleton application
*
* This is a skeleton for development of an Asterisk application */
* This is a skeleton for development of an Asterisk application
* \ingroup applications
*/
@@ -53,7 +53,7 @@ static char *descrip = "This application is a template to build other applicatio
#define OPTION_C (1 << 2) /* Option C(str) */
#define OPTION_NULL (1 << 3) /* Dummy Termination */
AST_DECLARE_OPTIONS(app_opts,{
AST_APP_OPTIONS(app_opts,{
['a'] = { OPTION_A },
['b'] = { OPTION_B, 1 },
['c'] = { OPTION_C, 2 }
@@ -77,7 +77,6 @@ static int app_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
LOCAL_USER_REMOVE(u);
return -1;
}
@@ -96,7 +95,7 @@ static int app_exec(struct ast_channel *chan, void *data)
if ((argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
dummy = argv[0];
options = argv[1];
ast_parseoptions(app_opts, &flags, opts, options);
ast_app_parse_options(app_opts, &flags, opts, options);
}
if (!ast_strlen_zero(dummy))

33
apps/app_sms.c Executable file → Normal file
View File

@@ -694,7 +694,7 @@ static void sms_readfile (sms_t * h, char *fn)
}
while (fgets (line, sizeof (line), s))
{ /* process line in file */
char *p;
unsigned char *p;
for (p = line; *p && *p != '\n' && *p != '\r'; p++);
*p = 0; /* strip eoln */
p = line;
@@ -1050,7 +1050,7 @@ static void sms_nextoutgoing (sms_t * h)
unsigned char p = 2;
h->omsg[0] = 0x91; /* SMS_DATA */
if (h->smsc) { /* deliver */
h->omsg[p++] = (more ? 4 : 0);
h->omsg[p++] = (more ? 4 : 0) + ((h->udhl > 0) ? 0x40 : 0);
p += packaddress (h->omsg + p, h->oa);
h->omsg[p++] = h->pid;
h->omsg[p++] = h->dcs;
@@ -1178,25 +1178,24 @@ static void sms_messagetx(sms_t * h)
static int sms_generate (struct ast_channel *chan, void *data, int len, int samples)
{
struct ast_frame f = { 0 };
unsigned char waste[AST_FRIENDLY_OFFSET];
#define MAXSAMPLES 800
#ifdef OUTALAW
unsigned char buf[800];
unsigned char *buf;
#else
signed short buf[800];
short *buf;
#endif
#define SAMPLE2LEN sizeof(*buf)
sms_t *h = data;
int i;
if (len > sizeof (buf)) {
ast_log (LOG_WARNING, "Only doing %d bytes (%d bytes requested)\n", (int)(sizeof (buf) / sizeof (signed short)), len);
len = sizeof (buf);
#ifdef OUTALAW
samples = len;
#else
samples = len / 2;
#endif
if (samples > MAXSAMPLES) {
ast_log (LOG_WARNING, "Only doing %d samples (%d requested)\n",
MAXSAMPLES, samples);
samples = MAXSAMPLES;
}
waste[0] = 0; /* make compiler happy */
len = samples * SAMPLE2LEN + AST_FRIENDLY_OFFSET;
buf = alloca(len);
f.frametype = AST_FRAME_VOICE;
#ifdef OUTALAW
f.subclass = AST_FORMAT_ALAW;
@@ -1379,8 +1378,8 @@ static int sms_exec (struct ast_channel *chan, void *data)
ast_copy_string (h.cli, chan->cid.cid_num, sizeof (h.cli));
{
char *d = data,
*p,
unsigned char *p;
unsigned char *d = data,
answer = 0;
if (!*d || *d == '|') {
ast_log (LOG_ERROR, "Requires queue name\n");
@@ -1449,7 +1448,7 @@ static int sms_exec (struct ast_channel *chan, void *data)
d = p;
h.udl = 0;
while (*p && h.udl < SMSLEN)
h.ud[h.udl++] = utf8decode((unsigned char **)&p);
h.ud[h.udl++] = utf8decode(&p);
if (is7bit (h.dcs) && packsms7 (0, h.udhl, h.udh, h.udl, h.ud) < 0)
ast_log (LOG_WARNING, "Invalid 7 bit GSM data\n");
if (is8bit (h.dcs) && packsms8 (0, h.udhl, h.udh, h.udl, h.ud) < 0)

0
apps/app_softhangup.c Executable file → Normal file
View File

7
apps/app_sql_postgres.c Executable file → Normal file
View File

@@ -132,7 +132,7 @@ struct ast_PGSQL_id {
AST_LIST_ENTRY(ast_PGSQL_id) entries;
} *ast_PGSQL_id;
AST_LIST_HEAD(PGSQLidshead,ast_PGSQL_id) PGSQLidshead;
static AST_LIST_HEAD_STATIC(PGSQLidshead,ast_PGSQL_id);
static void *find_identifier(int identifier,int identifier_type) {
struct PGSQLidshead *headp;
@@ -551,11 +551,6 @@ int unload_module(void)
int load_module(void)
{
struct PGSQLidshead *headp;
headp=&PGSQLidshead;
AST_LIST_HEAD_INIT(headp);
return ast_register_application(app, PGSQL_exec, synopsis, descrip);
}

Some files were not shown because too many files have changed in this diff Show More