Commit Graph

13859 Commits

Author SHA1 Message Date
Olle Johansson
abc434d772 Initialize notify_types to NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@242226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-22 09:19:30 +00:00
Alec L Davis
8760ab77f9 Add Dialed Number Identifier (DNID) field to cdr.
Branch support, retains ABI, if backend CDR collector is adaptive then database
requires 'dnid' field to be added, otherwise no functional changes.

  Reported by: alecdavis
  Tested by: alecdavis
  Patch
	 cdr_dnid.diff2.txt uploaded by alecdavis (license 585)

Review: https://reviewboard.asterisk.org/r/455/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@242142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-22 01:48:10 +00:00
Sean Bright
68f261cc9d Fix configure check for PTHREAD_ONCE_INIT when manually adding -Wall to CFLAGS.
(closes issue #16666)
Reported by: romain_proformatique


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-21 15:25:46 +00:00
Tilghman Lesher
df56d04848 Guard against division by zero.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-21 05:53:17 +00:00
David Vossel
3cb482a4a6 fixes parsing error in Makefile.
Some echo lines were missing "; . Thanks to jparker for pointing out
the problem. 



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-20 20:00:04 +00:00
Sean Bright
fd6b867c14 Modify fix for issue 16554 to be more inline with what is already in trunk.
I should have taken a closer look at trunk/1.6.x, as this bug has already been
fixed in a much more simple manner, by just settings o->vars to NULL after the
ast_pbx_outgoing_* calls.

(issue #16554)
Reported by: mav3rick


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-20 14:12:45 +00:00
Sean Bright
0f6892b1a8 Fix a memory leak in pbx_spool when using SetVar in a call file.
In pbx_spool, when we are freeing our 'outgoing' struct, we weren't deallocating
the ast_variable list we had built from SetVars in a call file.  Adding a call to
ast_variables_destroy in our deallocation routine works, but only if the variables
have not already been passed into ast_pbx_outgoing_app() or _exten(), both of
which take care of destroying the variable list for us.

(closes issue #16554)
Reported by: mav3rick
Patches:
      issue16554_20100119.patch uploaded by seanbright (license 71)
Tested by: mav3rick


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-20 14:06:49 +00:00
Alec L Davis
8f672dd98b Update CDR variables as pbx starts
Allows CDR variables added in cdr.c:set_one_cid to become visable during the call,
by executing ast_cdr_update() early in __ast_pbx_run.

Based on cdr_update.diff3.txt

(issue #16638)
Reported by: alecdavis
Patches: 
      cdr_update.diff3.txt uploaded by alecdavis (license 585)
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-20 09:38:09 +00:00
Jason Parker
0b536b5632 Allow parallel make (-j) to work properly.
1.4 changes are quite different from the others.

(issue #16489)
Reported by: Chainsaw
Tested by: qwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-19 17:41:00 +00:00
Jeff Peeler
68e271504f Fix deadlock in agent_read by removing call to agent_logoff.
One must always lock the agents list lock before the agent private. agent_read
locks the private immediately, so locking the agents list lock is not an
option (which is what agent_logoff requires). Because agent_read already 
has access to the agent private all that is necessary is to do the required
hanging up that agent_logoff performed.

(closes issue #16321)
Reported by: valon24
Patches: 
      bug16321.patch uploaded by jpeeler (license 325)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-19 17:22:18 +00:00
Sean Bright
1926da52e7 Plug a memory leak when reading configs with their comments.
While reading through configuration files with the intent of returning their
full contents (comments specifically) we allocated some memory and then forgot
to free it.  This doesn't fix 16554 but clears up a leak I had in the lab.

(issue #16554)
Reported by: mav3rick
Patches:
      issue16554_20100118.patch uploaded by seanbright (license 71)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@241015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 19:54:19 +00:00
David Vossel
7e7e6da09e updated transmit_silence option documentation in asterisk.conf
This patch updates the transmit_silence option to better document
why the option exists, and what it affects.  Thanks to russell
for providing the verbage for this update.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@240891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 16:51:35 +00:00
Olle Johansson
1899d58b60 Fix muted compilation in 1.4 only
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@240768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 13:27:22 +00:00
Russell Bryant
e2a237c4a5 Fix a spelling error in the asterisk.conf sample.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@240547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 23:06:11 +00:00
Tilghman Lesher
fab5527451 Disallow leaving more than maxmsg voicemails.
This is a possibility because our previous method assumed that no messages are
left in parallel, which is not a safe assumption.  Due to the vmu structure
duplication, it was necessary to track in-process messages via a separate
structure.  If at some point, we switch vmu to an ao2-reference-counted
structure, which would eliminate the prior noted duplication of structures,
then we could incorporate this new in-process structure directly into vmu.
(closes issue #16271)
 Reported by: sohosys
 Patches: 
       20100108__issue16271.diff.txt uploaded by tilghman (license 14)
       20100108__issue16271__trunk.diff.txt uploaded by tilghman (license 14)
       20100108__issue16271__1.6.0.diff.txt uploaded by tilghman (license 14)
 Tested by: jsutton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@240414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-15 20:52:27 +00:00
Jeff Peeler
40fed194b6 Fix regression for timed out parked call returning to caller
This issue seems to have been exposed by the fix in 160390 whereby using a
masquerade prevented a crash. The new channel used in the masquerade was
not copying the macro information from the old channel.

(closes issue #15459)
Reported by: djrodman
Patches: 
      patch_15459.txt uploaded by mnick (license )


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@239838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-13 19:43:33 +00:00
David Vossel
6c6a857e1c add silence gen to wait apps
asterisk.conf's 'transmit_silence' option existed before
this patch, but was limited to only generating silence
while recording and sending DTMF. Now enabling the
transmit_silence option generates silence during wait
times as well.
  
To achieve this, ast_safe_sleep has been modified to
generate silence anytime no other generators are present
and transmit_silence is enabled. Wait apps not using
ast_safe_sleep now generate silence when transmit_silence
is enabled as well.

(closes issue 0016524)
Reported by: kobaz

(closes issue 0016523)
Reported by: kobaz
Tested by: dvossel
  
Review: https://reviewboard.asterisk.org/r/456/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@239718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-13 17:16:12 +00:00
Tilghman Lesher
88929fe7ba Portability and other fixes for the safe_asterisk script
(closes issue #16416)
 Reported by: bklang
 Patches: 
       safe_asterisk-compat-1.patch uploaded by bklang (license 919)
       20100106__issue16416__trunk.diff.txt uploaded by tilghman (license 14)
 Tested by: bklang


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@239307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-12 03:18:36 +00:00
Tilghman Lesher
2056583d61 -1 is interpreted as an error, intead of the maximum mask.
(closes issue #16241)
 Reported by: vnovy
 Patches: 
       manager.c.patch uploaded by vnovy (license 922)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-09 00:57:58 +00:00
Jeff Peeler
5be54b36b2 Stop a crash when no peer is passed to masq_park_call.
(distantly related to issue #16406)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-08 23:28:37 +00:00
Matthew Nicholson
c3da049d25 Properly calculate the remaining space in the output string when reducing format strings.
(closes issue #16560)
Reported by: goldwein


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-08 19:20:44 +00:00
David Vossel
fed58bd1d6 fixes crash in "scheduled_destroy" in chan_iax
A signed short was used to represent a callnumber.  This is makes
it possible to attempt to access the iaxs array with a negative
index.

(closes issue #16565)
Reported by: jensvb



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-07 20:14:25 +00:00
David Vossel
a6bc57fe40 Change in sip show channels display format allowing more digits for CID
(closes issue 0016459)
Reported by: Rzadzins
Patches:
      chan_sip_longer_cid.patch uploaded by Rzadzins (license 953)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-07 20:06:00 +00:00
Tilghman Lesher
b2dc944264 Revise documentation on disposition values to the actual values used.
(closes issue #16289)
 Reported by: wdoekes


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-06 21:41:55 +00:00
Russell Bryant
d8cf7e6003 Resolve a crash due to an ast_frame not being fully initialized.
(closes issue #16531)
Reported by: john8675309

(closes SWP-615)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@238009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-06 15:18:22 +00:00
Russell Bryant
e91967f383 Change a NOTICE log message to DEBUG where it belongs.
(closes issue #16479)
Reported by: alexrecarey

(closes SWP-577)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-05 17:13:28 +00:00
Tilghman Lesher
6dd970ce9b Bounds checking for input string
(closes issue #16407)
 Reported by: qwell
 Patches: 
       20100104__issue16407.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 21:45:46 +00:00
Tilghman Lesher
5971279916 Regression in issue #15421 - Pattern matching
(closes issue #16482)
 Reported by: wdoekes
 Patches: 
       astsvn-16482-betterfix.diff uploaded by wdoekes (license 717)
       20091223__issue16482.diff.txt uploaded by tilghman (license 14)
 Tested by: wdoekes, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 20:57:35 +00:00
Tilghman Lesher
2418c3fe1e Add a flag to disable the Background behavior, for AGI users.
This is in a section of code that relates to two other issues, namely
issue #14011 and issue #14940), one of which was the behavior of
Background when called with a context argument that matched the current
context.  This fix broke FreePBX, however, in a post-Dial situation.
Needless to say, this is an extremely difficult collision of several
different issues.  While the use of an exception flag is ugly, fixing all
of the issues linked is rather difficult (although if someone would like
to propose a better solution, we're happy to entertain that suggestion).
(closes issue #16434)
 Reported by: rickead2000
 Patches: 
       20091217__issue16434.diff.txt uploaded by tilghman (license 14)
       20091222__issue16434__1.6.1.diff.txt uploaded by tilghman (license 14)
 Tested by: rickead2000


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 18:19:00 +00:00
Tilghman Lesher
30dda27b8a It's also possible for the Local channel to directly execute an Application.
Reviewboard: https://reviewboard.asterisk.org/r/452/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 16:18:59 +00:00
Olle Johansson
789554011a Release memory of the contact acl before unloading module
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@237135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-02 09:52:30 +00:00
Tilghman Lesher
e943496e84 Don't queue frames to channels that have no means to process them.
(closes issue #15609)
 Reported by: aragon
 Patches: 
       20091230__issue16521__1.4__chan_local_only.diff.txt uploaded by tilghman (license 14)
 Tested by: aragon
 
Review: https://reviewboard.asterisk.org/r/452/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-30 21:57:10 +00:00
Jeff Peeler
09b640d157 Remove conflicting function definitions (asterisk.h) so LOW_MEMORY compiles.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-30 20:25:11 +00:00
Sean Bright
f1e72bf7c7 Try a test compile to see if PTHREAD_ONCE_INIT requires extra braces.
There was conditional code (based on build platform) to optioinally wrap
PTHREAD_ONCE_INIT in braces that was removed since it is fixed in newer versions
of Solaris/OpenSolaris, but I am still running into it on Solaris 10 x86 so add
a configure-time check for it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-28 15:12:08 +00:00
Sean Bright
3d20d25e4c Avoid a crash with large numbers of MeetMe conferences.
Similar to changes made to Queue(), when we have large numbers of conferences in
meetme.conf (1000s) and we use alloca()/strdupa(), we can blow out the stack and
crash, so instead just use a single fixed buffer.

(closes issue #16509)
Reported by: Kashif Raza
Patches:
      20091223_16509.patch uploaded by seanbright (license 71)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-28 12:43:36 +00:00
Tilghman Lesher
41db2479de Turn on colors in the daemon, since there's many requests for it on Ubuntu.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-27 18:19:38 +00:00
Kevin P. Fleming
229850eaca update to latest releases with zero uid/gid
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-26 15:26:17 +00:00
Matthew Nicholson
77c0c82575 Properly set T.38 attributes and don't return before T.38 ports are configured when T.38 is found but no audio stream is found.
(closes issue #16318)
Reported by: bird_of_Luck
Patches:
      t38-sdp-parsing-fix3.diff uploaded by mnicholson (license 96), written by vrban and mnicholson
Tested by: vrban, mihaill


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-23 15:21:28 +00:00
Tilghman Lesher
b317f3ce7f If EXEC only gets a single argument, don't crash when the second is used.
(closes issue #16504)
 Reported by: bklang


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-23 02:55:24 +00:00
David Vossel
af1319f400 fixes issue with p->method incorrectly set to ACK
It is possible for a second ACK to come in for a retransmitted message.
If an ack does not match an unacked message in our queue, restore the previous
p->method as this ACK is completely ignored.

(closes issue #16295)
Reported by: omolenkamp
Patches:
      issue16295_v2.diff uploaded by dvossel (license 671)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@236062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-22 16:58:19 +00:00
Jeff Peeler
7c1c1ffa82 Change Monitor to not assume file to write to does not contain pathing.
227944 changed the fname_base argument to always append the configured monitor
path. This change was necessary to properly compare files for uniqueness. 
If a full path is given though, nothing needs to be appended and that is
handled correctly now.

(closes issue #16377)
(closes issue #16376)
Reported by: bcnit
Patches:
      res_monitor.c-issue16376-1.patch uploaded by dant (license 670)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-21 19:43:41 +00:00
Tilghman Lesher
66b2f4192a Send parking lot announcement to the channel which parked the call, not the park-ee.
(closes issue #16234)
 Reported by: yeshuawatso
 Patches: 
       20091210__issue16234.diff.txt uploaded by tilghman (license 14)
       20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
 Tested by: yeshuawatso


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-21 16:45:03 +00:00
Tilghman Lesher
fa481dec38 Revise verbiage, per #asterisk-dev discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-18 22:39:30 +00:00
Jeff Peeler
8291fb5083 Correct CDR dispositions for BUSY/FAILED
This patch is simple in that it reorders the disposition defines so that the fix
for issue 12946 works properly (the default CDR disposition was changed to
AST_CDR_NOANSWER). Also, the AST_CDR_FLAG_ORIGINATED flag was set in ast_call to
ensure all CDR records are written.

The side effects of CDR changes are scary, so I'm documenting the test cases
performed to attempt to catch any regressions. The following tests were all
performed using 1.4 rev 195881 vs head (235571) + patch:

A calls B
C calls B (busy)
Hangup C
Hangup A

(Both SIP and features)
A calls B
A blind transfers to C
Hangup C

(Both SIP and features)
A calls B
A attended transfers to C
Hangup C

A calls B
A attended transfers to C (SIP)
C blind transfers to A (features)
Hangup A

All of the test scenario CDRs matched.

The following tests were performed just with the patch to ensure proper operation
(with unanswered=yes):

exten =>s,1,Answer
exten =>s,n,ResetCDR(w)
exten =>s,n,ResetCDR(w)

exten =>s,1,ResetCDR(w)
exten =>s,n,ResetCDR(w)

(closes issue #16180)
Reported by: aatef
Patches: 
      bug16180.patch uploaded by jpeeler (license 325)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-18 22:29:51 +00:00
Tilghman Lesher
e43b231647 Point to the typical missing package, not the cryptic "termcap support".
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-18 21:18:16 +00:00
Tilghman Lesher
b31263e5b9 Use context from which Macro is executed, not macro context, if applicable.
Also, ensure that the extension COULD match, not just that it won't match more.
(closes issue #16113)
 Reported by: OrNix
 Patches: 
       20091216__issue16113.diff.txt uploaded by tilghman (license 14)
 Tested by: OrNix


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-17 17:17:51 +00:00
Jared Smith
2594e9891a Add a line showing that we can use CIDR notation.
patch by jsmith, after discussion with jtodd


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 21:07:55 +00:00
Tilghman Lesher
d7d29ea864 Mandatory argument checking
(closes issue #16446)
 Reported by: nicchap


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@235052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 15:29:24 +00:00
Tilghman Lesher
44ffc646b3 Deal with the situation where .flavor exists but .version does not.
Also make the script slightly more portable, in keeping with autoconf syntax.
(closes issue #14737)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@234699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-14 21:09:56 +00:00
Leif Madsen
33d128738c Update IMAP build documentation.
Update the IMAP build documentation to show how to build on 64-bit
platforms.


(issue #16433)
Reported by: shrift
Tested by: lmadsen

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@234615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-14 17:05:01 +00:00