Commit Graph

17052 Commits

Author SHA1 Message Date
Jeff Peeler 91b4a30be8 (closes issue #13669)
Reported by: pj

Delete file recording if recording terminated from a hangup.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164942 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 22:45:39 +00:00
Terry Wilson 2e59fce6d8 Make a note of the feature request in bug #11157 as per the reporter and oej, and suspend the bug since no one seems to be keen on implementing it any time soon.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 22:31:47 +00:00
Russell Bryant c8da171dd1 Merged revisions 164881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164881 | russell | 2008-12-16 15:38:29 -0600 (Tue, 16 Dec 2008) | 9 lines

Fix an issue where DEBUG_THREADS may erroneously report that a thread 
is exiting while holding a lock.

If the last lock attempt was a trylock, and it failed, it will still be in the
list of locks so that it can be reported.

(closes issue #13219)
Reported by: pj

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:39:15 +00:00
Russell Bryant cf502aa246 Merged revisions 164876 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164876 | russell | 2008-12-16 15:10:44 -0600 (Tue, 16 Dec 2008) | 6 lines

Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.

This is a bug I noticed while looking at the code for app_macro.  This return code
means that another thread has assumed ownership of the channel and it can no longer
be touched.  (I hate this return code with a passion, by the way.)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 21:12:49 +00:00
Russell Bryant 53f788c6b5 Fix build issues on Linux after sysinfo related changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:49:25 +00:00
Joshua Colp fd62012a31 Qualify trumps poke per lmadsen.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:47:31 +00:00
Joshua Colp 92a4edc593 Add configuration options for finer control over how Asterisk handles having to poke all peers at seemingly the same time.
(closes issue #13217)
Reported by: cervajs


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:42:33 +00:00
Russell Bryant 0859a4e30c Merged revisions 164806 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164806 | russell | 2008-12-16 14:35:25 -0600 (Tue, 16 Dec 2008) | 9 lines

Add "restart gracefully" to the AMI blacklist of CLI commands.  

"module unload" was already identified as a command that can not be used 
from the AMI.  "restart gracefully" effectively unloads all modules, and will 
run in to the same problems.

(closes issue #13894)
Reported by: kernelsensei

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:41:51 +00:00
Michiel van Baak d2d96b10ac introduce 'core show sysinfo' for systems that dont have the Linux-ish sysinfo stuff but do have sysctl.
(closes issue #13433)
Reported by: mvanbaak
Patches:
      2008121300_sysinfosysctl.diff.txt uploaded by mvanbaak (license 7)
	  with two free calls replaced with ast_free based on feedback on reviewboard
Review:
      http://reviewboard.digium.com/r/91/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:08:34 +00:00
Steve Murphy 9de00f16f6 (closes issue #14076)
Reported by: toc
Tested by: murf

OK, Well this issue has had its share of flip-flopping.
I found the following:

1. the code in question, in ext_cmp1 in pbx.c, would not
allow two extensions that vary only by any dashes contained
within them, to be defined in the same context.

2. for input dialstrings, dashes are NOT ignored.
So, skipping them when sorting patterns seemed a bit silly.
Thus, you might declare ext 891 in a context, but
if you try dialing 8-9-1, it will NOT match 891.

So, I proposed to remove the code from ext_cmp1 to 
skip the spaces and dashes. Just kept us from 
declaring 891 and 8-9-1 in the same context,
forcing users to generate otherwise uselessly
obfuscated dialplan code to get the same effect.

Then, I tried out 1.4, and found that:

1. you can declare 891 and 8-9-1 in the
same context!

2. You can't define 891, and have 8-9-1 match
it! Nor can you define 8-9-1, and have 891
match it!

So, it appears that my proposal simply restores
the pbx to behaving as it did in 1.4.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 20:04:46 +00:00
Tilghman Lesher 326653d5e8 Set up umask as a possible configuration option.
(closes issue #13753)
 Reported by: irroot


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 19:54:11 +00:00
Russell Bryant 556b082522 Merged revisions 164736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164736 | russell | 2008-12-16 11:06:29 -0600 (Tue, 16 Dec 2008) | 14 lines

Fix memory leak and invalid reporting issues with DEBUG_THREADLOCALS.

One issue was that the ast_mutex_* API was being used within the context of the
thread local data destructors.  We would go off and allocate more thread local data
while the pthread lib was in the middle of destroying it all.  This led to a memory 
leak.

Another issue was an invalid argument being provided to the the object_add
API call.

(closes issue #13678)
Reported by: ys
Tested by: Russell

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 17:14:01 +00:00
Joshua Colp 601176cb6e Be more detailed about why the include did not get included.
(closes issue #14071)
Reported by: kshumard
Patches:
      pbx_config.patch.improvederroroutput.txt uploaded by kshumard (license 92)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 16:50:11 +00:00
Russell Bryant 36b1d08dc0 Merged revisions 164672 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164672 | russell | 2008-12-16 09:56:37 -0600 (Tue, 16 Dec 2008) | 11 lines

Fix a memory leak related to the use of the "setvar" configuration option.

The problem was that these variables were being appended to the list of vars
on the sip_pvt every time a re-registration or re-subscription came in.
Since it's just a waste of memory to put them there unless the request was an
INVITE, then the fix is to check the request type before copying the vars.

(closes issue #14037)
Reported by: marvinek
Tested by: russell

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 16:00:29 +00:00
Joshua Colp ec6e4d2f60 When using externhost make sure the port gets set to the bindaddr port if one was not specified in the externhost value itself.
(closes issue #13634)
Reported by: performer


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:44:28 +00:00
Steve Murphy eb73f5673a Merged revisions 164634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164634 | murf | 2008-12-16 08:15:58 -0700 (Tue, 16 Dec 2008) | 5 lines

I added a sentence to clarify why - and ' ' are ignored in patterns
as per bug 14076. Leif says he'll put some stuff about it in the
extensions.conf sample, etc.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:31:54 +00:00
Russell Bryant c76bd59354 Set MINIVM_ACCMESS_STATUS in all cases. Also, remove a variable that was not needed.
(closes issue #14081)
Reported by: pkempgen


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 15:00:27 +00:00
Russell Bryant 1f40479382 Merged revisions 164605 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164605 | russell | 2008-12-16 08:28:10 -0600 (Tue, 16 Dec 2008) | 5 lines

Don't try to change working directory if a directory was not configured.

(closes issue #14089)
Reported by: caspy

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 14:31:02 +00:00
Russell Bryant f546396c0f Fix usage of the DAHDI_VMWI ioctl.
(closes issue #14090)
Reported by: alecdavis
Patches:
      chan_dahdi.VMWI_ioctl.diff.txt uploaded by alecdavis (license 585)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 14:17:45 +00:00
Sean Bright 45bc07c439 Use tables instead of ASCII art. Also change a bit of minor formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-16 01:52:32 +00:00
Russell Bryant 9e65283794 Open a timer before loading configuration so that the trunking configuration option
will take effect.

(closes issue #14082)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 22:25:46 +00:00
Russell Bryant 3ef07d4fd4 Fix log message to refer to the generic timing interface, not DAHDI specifically
(inspired by issue #14082)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 22:22:43 +00:00
Russell Bryant 5a5cb18f54 Make sure we handle a uint32_t payload in ast_frdup()
(closes issue #14080)
Reported by: fnordian
Patches:
      frame.patch uploaded by fnordian (license 110)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 21:53:30 +00:00
Tilghman Lesher e62193f887 Allow disabling pattern match searches within the Realtime dialplan switch.
(closes issue #13698)
 Reported by: fhackenberger
 Patches: 
       20081211__bug13698.diff.txt uploaded by Corydon76 (license 14)
 Tested by: fhackenberger


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 21:17:07 +00:00
Mark Michelson 763d4dcabb Add an 'i' option to app_page. This option works the same as
the 'i' options for app_dial and app_queue, in that they will ignore
any attempts by phones to forward the call.

(closes issue #13977)
Reported by: putnopvut
Patches:
      page_ignore_forwards.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, acunningham



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 20:07:03 +00:00
Mark Michelson 225b056239 Merged revisions 164422 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164422 | mmichelson | 2008-12-15 13:53:08 -0600 (Mon, 15 Dec 2008) | 3 lines

Add the deadlock note to ast_spawn_extension as well


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:53:29 +00:00
Mark Michelson c855c2c381 Merged revisions 164416 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164416 | mmichelson | 2008-12-15 13:45:07 -0600 (Mon, 15 Dec 2008) | 4 lines

Add notes to autoservice and pbx doxygen regarding a potential
deadlock scenario so that it is avoided in the future


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:51:24 +00:00
Tilghman Lesher 42e26ee700 Revert ast_str opacity in chan_sip for now, since something wasn't quite right
in the merge.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:48:02 +00:00
Steve Murphy 203e224bcb I was getting this warning during a compile
on a 64-bit machine running ubuntu server 8.10, 
and gcc-4.3.2:

   [CXXi] chan_vpb.ii -> chan_vpb.oo
cc1plus: warnings being treated as errors
In file included from /home/murf/asterisk/trunk/include/asterisk/utils.h:671,
                 from chan_vpb.cc:46:
/home/murf/asterisk/trunk/include/asterisk/strings.h: In function ‘char* ast_str_truncate(ast_str*, ssize_t)’:
/home/murf/asterisk/trunk/include/asterisk/strings.h:479: error: comparison between signed and unsigned integer expressions
make[1]: *** [chan_vpb.oo] Error 1
make: *** [channels] Error 2

which this fix silences



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 19:42:05 +00:00
Joshua Colp ae30bbf43d Merged revisions 164350 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r164350 | file | 2008-12-15 14:11:21 -0400 (Mon, 15 Dec 2008) | 6 lines
  
  Do not try to unlock a non-existant channel if the transfer fails.
  (closes issue #13800)
  Reported by: dwagner
  Patches:
        asterisk-1.4.22-chan-sip-nullp.patch uploaded by tweety (license 608)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 18:12:24 +00:00
Tilghman Lesher b584784f85 When querying for the structure of the CDR table, remove the schema, if it
exists.
(Closes issue #14058)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 18:09:58 +00:00
Joshua Colp 88a36d9e0f Blocked revisions 164343 via svnmerge
........
  r164343 | file | 2008-12-15 13:43:59 -0400 (Mon, 15 Dec 2008) | 4 lines
  
  Use autoconf logic to determine whether the system has timersub or not. Do not blindly assume Solaris does not.
  (closes issue #13838)
  Reported by: ano
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 17:46:32 +00:00
Joshua Colp d330d3e210 Use ast_seekstream to return the file stream back to the beginning instead of directly seeking to zero. This is because some audio formats have headers at the front that need to be skipped, which will be done by the format module.
(closes issue #14079)
Reported by: elguero


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 17:24:28 +00:00
Russell Bryant 808a5fda59 Fix a couple more build issues related to ast_str_opaque
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 17:21:38 +00:00
Russell Bryant 1238488319 When a reload is issued, always process the configuration for dundi.conf.
The reason is that a reload can be used to refresh DNS lookups for defined peers.
Even if the config file hasn't changed, we want to process it for that purpose.

(closes issue #13776)
Reported by: kombjuder


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:17:55 +00:00
Mark Michelson 00c40264b7 Fix a compile warning and a logic error that could have been bad
for non-realtime queues



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:16:47 +00:00
Mark Michelson 8a2cf30830 Fix up a few issues with regards to queues
* Fix reference counting used in the __queues_show function
* Add code to be sure that the "queue show" command does not
  print information for a realtime queue which has been deleted
  from the backend
* Add a missing unref to the realtime queue loading function for
  the case where a queue is in the module's container but has been
  deleted from the realtime backend

(closes issue #14033)
Reported by: cristiandimache
Patches:
      14033.patch uploaded by putnopvut (license 60)
Tested by: cristiandimache



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 16:10:43 +00:00
Joshua Colp 8be6bc5f67 Make app_fax compatible with newer versions of spandsp. This remains backwards compatible with earlier versions though so do not fret.
(closes issue #14073)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:41:22 +00:00
Joshua Colp 6df30fb8cc Update to work with new ast_str changes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:21:23 +00:00
Joshua Colp d3bc7ee188 Blocked revisions 164204 via svnmerge
........
  r164204 | file | 2008-12-15 11:05:08 -0400 (Mon, 15 Dec 2008) | 4 lines
  
  Can we try not to assign an unsigned int to -1?
  (closes issue #14074)
  Reported by: wetwired
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 15:06:38 +00:00
Russell Bryant c9eb01c899 Merged revisions 164201 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r164201 | russell | 2008-12-15 08:31:37 -0600 (Mon, 15 Dec 2008) | 31 lines

Handle a case where a call can be bridged to a channel that is still ringing.

The issue that was reported was about a case where a RINGING channel got 
redirected to an extension to pick up a call from parking.  Once the parked 
call got taken out of parking, it heard silence until the other side answered.  
Ideally, the caller that was parked would get a ringing indication.  This patch
fixes this case so that the caller receives ringback once it comes out of 
parking until the other side answers.

The fixes are:

 - Make sure we remember that a channel was an outgoing channel when doing 
   a masquerade.  This prevents an erroneous ast_answer() call on the channel,
   which causes a bogus 200 OK to be sent in the case of SIP.

 - Add some additional comments to explain related parts of code.

 - Update the handling of the ast_channel visible_indication field.  Storing 
   values that are not stateful is pointless.  Control frames that are events 
   or commands should be ignored.

 - When a bridge first starts, check to see if the peer channel needs to be 
   given ringing indication because the calling side is still ringing.

 - Rework ast_indicate_data() a bit for the sake of readability.

(closes issue #13747)
Reported by: davidw
Tested by: russell
Review: http://reviewboard.digium.com/r/90/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 14:40:24 +00:00
Russell Bryant bca058070e Fix build WRT ast_str_opaque
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164202 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 14:40:08 +00:00
Tilghman Lesher c31cbd7f1a Don't pass a negative to an unsigned type and expect things to work correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-14 18:16:28 +00:00
Sean Bright c0fc8edbbd Use a \picture instead of ASCII art.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-14 15:26:37 +00:00
Tilghman Lesher 80e6fd4e68 Blocked revisions 164082 via svnmerge
........
  r164082 | tilghman | 2008-12-13 17:22:02 -0600 (Sat, 13 Dec 2008) | 9 lines
  
  Change the default calldurationlimit from the special value 0 to -1, so we
  can better detect an exceptional case.  This follows on to the changes made
  in revision 156386.  Related to issue #13851.
  (closes issue #13974)
   Reported by: paradise
   Patches: 
         20081208__bug13974.diff.txt uploaded by Corydon76 (license 14)
   Tested by: file, blitzrage, ZX81
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 23:24:09 +00:00
Sean Bright 1a4a30aaea Use ast_str_strlen() instead of recalculating the string length.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164054 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 18:25:58 +00:00
Michiel van Baak 517afad041 nuke another use of the ast_str internals.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 13:26:13 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Sean Bright 3b96ae826e This shouldn't have gotten commited. We might want to generate this into a separate file instead of the version controlled one.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 03:03:15 +00:00
Sean Bright 3f12b282b6 Use actual tables instead of ASCII art ones.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 03:00:26 +00:00