dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

9261 Commits

Author SHA1 Message Date
russell 7eba1e86bd Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08 06:32:04 +00:00
mogorman bb280b04db This patch allows for a user to send messages and
monitor a jabber connection over manager.
patches from 7673 and 7666 with minor changes.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39248 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 22:03:50 +00:00
mogorman 62dc1d852b Many many code cleanup changes given to me by Oej
Thanks, sorry I didn't put this in forever ago.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39229 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 21:15:28 +00:00
kpfleming 113c851d07 remove some extraneous 'followme' in prompt names
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39206 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 18:47:33 +00:00
murf 5704962ab9 This commit folds in changes to both stringfields (some enhancements to the ...field_set() macro, to optimize setting strings to empty, resetting strings to shorter contents, etc.) and to chan_iax2.c, to use stringfields in the user, peer, and pvt structs. Has been running stably on iaxtel, but while iaxtel has a large registration volume, it doesn't seem to have a high call volume. So far, it seems to reduce heap usage by over half. YMMV\! Please report any IAX bugs that might involve stringfields\!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 18:12:51 +00:00
oej d60591dedf Add placeholder for sla.conf sample in configs/. Please update with
correct information not to overload the switchboard with calls to sales.
 Thank you! ;-)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39182 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 17:01:40 +00:00
oej 0b63f61039 Fix accidental removal of if() in commit 38905
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39171 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 16:20:23 +00:00
murf ae7ab1aff9 The contents of branch teams/murf/bug_7598 are being folded in here.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39151 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 12:59:47 +00:00
oej cb0b92c3d4 Issue #7651 - always send subscription-state (AuPix)
Small change to the fix in the report.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39132 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 09:22:43 +00:00
crichter dba3bf0c27 changed naming of mISDN channels, so that hinting works proper
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39131 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 09:09:17 +00:00
russell 66421e3fc5 Merge my applicationmap_fixup branch to address the issues described in this
post to the asterisk-dev mailing list:
  http://lists.digium.com/pipermail/asterisk-dev/2006-August/022174.html

This implements full control over both which channel(s) can activate a dynamic
feature, as well as which channel to run the application on.  I also updated
the documentation on the applicationmap in features.conf.sample in hopes that
the configuration is more clear.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39109 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 04:15:52 +00:00
russell 0ae26ab60c Merged revisions 39081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39081 | russell | 2006-08-06 21:28:29 -0400 (Sun, 06 Aug 2006) | 7 lines

Fix a crash reported to me by hads on IRC.  This crash would occur with the use
of the "distinctiveringaftercid" option.  Also, on this user's system, the crash
would only occur when built without optimizations.  This is because the bug is
that the code would write past the end of an array that was allocated on the
stack, and the structure of the stack is different with or without optimizations
enabled.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39082 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 01:32:51 +00:00
russell d14a000502 minor cleanups
- use appropriate types in some assignments
- use ast_strlen_zero()
- don't manually free cid fields since ast_set_callerid() will handle it


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39058 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 00:26:11 +00:00
file d8002fcc70 Merged revisions 39056 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r39056 | file | 2006-08-06 20:15:51 -0400 (Sun, 06 Aug 2006) | 2 lines

Reset our stream and vstream pointers back to NULL so that any generator that uses them (file based MOH) will not try to close them again. (issue #7668 reported by jmls)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39057 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 00:17:12 +00:00
russell ed71128b5d - add DIALING_OFFHOOK and PRERING to ast_state2str
- don't include a newline character when building a response for an unknown
  state
(issue #7645, jonty)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39032 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 20:58:47 +00:00
russell 098578cd84 suppress a compiler warning about the usage of a potentially uninitialized
variable


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39014 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 11:25:36 +00:00
russell da8d8a7178 Merged revisions 38982 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38982 | russell | 2006-08-05 05:01:37 -0400 (Sat, 05 Aug 2006) | 6 lines

Always generate a Newstate event in ast_setstate() instead of making it a
Newchannel event if the state was AST_STATE_DOWN.  The Newchannel event will
always be generated in ast_request(), so this just causes a duplicated
Newchannel event in some cases.  
(issue #7506, repoted by capouch, fixed by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38994 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 09:03:27 +00:00
russell f32d2d3d05 Merged revisions 38972 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38972 | russell | 2006-08-05 04:08:48 -0400 (Sat, 05 Aug 2006) | 3 lines

remove duplicate queue log entry when the caller exits on a timeout
(issue #7616, ppyy)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38973 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 08:10:20 +00:00
russell c5e5c92d31 Merged revisions 38950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38950 | russell | 2006-08-05 03:21:12 -0400 (Sat, 05 Aug 2006) | 3 lines

don't advertise that this function can set a SIP header when it can only
do reads

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38951 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 07:22:27 +00:00
russell 4289ad18c3 Merged revisions 38928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38928 | russell | 2006-08-05 02:37:59 -0400 (Sat, 05 Aug 2006) | 3 lines

make sure the priv-callerintros directory exists before trying to create a file
there (issue #7659, patch by hads, with some modifications by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38929 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 06:39:43 +00:00
russell a0ab5e9b80 Merged revisions 38903-38904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines

suppress a compiler warning about the usage of a potentially uninitialized variable

........
r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines

Fix an issue that would cause a NewCallerID manager event to be generated
before the channel's NewChannel event.  This was due to a somewhat recent
change that included using ast_set_callerid() where it wasn't before.  This
function should not be used in the channel driver "new" functions.
(issue #7654, fixed by me)

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

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38905 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 05:26:29 +00:00
file 1bdd7371e0 It is better to hold a lock then not hold a lock when you are supposed to.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38887 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-05 00:13:44 +00:00
file 886cf39b10 Minor optimization but use a linkedlists.h macro that pops the head off the list instead of getting the first entry and then removing it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38871 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-04 23:17:40 +00:00
file 84c1e0fb2f Don't assume that a referred by URI will always exist (issue #7641 reported and fixed by AuPix)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38853 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-04 18:40:47 +00:00
file c330d95877 Merged revisions 38825 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38825 | file | 2006-08-03 15:54:02 -0400 (Thu, 03 Aug 2006) | 2 lines

Treat the file as invalid if we have no valid formats for it (issue #7643 reported by KNK)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38826 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03 19:55:05 +00:00
tilghman ec4399116a Update documentation on realtime; add a workaround for lack of realtime hints by using func_odbc
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38823 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03 19:05:06 +00:00
crichter e75c6a98a8 * removed pp_l2_check (fixed L2 bug in mISDNuser)
* added blocking flag to stack object. A port can be blocked/unblocked from the
  cli
* added EVENT_PORT_ALARM to send alarm infos to the chan_misdn.c layer (later	
  we can add a manager event for that)
* added block_on_alarm option, to block the port whenever a ALARM occurs
* added need_busy flag to indicate if we've sended a CONTROL_BUSY already
* changed a bunch of cb_log(-1,..) to cb_log(0,..) due to funny behaviour in 
  recent asterisk ast_log messages..
* fixed a few ETSI state violations, especially when finishing calls in 
  different seldom states
* changed debug levels a lot to make the log more readable in low debuglevels
* some first fixes for the HOLD/RETRIEVE stuff (doesn't work totally still)
* removed the PRECONNECTED state stuff
* added cause 27 when we get a CLEANUP directly after a outgoing SETUP, this
  creates a CHANISUNAVAIL instead of a NOANSWER
* removed the addr pointer from "misdn show stacks" that's not needed anymore 
  and makes the output more unreadable
* added cause saving on RELEASE/RELEASE_COMPLETE
* set cause to 16 on prepare_bc
* removed stack getting from ph_control functions, we don't really need it 
  there
* added beroec api



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38801 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03 16:38:00 +00:00
tilghman ca8821d221 Update statement on FreeTDS with realtime, due to revisions in res_odbc
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38785 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03 13:16:00 +00:00
tilghman d726e96853 Merged revisions 38761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38761 | tilghman | 2006-08-03 00:22:19 -0500 (Thu, 03 Aug 2006) | 2 lines

Bug 7648 - Checking wrong count for plurality on new messages for Dutch language

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38762 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-03 05:24:43 +00:00
kpfleming a98446c842 Merged revisions 38731 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38731 | kpfleming | 2006-08-02 14:29:56 -0500 (Wed, 02 Aug 2006) | 3 lines

fix brain-damage I introduced when trying to fix the CANCEL/BYE sending mechanism for pending INVITES
accept unknown 1xx responses as 183 responses (as RFC3261 mandates we should do)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38732 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-02 19:32:38 +00:00
mogorman 3e0e07cad2 dtmf support. not everything else, trying to clear out those other bugs
but more to come i guess.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38714 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-02 01:00:24 +00:00
kpfleming 1a10d2d3b4 Merged revisions 38686 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38686 | kpfleming | 2006-08-01 18:07:06 -0500 (Tue, 01 Aug 2006) | 2 lines

ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38687 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01 23:09:28 +00:00
file 277c488650 Merged revisions 38654 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38654 | file | 2006-08-01 15:20:05 -0400 (Tue, 01 Aug 2006) | 2 lines

Close the stream when file based MOH stop. This won't get rid of their position in the file but it will cause the translation path to be setup again. (issue #7634 reported by asimpson)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38655 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01 19:21:30 +00:00
murf 0d2c199eca This branch will resolve the bug 7635.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38652 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01 19:03:32 +00:00
tilghman d46e12c4a6 Set permissions completely open and modify by umask
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01 13:15:15 +00:00
kpfleming 5d92dd53e6 Merged revisions 38611 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38611 | kpfleming | 2006-07-31 16:14:11 -0500 (Mon, 31 Jul 2006) | 4 lines

don't reissue hangup requests for SIP channels that have expired their RTP timeouts (one time is enough)
don't rescan the SIP private structure list too fast, it can cause channels to not be able to hang up (issue #7495, and probably others)
use ast_softhangup_nolock() since we already hold the channel's lock

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38612 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 21:31:44 +00:00
russell 9101f1b8e7 make the counting of ingress, outgress, and total frames thread-safe
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38587 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 17:27:42 +00:00
file 2c36b95d3f Blocked revisions 38585 via svnmerge
........
r38585 | file | 2006-07-31 13:09:10 -0400 (Mon, 31 Jul 2006) | 2 lines

Add missing code to bring transferee channel out of MOH/autoservice under certain circumstance (issue #7611 reported by guillecabeza with minor mods by myself)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38586 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 17:11:51 +00:00
file da7bf0433e Poking at a structure when it may not even be allocated is not healthy. Essentially make sure an RTCP structure exists before trying to delete it's scheduled item. (issue #7514 reported by jmls fixed by AuPix)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38573 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 15:24:05 +00:00
russell 5c6752142d Merged revisions 38546-38547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38546 | russell | 2006-07-31 00:04:02 -0400 (Mon, 31 Jul 2006) | 2 lines

Make the frame counting done with TRACE_FRAMES defined thread-safe

........
r38547 | russell | 2006-07-31 00:06:16 -0400 (Mon, 31 Jul 2006) | 2 lines

one more small tweak for thread-safety of TRACE_FRAMES

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38548 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-31 04:10:43 +00:00
russell a26d8b5351 suppress some compiler warnings ...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38533 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-30 23:16:23 +00:00
russell 8c9bc54ab5 allow the gtk console to build and load
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38532 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-30 23:11:07 +00:00
tilghman 3555ba6c41 Add details about flash and wait to doxygen about DTMF.
Reformat the lines to break at column 80.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38521 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-30 15:02:34 +00:00
file fd2169cf66 Blocked revisions 38501 via svnmerge
........
r38501 | file | 2006-07-29 19:18:00 -0400 (Sat, 29 Jul 2006) | 2 lines

How many attempts does it take to make a SIP URI parser that works well? I'm up to 5 personally. On to the good stuff - parse the domain first, user second, and get rid of port & options/params last. (issue #7616 reported by andrew)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38502 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-29 23:19:36 +00:00
markster 1e81c26bb9 Allow updates to match specific lines, allow specification of object or
no when appending.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38489 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-29 22:02:37 +00:00
kpfleming 191e959b7a update cleancount because the channel structure changed today
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38476 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-29 00:19:18 +00:00
kpfleming 701043784e play a beep tone into the spied-on channel if we are about to whisper to them
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38466 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-28 23:47:05 +00:00
kpfleming 051ef64e46 add ExtenSpy variant of ChanSpy
implement whisper mode for ExtenSpy/ChanSpy



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38465 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-28 23:36:06 +00:00
russell 071cba7f50 the pure attribute was not implemented before gcc 2.96. Since we have this
version check here anwyay, define attribute_pure to be empty if it's an earlier
version.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38464 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-28 23:30:18 +00:00
russell 3ffb23720d add macros for the pure and const attributes to compiler.h, in case they ever
need to be handled differently for a specific compiler


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38454 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-28 22:50:54 +00:00