Commit Graph

1976 Commits

Author SHA1 Message Date
Brett Bryant 86e5bb8b7d Fix magic Revision keywords in hashtab.c and change cdr_radius.c to use
the same keyword as the other files (patch by eliel).

(closes issue #13104)
Reported by: eliel
Patches:
      revision.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 17:55:41 +00:00
Tilghman Lesher c6081ee253 Merged revisions 131988 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131988 | tilghman | 2008-07-18 12:10:01 -0500 (Fri, 18 Jul 2008) | 2 lines

Oops

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 17:10:34 +00:00
Tilghman Lesher 7575be9da1 Merged revisions 131985 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131985 | tilghman | 2008-07-18 11:46:23 -0500 (Fri, 18 Jul 2008) | 2 lines

Preserve ABI compatibility with last change

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:48:18 +00:00
Tilghman Lesher 3fa9ad3d13 Merged revisions 131970 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131970 | tilghman | 2008-07-18 11:30:31 -0500 (Fri, 18 Jul 2008) | 2 lines

Make the ast_assert call within ast_sched_del report something useful.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:33:56 +00:00
Kevin P. Fleming 9a08061ea3 Merged revisions 131921 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131921 | kpfleming | 2008-07-18 11:15:41 -0500 (Fri, 18 Jul 2008) | 2 lines

remove the dlfcn compatibility stuff, because no platforms that Asterisk currently runs on it use it, and it doesn't build anyway

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 16:16:12 +00:00
Brett Bryant d032448c61 Merged revisions 131915 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131915 | bbryant | 2008-07-18 10:34:42 -0500 (Fri, 18 Jul 2008) | 4 lines

Fix a bug in blind transfers where the BLINDTRANSFER variable isn't always set to the other end of the blind transfer.

(closes issue #12586)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 15:38:22 +00:00
Brett Bryant aca8e1abe9 Fix a memory leak in register_group_feature when attempting to register
a feature without specifying a group or feature to register.

(closes issue #13101)
Reported by: eliel
Patches:
      features.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 18:14:42 +00:00
Tilghman Lesher 1517710d7e Change several 'core' commands to be 'dialplan' commands (with appropriate
deprecation, of course)
(closes issue #13016)
 Reported by: caio1982
 Patches: 
       dialplan_globals6.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-17 14:00:27 +00:00
Brett Bryant 35e5f434aa Fixes an issue with "core show sysinfo" that used the wrong operator to
calculate the number of bytes from a sysinfo structure.
unsigned long.

(closes issue #13057)
Reported by: eliel
Patches:
      asterisk.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 21:24:18 +00:00
Tilghman Lesher e9bd35a0fe Fix rotate strategy
(Closes issue #13086)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-16 00:52:48 +00:00
Steve Murphy a1fe3d917f (closes issue #12960)
Reported by: mnicholson

Spent most of the day on this bug, and the
solution was so simple. Just had to find and
understand the problem.

The problem was, that the routine to copy
the existing switches, includes, and ignorepats
from the old context to the new one, wasn't
getting called when the context is already 
existent. (In other words, if AEL is adding
a new context to the mix, they get copied,
but if pbx_config already defined a context,
then the copy wasn't happening. This made
no sense, so I moved the call to copy the 
includes & etc, no matter the case.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 23:36:19 +00:00
Tilghman Lesher 49715c05f1 Merged revisions 130959 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130959 | tilghman | 2008-07-15 12:19:13 -0500 (Tue, 15 Jul 2008) | 8 lines

astman_send_error does not need a newline appended -- the API takes care of
that for us.
(closes issue #13068)
 Reported by: gknispel_proformatique
 Patches: 
       asterisk_1_4_astman_send.patch uploaded by gknispel (license 261)
       asterisk_trunk_astman_send.patch uploaded by gknispel (license 261)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 18:25:34 +00:00
Michiel van Baak af63bd58b7 Merged revisions 131012 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r131012 | mvanbaak | 2008-07-15 19:47:15 +0200 (Tue, 15 Jul 2008) | 7 lines

remove 4 lines of redundant code.

(closes issue #13080)
Reported by: gknispel_proformatique
Patches:
      trunk_ast_cdr_setapp.patch uploaded by gknispel (license 261)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-15 17:49:48 +00:00
Mark Michelson 88718801b3 Fix a memory leak in the case that /dev/null cannot be
opened when running startup commands from cli.conf

(closes issue #13066)
Reported by: eliel
Patches:
      asterisk.c.patch uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 22:22:57 +00:00
Michiel van Baak 7152eba18d Merged revisions 130735 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130735 | mvanbaak | 2008-07-14 19:10:21 +0200 (Mon, 14 Jul 2008) | 10 lines

notify the user that dnsmgr refresh wont work when dnsmgr is not enabled.
Previously this command would automagically appear and disappear.
This was confusing.

(closes issue #12796)
Reported by: chappell
Patches:
      dnsmgr_refresh_3.diff uploaded by chappell (license 8)
Tested by: russell, chappell, mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 17:21:18 +00:00
Russell Bryant c4c3e2f875 Merged revisions 130634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130634 | russell | 2008-07-14 05:38:14 -0500 (Mon, 14 Jul 2008) | 2 lines

Bump up the debug level for a message.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14 10:39:23 +00:00
Michiel van Baak e58fecde43 Merged revisions 130573 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130573 | mvanbaak | 2008-07-14 00:48:51 +0200 (Mon, 14 Jul 2008) | 8 lines

fix memory leak when originate from manager cannot create a thread

(closes issue #13069)
Reported by: gknispel_proformatique
Patches:
      asterisk_trunk_action_originate.patch uploaded by gknispel (license 261)
	  Tested by: gknispel_proformatique, mvanbaak

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 22:50:31 +00:00
Steve Murphy 42942b790d (closes issue #13041)
Reported by: eliel

OK, now the context registrar slot is strdup'd. It is freed
on destruction. I don't see the need to do this with all
the structs' registrar fields, but if some wild case proves
they should also be handled this way, then we can 
put in the extra work at that time.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 22:03:19 +00:00
Mark Michelson 1a7806c836 Merged revisions 130236 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130236 | mmichelson | 2008-07-11 15:03:23 -0500 (Fri, 11 Jul 2008) | 3 lines

Remove redundant logic


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 20:03:55 +00:00
Mark Michelson 48d39547ec Merged revisions 130173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r130173 | mmichelson | 2008-07-11 14:13:29 -0500 (Fri, 11 Jul 2008) | 7 lines

Fix a typo in audiohook_read_frame_both.

While this change has not been proven to fix any
specific issue, it is incorrect and could cause
unforeseen problems.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 19:14:15 +00:00
Steve Murphy 2ca242b2ba (closes issue #13041)
Reported by: eliel
Tested by: murf

(closes issue #12960)
Reported by: mnicholson

In this 'omnibus' fix, I **think** I solved both
the problem in 13041, where unloading pbx_ael.so
caused crashes, or incomplete removal of previous
registrar'ed entries. And I added code to completely
remove all includes, switches, and ignorepats that
had a matching registrar entry, which should
appease 12960.

I also added a lot of seemingly useless brackets
around single statement if's, which helped debug 
so much that I'm leaving them there.

I added a routine to check the correlation between
the extension tree lists and the hashtab 
tables. It can be amazingly helpful when you have
lots of dialplan stuff, and need to narrow
down where a problem is occurring. It's ifdef'd
out by default.

I cleaned up the code around the new CIDmatch code.
It was leaving hanging extens with bad ptrs, getting confused
over which objects to remove, etc. I tightened
up the code and changed the call to remove_exten
in the merge_and_delete code.

I added more conditions to check for empty context
worthy of deletion. It's not empty if there are
any includes, switches, or ignorepats present.

If I've missed anything, please re-open this bug,
and be prepared to supply example dialplan code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:24:31 +00:00
Brett Bryant 5b7933fe5e Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054)
Reported by: pabelanger
Patches:
      ARRAY_LEN.patch2 uploaded by pabelanger (license 224)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:09:35 +00:00
Kevin P. Fleming 0024d6846e Merged revisions 129966 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129966 | kpfleming | 2008-07-11 09:03:52 -0500 (Fri, 11 Jul 2008) | 5 lines

fix a flaw found while experimenting with structure alignment and padding; low-fence checking would not work properly on 64-bit platforms, because the compiler was putting 4 bytes of padding between the fence field and the allocation memory block

added a very obvious runtime warning if this condition reoccurs, so the developer who broke it can be chastised into fixing it :-)


........
r129967 | kpfleming | 2008-07-11 09:03:52 -0500 (Fri, 11 Jul 2008) | 5 lines

simplify calculation

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 14:16:15 +00:00
Michiel van Baak 9d5160cc42 Remove deprecated 'show parkedcalls' CLI command
(closes issue #13038)
Reported by: eliel
Patches:
      finish.deprecate.patch uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-10 16:21:16 +00:00
Mark Michelson cd16dca459 Merged revisions 129436 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129436 | mmichelson | 2008-07-09 14:32:20 -0500 (Wed, 09 Jul 2008) | 13 lines

Fix a problem where inbound rfc2833 audio would be sent to the 
core instead of being P2P bridged. When the core regenerated
the rfc2833 packet for the outbound leg, the SSRC would be different
than the RTP audio on the call leg causing DTMF detection issues on
the far end.

(closes issue #12955)
Reported by: tonyredstone
Patches:
      dynamic_rtp.patch uploaded by tsearle (license 373)
Tested by: tonyredstone


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 19:40:30 +00:00
Matthew Fredrickson 0b185a2276 Add Proceeding() application (#13025)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129399 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 15:57:06 +00:00
Sean Bright b2ced9216c Merged revisions 129343 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129343 | seanbright | 2008-07-09 09:41:21 -0400 (Wed, 09 Jul 2008) | 4 lines

Look for the system installed awk instead of assuming it's at /usr/bin/awk.

Pointed out by jmls via #asterisk-dev.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 13:44:43 +00:00
Tilghman Lesher 4ff527903e Code wasn't ready to be merged - see -dev list discussion
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-09 03:39:59 +00:00
Brett Bryant 52e8897977 Fix a bug in SRV lookups where dnsmgr would discard everything but the
first SRV result from DNS before processing weights and priorities and 
dns_parse_answer wouldn't report that there were no records in DNS 
unless a failure occured. Also fixed a bug where dnsmgr_refresh would 
report that a entry was being changed when ast_gethostbyname had failed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 21:00:01 +00:00
Tilghman Lesher 675f3ec348 Reduce length of time that 'asterisk -rx' waits.
(closes issue #13001)
 Reported by: eliel
 Patches: 
       20080708__bug13001.diff.txt uploaded by Corydon76 (license 14)
       20080708__bug13001.diff.txt.fixed uploaded by eliel (license 64)
 Tested by: Corydon76, eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 20:17:08 +00:00
Brett Bryant d185405755 Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@129045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-08 16:40:28 +00:00
Olle Johansson 6f400edeab Changing name of global api call to ast_*
My mistake, pointed out by Russell.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-06 08:28:58 +00:00
Olle Johansson 45e79490ba Implement flags for AGI in the channel structure so taht "show channels" and
AMI commands can display that a channel is under control of an AGI.

Work inspired by work at customer site, but paid for by Edvina AB


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 20:54:30 +00:00
Joshua Colp 945d7022c2 Make this actually evaluate how it was intended to be.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 19:52:54 +00:00
Olle Johansson 0a52297cf0 Add new SIP cli command "sip show channelstats" that displays some QoS data (if we have RTCP reports
and not use the p2p rtp bridge). I could not find a way to detect us using the p2p bridge, which
would be nice.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-05 19:27:42 +00:00
Tilghman Lesher 12e5c68622 Merged revisions 127973 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127973 | tilghman | 2008-07-03 22:30:30 -0500 (Thu, 03 Jul 2008) | 8 lines

Fix the 'dialplan remove extension' logic, so that it a) works with cidmatch,
and b) completes contexts correctly when the extension is ambiguous.
(closes issue #12980)
 Reported by: licedey
 Patches: 
       20080703__bug12980.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@128027 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-04 16:06:34 +00:00
Kevin P. Fleming 6b06e9a8eb Merged revisions 127892,127895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127892 | kpfleming | 2008-07-03 17:18:38 -0500 (Thu, 03 Jul 2008) | 6 lines

a couple of small Solaris-related fixes

(closes issue #11885)
Reported by: snuffy, asgaroth


........
r127895 | kpfleming | 2008-07-03 17:20:16 -0500 (Thu, 03 Jul 2008) | 3 lines

remove this, it has been moved to the main Makefile


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 22:23:04 +00:00
Steve Murphy bc2cfb3e81 Merged revisions 127663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r127663 | murf | 2008-07-02 18:16:25 -0600 (Wed, 02 Jul 2008) | 30 lines

The CDRfix4/5/6 omnibus cdr fixes.

(closes issue #10927)
Reported by: murf
Tested by: murf, deeperror

(closes issue #12907)
Reported by: falves11
Tested by: murf, falves11


(closes issue #11849)
Reported by: greyvoip

As to 11849, I think these changes fix the core problems 
brought up in that bug, but perhaps not the more global
problems created by the limitations of CDR's themselves
not being oriented around transfers.

Reopen if necc, but bug reports are not the best
medium for enhancement discussions. We need to start
a second-generation CDR standardization effort to cover
transfers.

(closes issue #11093)
Reported by: rossbeer
Tested by: greyvoip, murf



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-03 17:16:44 +00:00
Tilghman Lesher 885d17506b Keep ast_app_inboxcount API compatible with 1.6.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 21:27:53 +00:00
Terry Wilson a32369fcd5 Expose the prefix variable so that it can be used by modules depending on http support
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 20:28:17 +00:00
Tilghman Lesher 1bb7334fef Solaris fix
(closes issue #12949)
 Reported by: snuffy
 Patches: 
       bug_12949.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 18:31:11 +00:00
Russell Bryant 3cf77c4c7f Fix a bunch of places where \arg was used instead of \param. Using \arg
to document arguments seems logical, and does work, but is not the best
thing to use.

\arg in doxygen is simply for creating non-nested unordered lists.  \param is
the correct tag to use to document function parameters, and will come out
better in the generated documentation.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 14:50:45 +00:00
Mark Michelson 37db658b1f Place the delay in __ast_answer prior to the channel-specific answer
callback. This change differs from commit 127113 in that now the 
channel is not set to AST_STATE_UP until after the answer callback.

(closes issue #12924)
Reported by: snyfer



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 21:16:00 +00:00
Kevin P. Fleming 8cdb1f7f41 change the process of inserting a delay into the ast_answer() path so that we don't tell the calling channel that it has been answered unutil after the delay; for a single-thread call this won't matter all, but for a dual-thread call (using chan_local) this may fix the problem in issue 12924
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127113 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 19:53:03 +00:00
Luigi Rizzo e2807b69a3 use %p to print a pointer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 12:29:31 +00:00
Sean Bright 8ddc7e949d Pretty up the 'cdr show status' output.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 23:29:56 +00:00
Tilghman Lesher 09c15a0b71 Merged revisions 125793 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125793 | tilghman | 2008-06-27 08:45:03 -0500 (Fri, 27 Jun 2008) | 2 lines

In this debugging function, copy to a buffer instead of using potentially unsafe pointers.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125794 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-27 13:54:13 +00:00
Jason Parker c1e4f50f54 Merged revisions 125587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125587 | qwell | 2008-06-26 18:03:15 -0500 (Thu, 26 Jun 2008) | 1 line

Make sure to unlock the lock_info lock (huh?).  Possible deadlock?
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 23:04:18 +00:00
Tilghman Lesher 7b84cf6fa6 Convert casts to unions, to fix alignment issues on Solaris
(closes issue #12932)
 Reported by: snuffy
 Patches: 
       bug_12932_20080627.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 17:06:17 +00:00
Russell Bryant 02b1317d0f - add get_max_rate timing API call
- change ast_settimeout() to honor max rate in edge cases of file playback
  (this will make some warning messages go away at the end of playing back
   a file)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 15:37:01 +00:00
Tilghman Lesher 84c119cb83 Merged revisions 125276 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125276 | tilghman | 2008-06-26 06:01:21 -0500 (Thu, 26 Jun 2008) | 7 lines

Check for rtcp structure before trying to delete schedule.
(closes issue #12872)
 Reported by: destiny6628
 Patches: 
       20080621__bug12872.diff.txt uploaded by Corydon76 (license 14)
 Tested by: destiny6628

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125277 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26 11:02:11 +00:00
Kevin P. Fleming fd4a60c459 Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 23:05:28 +00:00
Dwayne M. Hubbard 468ae8efcb make solaris happy...pointed out by snuff-home on IRC
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-23 15:24:05 +00:00
Tilghman Lesher f5a6e39bf8 Merged revisions 124395 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r124395 | tilghman | 2008-06-20 17:02:55 -0500 (Fri, 20 Jun 2008) | 3 lines

If the last character in a string to be parsed is the delimiter, then we should
count that final empty string as an additional argument.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-20 22:04:37 +00:00
Mark Michelson a2333afed6 Change references to doc/channelvariables.txt to
doc/tex/channelvariables.tex.

This issue came up on the asterisk-dev mailing list.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-20 16:30:18 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Tilghman Lesher 27be0a3197 Make OpenBSD compile again
(reported by mvanbaak via IRC -dev)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124102 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:25:37 +00:00
Brett Bryant b4574d2a79 Add errors that report any locks held by threads when they are being closed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 19:48:26 +00:00
Russell Bryant fa4bce7c43 - Make res_timing_pthread allow a max rate of 100/sec instead of 50/sec
- change the "timing test" CLI command to let you specify a timing rate to test


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 18:30:49 +00:00
Tilghman Lesher 56654fc0f2 Merged revisions 123930 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123930 | tilghman | 2008-06-19 11:58:19 -0500 (Thu, 19 Jun 2008) | 5 lines

Change informative messages to use the _multiple variant when multiple formats
are possible.
(Closes issue #12848)
Reported by klaus3000

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 17:02:54 +00:00
Tilghman Lesher 284ae601c3 Merged revisions 123869 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123869 | tilghman | 2008-06-19 11:07:23 -0500 (Thu, 19 Jun 2008) | 6 lines

The RDTSC instruction was introduced on the Pentium line of microprocessors,
and is not compatible with certain 586 clones, like Cyrix.  Hence, asking for
i386 compatibility was always incorrect. See http://en.wikipedia.org/wiki/RDTSC
(Closes issue #12886)
Reported by tecnoxarxa

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 16:08:29 +00:00
Tilghman Lesher a06ab7b648 Merged revisions 123769 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123769 | tilghman | 2008-06-18 17:08:30 -0500 (Wed, 18 Jun 2008) | 8 lines

Add support for saying numbers in Hebrew.
(closes issue #11662)
 Reported by: greenfieldtech
 Patches: 
       say.c.patch-12042008 uploaded by greenfieldtech (license 369)
       Hebrew-Sounds.ods uploaded by greenfieldtech
       (with signficant changes to the spreadsheet by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-18 22:17:17 +00:00
Brett Bryant 8d353eb15a Fix a crash in tcp and tls connections related to reference counts.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123692 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-18 20:07:56 +00:00
Brett Bryant 99757cdb70 Revert a previous regression in astobj2.c from merging a branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 22:24:45 +00:00
Brett Bryant 2aae0ba13d Updates all usages of ast_tcptls_session_instance to be managed by reference counts so that they only get destroyed when all threads are done using
them, and memory does not get free'd causing strange issues with SIP. 

This code was originally written by russellb in the team/group/issue_11972/ branch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 21:46:57 +00:00
Mark Michelson b0b8bcd3b2 Put quotes around "test"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 21:33:40 +00:00
Mark Michelson fb3564de50 _ys pointed out in #asterisk-bugs that he was experiencing
a memory leak when running the astobj2 test CLI command. After
searching, it appears the leak was in the command handler itself.

Each object was allocated (recount = 1) and then linked into
a container (refounct = 2). Then at the end of the function, 
the container was unreffed, causing all the objects to have
their refcount decremented by one, leaving the refcount for
all objects allocated in that function at 1. I've now added
an extra unref to the mix so that the refcount equals zero
when the container is unreffed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 21:26:31 +00:00
Mark Michelson 6a9a22f32f Add the same fix from revision 123271 to container_destruct_debug.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123456 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 20:19:49 +00:00
Tilghman Lesher 6d5b1d76ab If we don't match registrar when destroying a context, it can cause a crash.
(closes issue #12835)
 Reported by: ys
 Patches: 
       pbx.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 18:23:01 +00:00
Russell Bryant 8b1646163d Merged revisions 123271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r123271 | russell | 2008-06-17 10:48:31 -0500 (Tue, 17 Jun 2008) | 4 lines

Fix a memory leak in astobj2 that was pointed out by seanbright.  When a container
got destroyed, the underlying bucket list entry for each object that was in the
container at that time did not get free'd.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 15:52:13 +00:00
Doug Bailey 2690378411 Clean up code that handles fsk mwi message generation by pulling it from do_monitor and creating its own thread.
Added RP-AS mwi message generation using patches from meneault as a basis. 

(closes issue #8587)
Reported by: meneault
Tested by: meneault



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 21:42:46 +00:00
Steve Murphy f4c85ebd22 (closes issue #12689)
Reported by: ys

Many thanks to ys for doing the research on this problem.
I didn't think it would be best to unlock the contexts
and then relock them after the remove_extension2() call,
so I added an extra arg to remove_extension2() and set it
appropriately in each call. There were not that many.

I considered forcing the code to lock the contexts before
the call to remove_extension2(), but that would require
a slightly greater degree of changes, especially since
the find_context_locked is local to pbx.c

I did a simple sanity test to make sure the code doesn't
mess things up in general.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 20:43:46 +00:00
Russell Bryant 96ea12126e Add a "timing test" CLI command. It opens a timer and configures it for
50 ticks per second, and then counts to see how many ticks it actually
gets in a second.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 13:03:40 +00:00
Russell Bryant e27a98ce5a - Fix a typo in a timing API call
- Convert the last part of channel.c over to use the timing API.  This would
   not have made a difference when using the dahdi timing module.  I noticed
   it when trying to use another timing source.  Oops.  :)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 12:48:11 +00:00
Mark Michelson 99ea83bbec Merged revisions 122713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122713 | mmichelson | 2008-06-13 16:44:53 -0500 (Fri, 13 Jun 2008) | 9 lines

Short circuit the loop in autoservice_run if there are no channels to poll.
If we continued, then the result would be calling poll() with a NULL
pollfd array. While this is fine with POSIX's poll(2) system call, those
who use Asterisk's internal poll mechanism (Darwin systems) would have
a failed assertion occur when poll is called.

(related to issue #10342)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 21:45:21 +00:00
Tilghman Lesher a82ba57bb4 Convert one more delimiter to use comma.
(closes issue #12850)
 Reported by: bcnit
 Patches: 
       20080613__bug12850.diff.txt uploaded by Corydon76 (license 14)
 Tested by: bcnit


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 14:15:07 +00:00
Russell Bryant b6457ecf4c Merge changes from timing branch
- Convert chan_iax2 to use the timing API
 - Convert usage of timing in the core to use the timing API instead of
   using DAHDI directly
 - Make a change to the timing API to add the set_rate() function
 - change the timing core to use a rwlock
 - merge a timing implementation, res_timing_dahdi

Basic testing was successful using res_timing_dahdi


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-13 12:45:50 +00:00
Jeff Peeler 84d0404ed5 (closes issue 0012193)
Reported by: davidw
Patch by: Corydon76, modified by me to work properly with ParkAndAnnounce app


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 23:08:37 +00:00
Jeff Peeler ef3b214728 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Tilghman Lesher 1af7ea2df1 Merged revisions 122130 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122130 | tilghman | 2008-06-12 10:11:30 -0500 (Thu, 12 Jun 2008) | 4 lines

Occasionally, the alertpipe loses its nonblocking status, so detect and correct
that situation before it causes a deadlock.  (Reported and tested by ctooley
via #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 15:14:37 +00:00
Steve Murphy 86aaed2cc5 Merged revisions 122127 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122127 | murf | 2008-06-12 08:51:44 -0600 (Thu, 12 Jun 2008) | 1 line

Arkadia tried to warn me, but the code added to ast_cdr_busy, _failed, and _noanswer was redundant. Didn't spot it until I was resolving conflicts in trunk. Ugh. Redundant code removed. It wasn't harmful. Just dumb.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 14:56:26 +00:00
Steve Murphy 1cebe01dac Merged revisions 122046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122046 | murf | 2008-06-12 07:47:34 -0600 (Thu, 12 Jun 2008) | 37 lines

(closes issue #10668)
Reported by: arkadia
Tested by: murf, arkadia

Options added to forkCDR() app and the CDR() func to
remove some roadblocks for CDR applications.

The "show application ForkCDR" output was upgraded
to more fully explain the inner workings of forkCDR.

The A option was added to forkCDR to force the
CDR system to NOT change the disposition on the
original CDR, after the fork. This involves
ast_cdr_answer, _busy, _failed, and so on.

The T option was added to forkCDR to force 
obedience of the cdr LOCKED flag in the
ast_cdr_end, all the disposition changing
funcs (ast_cdr_answer, etc), and in the
ast_cdr_setvar func.

The CHANGES file was updated to explain ALL
the new options added to satisfy this bug report
(and some requests made verbally and via 
email, irc, etc, over the past months/year)

The 's' option was added to the CDR() func,
to force it to skip LOCKED cdr's in the
chain.

Again, the new options should be totally transparent
to existing apps! Current behavior of CDR,
forkCDR, and the rest of the CDR system should
not change one little bit. Until you add the
new options, at least!


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 14:28:01 +00:00
Kevin P. Fleming 191081e45f add infrastructure so that timing source can be a loadable module... next steps are to convert channel.c and chan_iax2.c to use this new API, and to move all the DAHDI-specific timing source code into a new res_timing_dahdi module
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122062 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 14:21:32 +00:00
Russell Bryant db960fc830 Don't log not being able to set a default EID. Most people don't care, and
those that do can check their setup using CLI commands.
(closes issue #12839)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@122047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 14:06:38 +00:00
Terry Wilson 65a1460c51 Initialize parkingtime to DEFAULT_PARK_TIME instead of 0
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-11 21:38:40 +00:00
Tilghman Lesher 467c6f5f90 Merged revisions 121861 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121861 | tilghman | 2008-06-11 13:18:16 -0500 (Wed, 11 Jun 2008) | 3 lines

Make calls to ast_assert() actually test something, so that the error message
printed is not nonsensical (reported by mvanbaak via #asterisk-bugs).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-11 18:19:24 +00:00
Mark Michelson f0a019dbec Add an additional sanity check in case an event is passed between
Asterisk boxes with mismatched ie_maps.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 19:52:21 +00:00
Russell Bryant e9d72e0cb2 Merge another big set of changes from team/russell/events
This commit merges in the rest of the code needed to support distributed device
state.  There are two main parts to this commit.

Core changes:
 - The device state handling in the core has been updated to understand device
   state across a cluster of Asterisk servers.  Every time the state of a device
   changes, it looks at all of the device states on each node, and determines the
   aggregate device state.  That resulting device state is what is provided to
   modules in Asterisk that take actions based on the state of a device.

New module, res_ais:
 - A module has been written to facilitate the communication of events between
   nodes in a cluster of Asterisk servers.  This module uses the SAForum AIS
   (Service Availability Forum Application Interface Specification) CLM and EVT
   services (Cluster Management and Event) to handle this task.  This module
   currently supports sharing Voicemail MWI (Message Waiting Indication) and
   device state events between servers.  It has been tested with openais, though
   other implementations of the spec do exist.

For more information on testing distributed device state, see the following doc:
  - doc/distributed_devstate.txt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 15:12:17 +00:00
Russell Bryant 823d1c7ea9 Merge some more changes from team/russell/events
This commit pulls in a batch of improvements and additions to the event API.
Changes include:
 - the ability to dynamically build a subscription.  This is useful if you're
    building a subscription based on something you receive from the network,
    or from options in a configuration file.
 - Add tables of event types and IE types and the corresponding string
    representation for implementing text based protocols that use these
	events, for showing events on the CLI, reading configuration that
	references event information, among other things.
 - Add a table that maps IE types and the corresponding payload type.
 - an API call to get the total size of an event
 - an API call to get all events from the cache that match a subscription
 - a new IE payload type, raw, which I used for transporting the Entity ID in
    my code for handling distributed device state.
 - Code improvements to reduce code duplication
 - Include the Entity ID of the server that originated the event in every event
 - an additional event type, DEVICE_STATE_CHANGE, to help facilitate distributed
    device state.  DEVICE_STATE is a state change on one server, DEVICE_STATE_CHANGE
	is the aggregate device state change across all servers.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 14:53:40 +00:00
Russell Bryant 42c1e3601e Merge another change from team/russell/events
This commit breaks out some logic from pbx.c into a simple API.  The hint
processing code had logic for taking the state from multiple devices and
turning that into the state for a single extension.  So, I broke this out
and made an API that lets you take multiple device states and determine
the aggregate device state.  I needed this for some core device state changes
to support distributed device state.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 14:06:29 +00:00
Joshua Colp 610faf1132 Merged revisions 121442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121442 | file | 2008-06-10 09:52:06 -0300 (Tue, 10 Jun 2008) | 4 lines

Update BRIDGEPEER variable before we do a generic bridge in case we just broke out of a native bridge and fell through to generic.
(closes issue #12815)
Reported by: ramonpeek

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121444 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 12:54:39 +00:00
Russell Bryant f4a8062e93 Merge another change from team/russell/events ...
DUNDi uses a concept called the Entity ID for unique server identifiers.  I have
pulled out the handling of EIDs and made it something available to all of Asterisk.
There is now a global Entity ID that can be used for other purposes as well, such
as code providing distributed device state, which is why I did this.  The global
Entity ID is set automatically, just like it was done in DUNDi, but it can also be
set in asterisk.conf.  DUNDi will now use this global EID unless one is specified
in dundi.conf.

The current EID for the system can be seen in the "core show settings" CLI command.
It is also available in the dialplan via the ENTITYID variable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 12:48:50 +00:00
Russell Bryant a886b6e5e6 Properly initialize the cli_ping condition and lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 00:31:30 +00:00
Russell Bryant c94c4f5572 Change system header includes to be like how it is done in other files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 00:29:01 +00:00
Tilghman Lesher 53459f86b2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:51:59 +00:00
Terry Wilson a6a6821717 Initialize the lock and destroy lock and cond in the destructor (thanks, mmichelson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 22:42:08 +00:00
Russell Bryant 6fd6286a11 arbitrary formatting change to test mantis change
(closes issue #12824)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:55:15 +00:00
Russell Bryant 85a631f767 arbitrary formatting change to test a mantis change
(closes issue #12824)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:53:26 +00:00
Russell Bryant 0bee0c65b2 Minor formatting change to test a mantis change ...
(closes issue #12824)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:48:26 +00:00
Russell Bryant 90cb28f89c Merged revisions 121280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r121280 | russell | 2008-06-09 11:35:40 -0500 (Mon, 09 Jun 2008) | 10 lines

Do not attempt to do emulation if an END digit is received and the length is
less than the defined minimum digit length, and the other end only wants END
digits (SIP INFO, for example).

(closes issue #12778)
Reported by: tsearle
Patches:
      12778.rev1.txt uploaded by russell (license 2)
Tested by: tsearle

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:37:08 +00:00
Tilghman Lesher 2d825ed7de Implement FINDLABEL matching for the new extension matching engine.
(closes issue #12800)
 Reported by: chris-mac
 Patches: 
       20080608__bug12800.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-09 16:35:06 +00:00
Tilghman Lesher ab988ac6f4 Make extension match characters case-insensitive.
(closes issue #12777)
 Reported by: jsmith
 Patches: 
       lower_case_patterns-trunk-v1.patch uploaded by jsmith (license 15)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-06 19:55:08 +00:00
Jeff Peeler 5934801d84 Merged revisions 120863,120885 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120863 | jpeeler | 2008-06-06 10:33:15 -0500 (Fri, 06 Jun 2008) | 3 lines

This fixes a crash when LOW_MEMORY is turned on. Two allocations of the ast_rtp struct that were previously allocated on the stack have been modified to use thread local storage instead.


........
r120885 | jpeeler | 2008-06-06 11:39:20 -0500 (Fri, 06 Jun 2008) | 2 lines

Correction to commmit 120863, make sure proper destructor function is called as well define two thread storage local variables.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-06 17:50:05 +00:00
Steve Murphy d0384ab3aa a small fix for a crash that occurs when compiling AEL with global vars
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 21:34:42 +00:00
Tilghman Lesher 9471b87d27 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 19:07:27 +00:00
Brett Bryant c1451b5537 This patch adds more detailed statistics for RTP channels, and provides an API call to access it, including maximums, minimums, standard deviatinos,
and normal deviations. Currently this is implemented for chan_sip, but could be added to the func_channel_read callbacks for the CHANNEL function 
for any channel that uses RTP.

(closes issue #10590)
Reported by: gasparz
Patches:
      chan_sip_c.diff uploaded by gasparz (license 219)
      rtp_c.diff uploaded by gasparz (license 219)
      rtp_h.diff uploaded by gasparz (license 219)
      audioqos-trunk.diff uploaded by snuffy (license 35)
      rtpqos-trunk-r119891.diff uploaded by sergee (license 138)
Tested by: jsmith, gasparz, snuffy, marsosa, chappell, sergee


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 16:24:19 +00:00
Tilghman Lesher 90d75af346 Conditionally load the AGI command gosub, depending on whether or not res_agi
has been loaded, fix a return value in the loader, and ensure that the help
workhorse header does not print on load.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05 15:58:11 +00:00
Tilghman Lesher 12cf254253 MSet doesn't necessarily need chan to be set
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-04 20:34:52 +00:00
Jeff Peeler 5f9bb7ed02 Merged revisions 120173 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r120173 | jpeeler | 2008-06-03 17:15:33 -0500 (Tue, 03 Jun 2008) | 6 lines

(closes issue #11594)
Reported by: yem
Tested by: yem

This change decreases the buffer size allocated on the stack substantially in config_text_file_load when LOW_MEMORY is turned on. This change combined with the fix from revision 117462 (making mkintf not copy the zt_chan_conf structure) was enough to prevent the crash.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 22:17:07 +00:00
Tilghman Lesher 76506b7baa Move compatibility options into asterisk.conf, default them to on for upgrades,
and off for new installations.  This includes the translation from pipes to commas
for pbx_realtime and the EXEC command for AGI, as well as the change to the Set
application not to support multiple variables at once.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 22:05:16 +00:00
Russell Bryant 51051ce949 Add lock tracking for rwlocks. Previously, lock.h only had the ability to
hold tracking information for mutexes.  Now, the "core show locks" output
will output information about who is holding a rwlock when a thread is
waiting on it.

(closes issue #11279)
Reported by: ys
Patches:
      trunk_lock_utils.v8.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 18:26:51 +00:00
Russell Bryant 8b0ea3a76d Do a deep copy of file and function strings to avoid a potential crash when
modules are unloaded.

(closes issue #12780)
Reported by: ys
Patches:
      logger.diff uploaded by ys (license 281)
	  -- modified by me for coding guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-03 13:29:16 +00:00
Russell Bryant 44e1c94465 Merged revisions 119742 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119742 | russell | 2008-06-02 09:39:45 -0500 (Mon, 02 Jun 2008) | 5 lines

Improve CLI command blacklist checking for the command manager action.  Previously,
it did not handle case or whitespace properly.  This made it possible for blacklisted
commands to get executed anyway.
(closes issue #12765)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119744 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 14:41:55 +00:00
Russell Bryant da85b710ef Fix a minor merge issue that caused a function to not get compiled in with
DEBUG_THREADS like it was supposed to


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 21:51:17 +00:00
Joshua Colp 88a847c4cc Merged revisions 119354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119354 | file | 2008-05-30 16:46:37 -0300 (Fri, 30 May 2008) | 2 lines

Fix a bug I found while testing for another issue.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 19:47:30 +00:00
Russell Bryant f98e98819e Merged revisions 119156 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r119156 | russell | 2008-05-29 17:24:29 -0500 (Thu, 29 May 2008) | 10 lines

Fix a race condition in channel autoservice.  There was still a small window of opportunity
for a DTMF frame, or some other deferred frame type, to come in and get dropped.

(closes issue #12656)
(closes issue #12656)
Reported by: dimas
Patches:
      v3-12656.patch uploaded by dimas (license 88)
	  -- with some modifications by me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 22:28:50 +00:00
Brett Bryant 5b8e1963c5 Adds support for changing logger settingss on remote consoles with a
new command "logger set level". 

i.e. "logger set level debug off"

(closes issue #10891)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 21:30:37 +00:00
Steve Murphy 9107547668 Had to move the ASTERISK_FILE_VERSION decl to just after the include of "asterisk.h"
or you get undefined variable errors when you are compiling under the influence
of MTX_PROFILE



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 20:26:42 +00:00
Michiel van Baak 4dfea912d0 Make sure the nrfds and nefds are reset to NULL
before we enter manage_parkinglot.
This will get rid of CLI warnings like:
__ast_read: Exception flag set on 'SIP/<NUMBER>-<ID>', but no exception handler

(closes issue #12748)
Reported by: nreinartz
Patches:
      asterisk-multiparking_initialize_filedescr_sets-0.0.1.patch uploaded by nreinartz (license 452)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119015 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 19:10:31 +00:00
Tilghman Lesher 6e5d843a71 Merged revisions 118953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118953 | tilghman | 2008-05-29 12:20:16 -0500 (Thu, 29 May 2008) | 3 lines

Add some debugging code that ensures that when we do deadlock avoidance, we
don't lose the information about how a lock was originally acquired.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:35:19 +00:00
Steve Murphy a2367c07f8 Merged revisions 118858 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118858 | murf | 2008-05-28 18:25:28 -0600 (Wed, 28 May 2008) | 46 lines

(closes issue #10668)
(closes issue #11721)
(closes issue #12726)
Reported by: arkadia
Tested by: murf

These changes:

1. revert the changes made via bug 10668; 
   I should have known that such changes,
   even tho they made sense at the time,
   seemed like an omission, etc, were actually
   integral to the CDR system via forkCDR.
   It makes sense to me now that forkCDR didn't
   natively end any CDR's, but rather depended
   on natively closing them all at hangup time
   via traversing and closing them all, whether
   locked or not. I still don't completely 
   understand the benefits of setvar and answer
   operating on locked cdrs, but I've seen 
   enough to revert those changes also, and
   stop messing up users who depended on that
   behavior. bug 12726 found reverting the changes
   fixed his changes, and after a long review
   and working on forkCDR, I can see why.
2. Apply the suggested enhancements proposed
   in 10668, but in a completely compatible
   way. ForkCDR will behave exactly as before,
   but now has new options that will allow some
   actions to be taken that will slightly 
   modify the outcome and side-effects of
   forkCDR. Based on conversations I've had 
   with various people, these small tweaks
   will allow some users to get the behavior
   they need. For instance, users executing
   forkCDR in an AGI script will find the
   answer time set, and DISPOSITION set, 
   a situation not covered when the routines
  were first written.
3. A small problem in the cdr serializer
   would output answer and end times even
   when they were not set. This is now 
   fixed.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 01:29:09 +00:00
Tilghman Lesher 9af6852e24 Merged revisions 118551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118551 | tilghman | 2008-05-27 14:15:27 -0500 (Tue, 27 May 2008) | 6 lines

When showing an error message for a command, don't shorten the command output,
as it tends to confuse the user (it's fine for suggesting other commands,
however).
 Reported by: seanbright (on #asterisk-dev)
 Fixed by: me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 19:21:03 +00:00
Tilghman Lesher 4169ea891c Merged revisions 118465 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118465 | tilghman | 2008-05-27 13:58:09 -0500 (Tue, 27 May 2008) | 8 lines

NULL character should terminate only commands back to the core, not log
messages to the console.
(closes issue #12731)
 Reported by: seanbright
 Patches: 
       20080527__bug12731.diff.txt uploaded by Corydon76 (license 14)
 Tested by: seanbright

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 18:59:06 +00:00
Tilghman Lesher 316e334751 Change space-zero to now evaluate to false, as is expected by a great many.
(Inspired by a post on the -users list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-25 14:31:29 +00:00
Jeff Peeler 1546f9662d Fixes segfault in parking, patch submitted by bmd.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-24 00:37:01 +00:00
Mark Michelson 975a848b67 A new feature thanks to the fine folks at Switchvox!
If a deadlock is detected, then the typical lock information will be
printed along with a backtrace of the stack for the offending threads.
Use of this requires compiling with DETECT_DEADLOCKS and having glibc
installed.

Furthermore, issuing the "core show locks" CLI command will print the
normal lock information as well as a backtraces for each lock. This
requires that DEBUG_THREADS is enabled and that glibc is installed.

All the backtrace features may be disabled by running the configure
script with --without-execinfo as an argument



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 22:35:50 +00:00
Brett Bryant d32c2d6fd9 Add new functionality to http server that requires manager authentication for any path that includes a directory named 'private'. This patch also
requires manager authentication for any POST's being sent to the server as well to help secure uploads.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 21:19:42 +00:00
Russell Bryant 61e6ae545b Merged revisions 118048 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118048 | russell | 2008-05-23 07:30:53 -0500 (Fri, 23 May 2008) | 9 lines

Don't declare a function that takes variable arguments as inline, because it's
not valid, and on some compilers, will emit a warning.

http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline

(closes issue #12289)
Reported by: francesco_r
Patches by Tilghman, final patch by me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 12:37:31 +00:00
Tilghman Lesher 3e8269359f Merged revisions 117899 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117899 | tilghman | 2008-05-22 13:53:53 -0500 (Thu, 22 May 2008) | 2 lines

Also remove preamble from asynchronous events (reported by jsmith on #asterisk-dev)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 18:54:41 +00:00
Michiel van Baak f1e9371da8 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:29:54 +00:00
Russell Bryant 415516af1c Store build-time options as a string in AST_BUILDOPTS in buildopts.h. Also,
display this information in the "core show settings" CLI command.  This is
useful if you want to verify that you're running a build with DONT_OPTIMIZE,
DEBUG_THREADS, etc.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 13:40:52 +00:00
Mark Michelson 1b8f183ca3 This change makes it so that logs will report the correct source of verbose messages.
Until this change, all verbose messages in Asterisk's log files reported logger.c
as the source of the message.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 22:34:27 +00:00
Tilghman Lesher 7a2413e904 Merged revisions 117519 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117519 | tilghman | 2008-05-21 13:40:14 -0500 (Wed, 21 May 2008) | 3 lines

Strip the preamble from the output also when -rx is not being used
(Related to issue #12702)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:43:26 +00:00
Russell Bryant e64aaf24b0 Merged revisions 117514 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117514 | russell | 2008-05-21 13:28:46 -0500 (Wed, 21 May 2008) | 4 lines

Don't filter the magic character in the network verboser.  It gets filtered
once it reaches the client.
(related to issue #12702, pointed out by tilghman)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:29:05 +00:00
Russell Bryant 457dbc1b4f Merged revisions 117507 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117507 | russell | 2008-05-21 13:19:34 -0500 (Wed, 21 May 2008) | 7 lines

1) Don't print the verbose marker in front of every message from ast_verbose()
   being sent to remote consoles.

2) Fix pbx_gtkconsole to filter out the verbose marker.

(related to issue #12702)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:20:11 +00:00
Russell Bryant 467b4746ab Merged revisions 117479 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r117479 | russell | 2008-05-21 13:11:51 -0500 (Wed, 21 May 2008) | 6 lines

Don't display the verbose marker for calls to ast_verbose() that do not include
a VERBOSE_PREFIX in front of the message.
(closes issue #12702)
Reported by: johnlange
Patched by me

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117481 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:12:19 +00:00
Mark Michelson 46e68c36b6 Be sure that we cache included files for each source file which loads
a configuration file.  As it was, only the first did so. This led to 
a problem if the included file was changed (but not the configuration 
file which includes it) and the second source file attempted to reload 
the configuration. It would not see that the included file had changed.

In this particular example, res_phoneprov and chan_sip both loaded
sip.conf, which included a file call sip.peers.conf. Since res_phoneprov
was the first to load sip.conf, only it cached the fact that sip.conf
included sip.peers.conf. If sip.peers.conf were changed and sip.conf were
not and a sip reload were issued (meaning that chan_sip attempts to 
reload sip.conf only if it and its included files have changed) the changes
made to sip.peers.conf would not be seen and therefore no action would be
taken.

(closes issue #12693)
Reported by: marsosa



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 02:20:31 +00:00
Luigi Rizzo d5c75ee032 + Implement a variant of astman_get_header() to return the first or
last match, and possibly skip empty fields.  The function is useful
  (and used here) when a form submits multiple 'Action' fields to the
  Manager.

  This change slightly modifies the current behaviour, but only in the
  case the user supplies multiple 'Action: ' lines and the first
  ones are empty, so the change is totally harmless.
 
+ Fix style on a couple of "if (displayconnects)" statements;
 
+ Expand a bit the 'Manager Test' interface, to make it slightly
  more user friendly. But also comment that the HTML should not
  be embedded in the C source.
 
None of this stuff needs to be applied to 1.4.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 18:07:24 +00:00
Luigi Rizzo c7a4899ac4 Document the possible presence of multiple variables with the
same name in http queries, which might confuse the manager.

Replace calls to ast_uri_decode() with a local function that also
replaces '+' with ' ', as this is the normal encoding for
spaces in http requests.
This allows passing cli commands to the manager through the
http interface.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 17:48:43 +00:00
Luigi Rizzo d56a42cb1a Reverse the check for Cookie: and remove leftover code implementing
the same thing.
Add an ast_debug() call to help debugging the url matching.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20 16:39:39 +00:00
Russell Bryant 7d2d373d6f Minor formatting change to test a mantis change ...
(issue #12674)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 20:45:25 +00:00
Joshua Colp 83e37eaf1c The logger closes the files it is logging to when reloading so we have to read in the logger configuration even if it has not changed so that the logs get opened again.
(closes issue #12665)
Reported by: DennisD


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 16:03:33 +00:00
Luigi Rizzo 18065a175d Use casts or intermediate variables to remove a number
of platform/compiler-dependent warnings when handing
struct timeval fields, both reading and printing them.

It is a lost battle to handle the different ways struct timeval
is handled on the various platforms and compilers, so try
to be pragmatic and go through int/long which are universally
supported.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 10:56:29 +00:00
Russell Bryant 08f91c1192 Merged revisions 116463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116463 | russell | 2008-05-14 16:32:00 -0500 (Wed, 14 May 2008) | 4 lines

Add ast_assert(), which can be used to handle fatal errors.  It is only compiled
in if dev-mode is enabled, and only aborts if DO_CRASH is defined.
(inspired by issue #12650)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:40:43 +00:00
Joshua Colp 0d85a0eff7 Add a missing context unlock.
(closes issue #12649)
Reported by: ys
Patches:
      pbx.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:11:49 +00:00
Joshua Colp 5ec16b6d6b Merged revisions 116352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116352 | file | 2008-05-14 15:53:39 -0300 (Wed, 14 May 2008) | 4 lines

Add linux-gnueabi in.
(closes issue #12529)
Reported by: tzafrir

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116353 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 18:54:16 +00:00
Jeff Peeler 4729632721 Fixed a few problems with multiparking: call not being parked in the correct parking spot, caller not being notified of parking spot position, and improperly hanging up the call during a transfer due to timing out (not providing the extension in which to transfer).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 16:52:30 +00:00
Olle Johansson bb386c84e7 Adding spport for T.140 RED - Simple RTP redundancy to prevent packet loss in text stream
Work sponsored by Omnitor AB, Stockholm, Sweden (http://www.omnitor.se)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 13:37:07 +00:00
Olle Johansson 29b1d73567 Add support for codec settings in originate via call file and manager.
This is to enable video and text in originated calls. Development sponsored
by Omnitor AB, Sweden. (http://www.omnitor.se)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 12:32:57 +00:00
Mark Michelson b6aef57619 Merged revisions 116088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r116088 | mmichelson | 2008-05-13 18:47:49 -0500 (Tue, 13 May 2008) | 12 lines

A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is defined.

After debugging a deadlock, it was noticed that when DEBUG_CHANNEL_LOCKS
is enabled in menuselect, the actual origin of channel locks is obscured
by the fact that all channel locks appear to happen in the function
ast_channel_lock(). This code change redefines ast_channel_lock to be a
macro which maps to __ast_channel_lock(), which then relays the proper
file name, line number, and function name information to the core lock
functions so that this information will be displayed in the case that
there is some sort of locking error or core show locks is issued.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 23:54:01 +00:00
Russell Bryant 8e4c0e85d8 Merged revisions 115990 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115990 | russell | 2008-05-13 16:05:57 -0500 (Tue, 13 May 2008) | 5 lines

Fix an issue that I noticed in autoservice while mmichelson and I were debugging
a different problem.  I noticed that it was theoretically possible for two threads
to attempt to start the autoservice thread at the same time.  This change makes the
process of starting the autoservice thread, thread-safe.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 21:07:59 +00:00
Tilghman Lesher 99cad5bf49 Merged revisions 115884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115884 | tilghman | 2008-05-13 13:36:13 -0500 (Tue, 13 May 2008) | 3 lines

If the socket dies (read returns 0=EOF), return immediately.
(Closes issue #12637)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-13 18:38:11 +00:00
Olle Johansson e30c26c689 Add support for playing an audio file for caller and callee at start and stop of monitoring (one-touch monitor).
Keep messages short, since the other party is waiting while one party hear the message...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 18:39:09 +00:00
Mark Michelson 2e054642d5 Merged revisions 115735 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115735 | mmichelson | 2008-05-12 12:51:14 -0500 (Mon, 12 May 2008) | 7 lines

If a thread holds no locks, do not print any information on the thread when issuing
a core show locks command. This will help to de-clutter output somewhat.

Russell said it would be fine to place this improvement in the 1.4 branch, so that's
why it's going here too.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-12 17:55:08 +00:00
Mark Michelson 7daebcd610 Adding support for "urgent" voicemail messages. Messages which are
marked "urgent" are considered to be higher priority than other messages
and so they will be played before any other messages in a user's mailbox.

There are two ways to leave an urgent message. 
1. send the 'U' option to VoiceMail().
2. Set review=yes in voicemail.conf. This will give instructions for 
   a caller to mark a message as urgent after the message has been recorded.

I have tested that this works correctly with file and ODBC storage, and James
Rothenberger (who wrote initial support for this feature) has tested its use
with IMAP storage.

(closes issue #11817)
Reported by: jaroth
	Based on branch http://svn.digium.com/svn/asterisk/team/jrothenberger/asterisk-urgent
Tested by: putnopvut, jaroth



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 21:22:42 +00:00
Brett Bryant 65b8381550 The following patch adds new options and alters the default behavior of the ENUM* functions. The TXCIDNAME lookup function has also gotten a
new paramater. The new options for ENUM* functions include 'u', 's', 'i', and 'd' which return the full uri, trigger isn specific rewriting, look 
for branches into an infrastructure enum tree, or do a direct dns lookup of a number respectively. The new paramater for TXCIDNAME adds a 
zone-suffix argument for looking up caller id's in DNS that aren't e164.arpa.

This patch is based on the original code from otmar, modified by snuffy, and tested by jtodd, me, and others.

(closes issue #8089)
Reported by: otmar
Patches:
      20080508_bug8089-1.diff 
	- original code by otmar (license 480), 
	- revised by snuffy (license 35)
Tested by: oej, otmar, jtodd, Corydon76, snuffy, alexnikolov, bbryant


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-09 19:54:45 +00:00
Russell Bryant e40c662a06 Merged revisions 115551 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115551 | russell | 2008-05-08 10:24:54 -0500 (Thu, 08 May 2008) | 4 lines

Don't use a channel before checking for channel allocation failure.
(closes issue #12609)
Reported by: edantie

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-08 15:26:49 +00:00
Russell Bryant 56aa9b9efa Fix up a problem that was introduced into the scheduler when it was converted
to use doubly linked lists.  The schedule() function had an optimization that
had it try to guess which direction would be better for the traversal to insert
the task into the scheduler queue.  However, if the code chose the path where
it traversed the queue in reverse, and the result was that the task should be
at the head of the queue, then the code would actually put it at the tail,
instead.

(Problem found by bbryant, debugged and fixed by bbryant and me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07 21:11:33 +00:00
Tilghman Lesher ff01792e50 Merged revisions 115415 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115415 | tilghman | 2008-05-06 14:31:39 -0500 (Tue, 06 May 2008) | 2 lines

Don't print the terminating NUL.  (Closes issue #12589)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-06 19:32:29 +00:00
Tilghman Lesher e82b7365b7 Merged revisions 115333 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115333 | tilghman | 2008-05-05 17:50:31 -0500 (Mon, 05 May 2008) | 7 lines

Separate verbose output from CLI output, by using a preamble.
(closes issue #12402)
 Reported by: Corydon76
 Patches: 
       20080410__no_verbose_in_rx_output.diff.txt uploaded by Corydon76 (license 14)
       20080501__no_verbose_in_rx_output__1.4.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 23:00:31 +00:00
Mark Michelson 276118a776 #execing the same file multiple times led to warning messages saying that the same file was
being #included twice. This was due to the fact that #exec created a temporary file which
was then #included. The name of the temporary file was the name of the #exec'd file, with
the Unix timestamp and thread ID concatenated. The issue was that if multiple #exec statements
of the same file were reached in the same second, then the result was that the temporary files
would have duplicate names. To resolve this, the temporary file now has microsecond resolution
for the timestamp portion.

(closes issue #12574)
Reported by: jmls
Patches:
      12574.patch uploaded by putnopvut (license 60)
Tested by: jmls, putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:14:06 +00:00
Russell Bryant 7f29bc7bc6 Simplify code by using a taskprocessor for dispatching events in the Asterisk core.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:01:56 +00:00
Tilghman Lesher 73581f3905 Optionally display the value of several variables within the Status command.
(Closes issue AST-34)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 19:33:14 +00:00
Dwayne M. Hubbard ca4ae77c91 pbx uses a taskprocessor for device state changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-03 04:12:54 +00:00
Dwayne M. Hubbard b0b72e89a8 A taskprocessor is an object that has a name, a task queue, and an event processing thread. Modules reference a taskprocessor, push tasks into the taskprocessor as needed, and unreference the taskprocessor when the taskprocessor is no longer needed.
A task wraps a callback function pointer and a data pointer and is managed internal to the taskprocessor subsystem.  The callback function is responsible for releasing task data.

Taskprocessor API
 * ast_taskprocessor_get(..) - returns a reference to a taskprocessor
 * ast_taskprocessor_unreference(..) - releases reference to a taskprocessor
 * ast_taskprocessor_push(..) - push a task into a taskprocessor queue

Check doxygen for more details


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-03 03:40:32 +00:00
Tilghman Lesher b11854445b Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-02 02:33:04 +00:00
Tilghman Lesher b5a127daac Modify TIMEOUT() to be accurate down to the millisecond.
(closes issue #10540)
 Reported by: spendergrass
 Patches: 
       20080417__bug10540.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 23:06:23 +00:00
Tilghman Lesher 95490ee5c2 Merged revisions 115017 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115017 | tilghman | 2008-05-01 13:59:08 -0500 (Thu, 01 May 2008) | 6 lines

'#' is another reserved character for URIs that also needs to be escaped.
(closes issue #10543)
 Reported by: blitzrage
 Patches: 
       20080418__bug10543.diff.txt uploaded by Corydon76 (license 14)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115018 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 19:00:18 +00:00
Brett Bryant 5634048c98 Add two new dialplan functions from libspeex for applying audio gain control
and denoising to a channel, AGC() and DENOISE(). Also included, is a change 
to the audiohook API to add a new function (ast_audiohook_remove) that can 
remove an audiohook from a channel before it is detached.

This code is based on a contribution from Switchvox.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-01 16:57:19 +00:00
Kevin P. Fleming fc4390ac37 fix this logic to actually be correct... the fd can't be *both* -1 and an array index to be checked in rfds/efds (bug found by gcc-4.3)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114845 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 18:58:48 +00:00
Mark Michelson 3aad03e5f0 Adding a new option 'n' to app_chanspy. This option allows for the name of the spied-on
party to be spoken instead of the channel name or number.

This was accomplished by adding a new function pointer to point to a function in app_voicemail
which retrieves the name file and plays it. This makes for an easy way that applications may play
a user's name should it be necessary. app_directory, in particular, can be simplified greatly by
this change.

This change comes as a suggestion from Switchvox, which already has this feature. AST-23


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 22:38:07 +00:00
Tilghman Lesher 6a81da594d Add incomplete matching to PBX code and app_dial
(closes issue #12351)
 Reported by: Corydon76
 Patches: 
       20080402__pbx_incomplete__3.diff.txt uploaded by Corydon76 (license 14)
       pbx_incomplete_with_timeout.diff uploaded by fabled (license 448)
 Tested by: Corydon76, fabled


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-28 16:37:45 +00:00
Tilghman Lesher ab608c09e2 Oops, this isn't necessarily AGI that is forking anymore
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 19:39:26 +00:00
Russell Bryant 34451e7c43 Merge code from team/russell/parking_updates
Add some additional features to the core park_call_full() function, and expose
them as options to the Park() application.  The functionality being added is the
ability to specify a custom return extension/context/priority, a custom timeout,
and a couple of options.  The options are to play ringing instead of MOH to the
parked caller, and to randomize parking spot selection.

(code inspired by the patch in AST-17, code from switchvox)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-25 18:18:27 +00:00
Michiel van Baak 08e674bce0 Pass the hangup cause all the way to the calling app/channel.
(closes issue #11328)
Reported by: rain
Patches:
      20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-24 22:16:48 +00:00
Russell Bryant 76917df5cb Merged revisions 114600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114600 | russell | 2008-04-23 17:18:12 -0500 (Wed, 23 Apr 2008) | 6 lines

Improve some broken cookie parsing code.  Previously, manager login over HTTP
would only work if the mansession_id cookie was first.  Now, the code builds
a list of all of the cookies in the Cookie header.  This fixes a problem
observed by users of the Asterisk GUI.
(closes AST-20)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 22:53:20 +00:00
Russell Bryant c0308de13e Merged revisions 114591 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114591 | russell | 2008-04-23 12:55:31 -0500 (Wed, 23 Apr 2008) | 5 lines

Store the manager session ID explicitly as 4 byte ID instead of a ulong.  The
mansession_id cookie is coded to be limited to 8 characters of hex, and this
could break logins from 64-bit machines in some cases.
(inspired by AST-20)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 18:01:00 +00:00
Joshua Colp c3dd5e3e27 Merged revisions 114579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114579 | file | 2008-04-23 11:54:11 -0300 (Wed, 23 Apr 2008) | 4 lines

Instead of stopping dialplan execution when SayNumber attempts to say a large number that it can not print out a message informing the user and continue on.
(closes issue #12502)
Reported by: bcnit

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-23 14:55:03 +00:00
Steve Murphy 76155d60ce (closes issue #12469)
Reported by: triccyx

I had a bit a problem reproducing this in my setup (trying not to disturb my other stuff)
but finally, I got it. The problem appears to be that the extension is being added in
replace mode, which kinda assumes that the pattern trie has been formed, when in fact,
in this case, it was not. The checks being done are not nec. when the tree is not yet
formed, as changes like this will be summarized when the trie is formed in the future.

I tested the fix, and the crash no longer happens. Feel free to open the bug again if
this fix doesn't cure the problem.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 21:57:57 +00:00
Russell Bryant 96638d7bb5 re-add a fix that got lost with a recent change
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114548 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 20:25:56 +00:00
Jason Parker 6f549bc324 Allow setqueuevar=yes (et al) to work, after changes to pbx_builtin_setvar()
(closes issue #12490)
Reported by: bcnit
Patches:
      12490-queuevars-3.diff uploaded by qwell (license 4)
Tested by: qwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 18:14:09 +00:00
Russell Bryant a3f3613d66 Correct action_ping() and action_events() with regards to Manager 1.1
documentation.  Also, fix a bug in xml_translate().

(closes issue #11649)
Reported by: ys
Patches:
      trunk_manager.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 15:46:01 +00:00
Steve Murphy 161b4abd79 Hopefully, this will resolve the issues that russellb had with this log_show_lock().
I gathered the code that filled the string, and put it in a different func which
I cryptically call "append_lock_information()".
Now, both log_show_lock(), and handle_show_locks() both call this code to do
the work. Tested, seems to work fine. 
Also, log_show_lock was modified to use the ast_str stuff, along with checking
for successful ast_str creation, and freeing the ast_str obj when finished.
A break was inserted to terminate the search for the lock; we should never
see it twice.

An example usage in chan_sip.c was created as a comment, for instructional
purposes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-22 14:38:46 +00:00
Jeff Peeler 41fd7a6a21 (closes issue #6113)
Reported by: oej
Tested by: jpeeler

This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option.

Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21 23:42:45 +00:00
Steve Murphy c0b8f57b9d (closes issue #12467)
Reported by: atis
Tested by: murf

This upgrade adds the ~~ (concatenation) string operator to expr2.
While not needed in normal runtime pbx operation, it is needed when
raw exprs are being syntax checked. This plays into future syntax-
unification plans. By permission of atis, this addition in trunk 
and the reason of why things are as they are will suffice to close
this bug.

I also added a short note about the previous addition of "sip show sched"
to the CLI in CHANGES, which I discovered I forgot in a previous commit.




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21 21:13:02 +00:00
Russell Bryant 0bb3c15606 Merged revisions 114284 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114284 | russell | 2008-04-18 16:48:06 -0500 (Fri, 18 Apr 2008) | 2 lines

Don't destroy a manager session if poll() returns an error of EAGAIN.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-18 21:51:05 +00:00
Mark Michelson 0e821d7201 Merged revisions 114257 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114257 | mmichelson | 2008-04-18 12:44:29 -0500 (Fri, 18 Apr 2008) | 6 lines

Clearing up error messages so they make a bit more sense. Also removing a redundant error
message.

Issue AST-15


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-18 18:03:06 +00:00
Russell Bryant 19f7e8cc93 Merged revisions 114230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114230 | russell | 2008-04-17 17:15:43 -0500 (Thu, 17 Apr 2008) | 6 lines

Remove redundant safety net.  The check for the autoservice channel list state
accomplishes the same goal in a better way.

(issue #12470)
Reported By: atis

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 22:24:00 +00:00
Russell Bryant 0270b3d6c9 Make this file compile. The variable str is never set anywhere. Furthermore,
it duplicates a lot of code.  I will leave it to murf to clean up.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 22:21:32 +00:00
Mark Michelson ae52cd4a76 Merged revisions 114207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114207 | mmichelson | 2008-04-17 11:28:03 -0500 (Thu, 17 Apr 2008) | 12 lines

It was possible for a reference to a frame which was part of a freed DSP to still be
referenced, leading to memory corruption and eventual crashes. This code change ensures
that the dsp is freed when we are finished with the frame. This change is very similar
to a change Russell made with translators back a month or so ago.

(closes issue #11999)
Reported by: destiny6628
Patches:
      11999.patch uploaded by putnopvut (license 60)
Tested by: destiny6628, victoryure


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-17 16:40:12 +00:00
Tilghman Lesher 123ac5fd64 Standardized routines for forking processes (keeps all the specialized code in one place).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 22:57:54 +00:00
Steve Murphy 752f6681b1 A small enhancement-- I added the routine log_show_lock to utils.c, which if the mentioned lock has been acquired, this routine will log to the console the normal info about that lock you'd see from the CLI when you do a 'core show locks'. It's solely for debug-- if the lock is NOT acquired, there is no output. I use it to show 'unexpected' locks, to see where/why a lock is pre-locked. This command is to be called from points of interest, like just before a trylock, and helps to spot fleeting, highly temporal locks that normally are not locked...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 20:54:41 +00:00
Steve Murphy 8b6d8da58c Introducing a small optimization to event_unsubscribe; events now use a Doubly-Linked list for events, gives fast deletions, for the sake of channel driver mwi events. From team/murf/bug11210.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 20:28:08 +00:00
Steve Murphy 2b69ec9a38 Introducing a small upgrade to the ast_sched_xxx facility, to keep it from eating up lots of cpu cycles. See CHANGES. From the team/murf/bug11210 branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 20:09:39 +00:00
Steve Murphy 6138b16995 Introducing various astobj2 enhancements, chief being a refcount tracing feature, and various documentation updates in astobj2.h, and the addition of standalone utility, refcounter, that will filter the trace output for unbalanced, unfreed objects. This comes from the team/murf/bug11210 branch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-16 17:45:28 +00:00
Steve Murphy 5b4222c9de These changes:
a. fix a self-found problem with SPAWN-ing an extension,
      where matches were not being found
   b. correct some wording in a comment
   c. Add some debug for future debugging.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 19:59:50 +00:00
Jason Parker efb767e432 Convert several DEBUG logs into ast_debug.
(closes issue #12444)
Reported by: IgorG
Patches:
      channel_c_debug.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 15:20:47 +00:00
Mark Michelson 0270776ca5 Merged revisions 114117 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114117 | mmichelson | 2008-04-14 12:41:03 -0500 (Mon, 14 Apr 2008) | 11 lines

Increase the retry count when attempting to show channels. This apparently
cleared an issue someone was seeing when attempting to show channels when
the load was high.

(closes issue #11667)
Reported by: falves11
Patches:
      11677.txt uploaded by russell (license 2)
Tested by: falves11


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114118 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 17:42:20 +00:00
Mark Michelson 9ddc843fbe Merged revisions 114106 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114106 | mmichelson | 2008-04-14 09:58:02 -0500 (Mon, 14 Apr 2008) | 5 lines

Save a local copy of the generate callback prior to unlocking the channel in
case the generate callback goes NULL on us after the channel is unlocked. Thanks
to Russell for pointing this need out to me.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 15:01:36 +00:00
Joshua Colp 5fff9c7304 Merged revisions 114100 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114100 | file | 2008-04-14 10:52:49 -0300 (Mon, 14 Apr 2008) | 4 lines

Don't change the SSRC when a new source comes into play, this might happen quite often and depending on the remote side... they might not like this.
(closes issue #12353)
Reported by: dimas

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-14 13:53:33 +00:00
Mark Michelson e409a129af Merged revisions 114063 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114063 | mmichelson | 2008-04-11 10:44:28 -0500 (Fri, 11 Apr 2008) | 11 lines

Fix a race condition that may happen between a sip hangup
and a "core show channel" command. This patch adds locking
to prevent the resulting crash.

(closes issue #12155)
Reported by: tsearle
Patches:
      show_channels_crash2.patch uploaded by tsearle (license 373)
Tested by: tsearle


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 15:49:35 +00:00
Mark Michelson 115d5024a1 Merged revisions 114051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114051 | mmichelson | 2008-04-10 15:59:49 -0500 (Thu, 10 Apr 2008) | 3 lines

Fix 1.4 build when LOW_MEMORY is enabled.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 22:02:32 +00:00
Jason Parker 51c92a4644 Merged revisions 114035 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114035 | qwell | 2008-04-10 12:26:10 -0500 (Thu, 10 Apr 2008) | 10 lines

Only try to prefix language if we are not using an absolute path (suffix it otherwise).

en/var/lib/asterisk/sounds/blah.gsm is a very silly path.

(closes issue #12379)
Reported by: kuj
Patches:
      12379-absolutepath.diff uploaded by qwell (license 4)
Tested by: kuj, qwell

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 17:27:16 +00:00
Joshua Colp 4a21c5dd22 Fix spelling of existent in a few places.
(closes issue #12409)
Reported by: candlerb


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-10 13:45:45 +00:00
Mark Michelson 28bd5d88c1 There was a subtle logical difference between 1.4 and trunk with regards to how timeouts
were handled. In 1.4, if the absolute timeout were reached on a call, no matter what
the return value of ast_spawn_extension was, the pbx would attempt to go to the 'T'
extension or hangup otherwise. The rearrangement of this function in trunk made this check
only happen in the case that ast_spawn_extension returned 0. If ast_spawn_extension returned
1, then the fact that the timeout expired resulted in a no-op, and would cause an infinite
loop to occur in __ast_pbx_run. This change fixes this problem. Now timeouts will
behave as they did in 1.4

(closes issue #11550)
Reported by: pj
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 17:48:33 +00:00
Jason Parker f5a151e525 Move AST_FEATURE_FLAG_* and FEATURE_RETURN_* to features.h so that they can be used by modules.
(closes issue #12384)
Reported by: fnordian
Patches:
      features.patch uploaded by fnordian (license 110)

(patch modified by me, to give FEATURE_RETURN_* an AST_ prefix)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-08 17:32:42 +00:00
Jason Parker d3355ff2ed Merged revisions 113402 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113402 | qwell | 2008-04-08 11:56:52 -0500 (Tue, 08 Apr 2008) | 1 line

Work around some silliness caused by sys/capability.h - this should fix compile errors a number of users have been experiencing.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-08 17:00:55 +00:00
Joshua Colp dc8fe3910d Merged revisions 113296 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113296 | file | 2008-04-08 12:03:43 -0300 (Tue, 08 Apr 2008) | 4 lines

If audio suddenly gets fed into one side of a channel after a lapse of frames flush the other factory so that old audio does not remain in the factory causing the sync code to not execute.
(closes issue #12296)
Reported by: jvandal

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-08 15:05:35 +00:00
Mark Michelson be02a94138 Merged revisions 113065 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113065 | mmichelson | 2008-04-07 11:08:45 -0500 (Mon, 07 Apr 2008) | 13 lines

This fix prevents a deadlock that was experienced in chan_local. There was
deadlock prevention in place in chan_local, but it would not work in a specific
case because the channel was recursively locked. By unlocking the channel prior
to calling the generator's generate callback in ast_read_generator_actions(), we
prevent the recursive locking, and therefore the deadlock.

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


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 16:12:30 +00:00
Joshua Colp c7d51a7fc1 Put my slinfactory changes back in.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@113009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-07 14:54:42 +00:00
Dwayne M. Hubbard 5e6d84eb69 sleep long enough for the zaptel timer error message to display before exit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-04 00:57:33 +00:00
Joshua Colp b7b2e732f0 Merged revisions 112711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112711 | file | 2008-04-03 21:52:36 -0300 (Thu, 03 Apr 2008) | 2 lines

Pass in the path to Zaptel for systems that install Zaptel headers in a separate location.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-04 00:53:19 +00:00
Dwayne M. Hubbard 6dafddbe39 satisfy buildbot
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-03 22:19:43 +00:00
Dwayne M. Hubbard 593dcbe311 add a Zaptel timer check to verify the timer is responding when Zaptel support is compiled into Asterisk and Zaptel drivers are loaded. This will help people not waste their valuable time debugging side effects.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-03 22:13:11 +00:00
Tilghman Lesher 0e6140c564 Use a 32k file buffer on recordings, which increases the efficiency of file recording.
(closes issue #11962)
 Reported by: garlew
 Patches: 
       recording.patch uploaded by garlew (license 376)
       bug-11962.diff uploaded by snuffy (license 35)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-03 07:49:05 +00:00
Mark Michelson 2580dfc6fb Merged revisions 112468 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112468 | mmichelson | 2008-04-02 12:36:04 -0500 (Wed, 02 Apr 2008) | 13 lines

Fix a race condition in the manager. It is possible that a new manager event
could be appended during a brief time when the manager is not waiting for input.
If an event comes during this period, we need to set an indicator that there is an
event pending so that the manager doesn't attempt to wait forever for an event that
already happened.

(closes issue #12354)
Reported by: bamby
Patches:
      manager_race_condition.diff uploaded by bamby (license 430)
	  (comments added by me)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 17:36:49 +00:00
Terry Wilson 1eb31edde2 Re-add HTTP post support by moving to res_http_post.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-02 15:25:48 +00:00
Steve Murphy da41d47a83 Bumped across another test set for the new exten pattern matcher, which revealed a problem with the CANMATCH/MATCHMORE modes. Direct matches were getting in the way. Fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112357 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 22:45:10 +00:00
Steve Murphy 2fb0bfba35 (closes issue #12298)
Reported by: falves11
Patches:
      12298.patch1 uploaded by murf (license 17)
Tested by: murf

I have hopes that the changes made over the last few days will
finalize and solidify this code. While there are bound to be 
small tweaks still needed, I feel that the job (at last) is
somewhat completed. Finally, I had a chance to comprehend how
the scoring of extension patterns was done in the previous
version, and I've come very close to using the exact same
criteria in the new pattern matching code. The left-right
sorting is now replicated in the trie structure itself, such
that the first match found will the 'best' match. Compared
the results against 1.4 for several extensions. Replicated
falves11's setup and it works. Used some devious patterns
provided by jsmith, supplemented with a few of my own.
Looks good.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 20:02:19 +00:00
Joshua Colp 0d7cfae6b6 Merged revisions 112209 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112209 | file | 2008-04-01 15:02:43 -0300 (Tue, 01 Apr 2008) | 4 lines

Disable Packet2Packet bridging when we need to feed DTMF frames into the core. Some implementations do not like how we switch between things.
(closes issue #12212)
Reported by: bamby

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 18:06:13 +00:00
Jeff Peeler a5cdd849e5 This adds DNS SRV record support to DNS manager. If there is a SRV record for a given domain, the hostname and port listed in the SRV record will be used. If no SRV record exists or a SRV lookup is not attempted, the DNS lookup on the specified domain will be performed as normal. Chan_sip has been modified to take advantage of the new SRV support.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 17:53:08 +00:00
Mark Michelson 4dbacf6bbc Merged revisions 112138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112138 | mmichelson | 2008-04-01 12:21:21 -0500 (Tue, 01 Apr 2008) | 10 lines

Initialize the __res_state structure used for dns purposes
to all 0's prior to using it. This is due to valgrind's complaints
on issue #12284 as well as an excerpt found in "Description" portion
of the online man page found here:

http://www.iti.cs.tu-bs.de/cgi-bin/UNIXhelp/man-cgi?res_nquery+3RESOLV

(pertains to issue #12284 but does not necessarily close it)


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 17:23:19 +00:00
Joshua Colp 7dab892401 Merged revisions 112125 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r112125 | file | 2008-04-01 13:45:14 -0300 (Tue, 01 Apr 2008) | 5 lines

Ensure that we do not exceed the hold's maximum size with a single frame.
(closes issue #12047)
Reported by: fabianoheringer
Tested by: fabianoheringer

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-01 16:50:37 +00:00
Terry Wilson f02c11d88b Yeah, simplify that logic a bit...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 21:01:59 +00:00
Terry Wilson aa720d402b Handle blank prefix= in http.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-31 20:45:05 +00:00
Russell Bryant 16b2720cd4 Note a minor race condition that I noticed while reviewing Jeff's changes
to this code.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 22:45:43 +00:00
Terry Wilson 2848068017 Fix another little http problem. In making it match coding guidelines, a comparison was dropped
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111500 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 22:10:25 +00:00
Steve Murphy 3d4cb09ae8 comment cleanup and iron out a really dumb mistake in handling the '.'-wildcard in the new exten pattern matcher.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 21:25:55 +00:00
Tilghman Lesher 42358325a8 Merged revisions 111442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111442 | tilghman | 2008-03-27 14:23:12 -0500 (Thu, 27 Mar 2008) | 6 lines

For FreeBSD, at least, the ifa_addr element could be NULL.
(closes issue #12300)
 Reported by: festr
 Patches: 
       acl.c.patch uploaded by festr (license 443)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 19:26:45 +00:00
Steve Murphy 6928ccfa02 Merged revisions 111391 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111391 | murf | 2008-03-27 07:03:28 -0600 (Thu, 27 Mar 2008) | 9 lines

These small documentation updates made in response to a query in
asterisk-users, where a user was using Playback, but needed the
features of Background, and had no idea that Background existed,
or that it might provide the features he needed. I thought the
best way to avert these kinds of queries was to provide "See Also"
references in all three of "Background", "Playback", "WaitExten".
Perhaps a project to do this with all related apps is in order.


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 13:29:41 +00:00
Jason Parker 8f2ae67a3e But we can change the API here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 00:27:35 +00:00
Jason Parker 0271088279 Merged revisions 111280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111280 | qwell | 2008-03-26 19:25:13 -0500 (Wed, 26 Mar 2008) | 1 line

Put this flag back so we don't change the API.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-27 00:25:56 +00:00
Jason Parker f59c496a81 Merged revisions 111245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111245 | qwell | 2008-03-26 18:26:33 -0500 (Wed, 26 Mar 2008) | 9 lines

Remove excessive smoother optimization that was causing audio glitches (small "pops")
 after (about 200ms later) an "incorrectly" sized frame was received.

While it would be very nice to keep this as optimized as possible, it makes no sense
 for the smoother to be dropping random bits of audio like this.  Isn't that the
 whole point of a smoother?

Closes issue #12093.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 23:27:33 +00:00
Terry Wilson 4c2531989a Stupid strcasecmp function :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 21:23:29 +00:00
Tilghman Lesher e04025ead9 Simplify new macro, simplify configfile logic, now that list is sorted
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:58:09 +00:00
Tilghman Lesher e6fc9ae52c Add a linkedlist macro that maintains a sorted list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:19:31 +00:00
Jason Parker dd2700d0b1 Only try to detect silence when we actually need to, instead of...always.
If this is wrong, I'd love to hear why.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:16:31 +00:00
Jason Parker 6412a96e43 Large cleanup of DSP code
Per comments from dimas:
1. The code now generates DTMF_BEGIN frames in addition to DTMF_END ones.

2. "quelching" rewritten - now each detector (MF/DTMF/generic tone) may mark fragment of a frame for suppression (squelching, muting) with a call to mute_fragment. Actual muting happens only once at the very end of ast_dsp_process where all marked fragments are zeroed. This way every detector sees original data in the frame without any piece of a frame being zeroed by a detector which was run before.

3. DTMF detector tries to "mute" one block before and one block after the block where actual tone was detected. Muting of previois block is something new for this patch. Obviously this operation is not always possible - if current frame does not contain data for previous block - it is too late. But at least we make our best.
Muting of next block was already done by the old code but it only affects part of the next block which is in the frame being processed. New code keeps this information in state structures so it will mute proper number of samples in the next frame(s) too.

4. Removed ast_dsp_digitdetect and ast_dsp_getdigits APIs because these are not used.

5. DSP API extended a bit - ast_dsp_was_muted() function added which returns true if DSP code was muting any fragment in the last frame. chan_zap uses this function to decide it needs to turn on confmute on the channel.
This is to replace AST_FRAME_DTMF 'm'/'u' (mute/unmute) functionality.


(closes issue #11968)
Reported by: dimas
Patches:
      v2-11968-dsp.patch uploaded by dimas (license 88)
      v4-11968-zap.patch uploaded by dimas (license 88)
Tested by: dimas, qwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 19:05:51 +00:00
Tilghman Lesher ef4eff9a9b Add the "config reload <conffile>" command, which allows you to tell Asterisk
to reload any file that references a given configuration file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 18:39:06 +00:00
Mark Michelson 43d70915bb This ensures that the manager interface is not enabled by default. Prior to this
change, it was possible to start Asterisk with the manager interface enabled, then
either comment out the enabled option or make manager.conf unopenable and the manager
interface would still be enabled.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 00:02:31 +00:00
Joshua Colp 738e4ec94e Add a special dialplan variable to chan_sip which will cause an audio file to be played upon completion of an attended transfer.
(closes issue #9239)
Reported by: sunder


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25 15:18:41 +00:00
Joshua Colp 358ac2f76a Merged revisions 110628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110628 | file | 2008-03-25 11:37:35 -0300 (Tue, 25 Mar 2008) | 4 lines

Add an option (transmit_silence) which transmits silence during both Record() and DTMF generation. The reason this is an option is that in order to transmit silence we have to setup a translation path. This may not be needed/wanted in all cases.
(closes issue #10058)
Reported by: tracinet

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25 14:39:45 +00:00
Joshua Colp 30d85b3144 Merge over ast_audiohook_volume branch. This adds API calls for use by developers to adjust the volume on a channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-21 17:58:59 +00:00
Russell Bryant 6430ec3294 Merged revisions 110395 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110395 | russell | 2008-03-20 18:13:56 -0500 (Thu, 20 Mar 2008) | 9 lines

Shorten the ast_waitfor() timeout from 500 ms to 50 ms in the autoservice thread.
This really should not make a difference except in very rare cases.  That case would
be that all of the channels in autoservice are not generating any frames.  In that
case, this change reduces the potential amount of time that a thread waits in
ast_autoservice_stop() for the autoservice thread to wrap back around to the beginning
of its loop.

(closes issue #12266, reported by dimas)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 23:14:13 +00:00
Russell Bryant 4e72f83d3e Fix a bug when using zaptel timing for playing back files that have a sample rate
other than 8 kHz.  The issue here is that format modules give a "whennext" sample
value, which is used to calculate when to set a timer for to retrieve the next
frame.  However, the zaptel timer operates on 8 kHz samples, so this must be taken
into account.

(another part of issue #12164, reported by milazzo and jsmith, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 20:08:26 +00:00
Mark Michelson ff9befa36a Add missing unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 18:01:36 +00:00
Russell Bryant bccebdd21f Remove astobj.h from some places where it wasn't needed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 17:45:29 +00:00
Russell Bryant 3c6cf5dcc5 Add some fixes that I made in regards to wideband codec handling to get
G.722 music on hold working for me.

(issue #12164, reported by milazzo and jsmith, patches by me)

res/res_musiconhold.c:
 - I moved a single line so that the sample queue update happened before
   ast_write().  The reason that this was a bug is that the G.722 frame
   originally says it has 320 samples in it (which is correct).  However,
   when the frame is written to a channel that uses RTP, main/rtp.c modifies
   the frame to cut the number of samples in half before it sends it on
   the wire.  This is to account for the stupid incorrect G.722 spec that
   makes it so we have to lie about the number of samples with RTP.  I should
   probably go and re-work the RTP code so it doesn't modify the frame so
   that a bug like this won't happen in the future.  However, this change to
   MOH is harmless.

main/channel.c:
 - I made two fixes in regards to generator timing.  Generators use samples
   for timing.  However, this code assumed 8 kHz samples.  In one case, it was
   a hard coded 160 samples, that is now written as the sample rate / 50.  The
   other place was dealing with timing a generator based on frames coming from
   the other direction.  However, that would have only worked if the sample
   rates for the formats in both directions were the same.  The code now takes
   into account that the sample rates may differ, and scales the generator
   samples accordingly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 17:41:22 +00:00
Jason Parker 9e3603dac9 Rename DSP_FEATURE_DTMF_DETECT, because we are *NOT* only detecting DTMF digits.
This was very misleading.

Early cleanup for issue #11968


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 22:25:34 +00:00
Jason Parker 8d4276578a Rename very poorly named function to reflect what it actually does. This was causing quite a bit of confusion for me...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-19 21:56:15 +00:00