Commit Graph

788 Commits

Author SHA1 Message Date
Luigi Rizzo b6d1722c83 remove ast_safe_string_alloc() - it is completely
equivalent to asprintf().



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 15:44:59 +00:00
Luigi Rizzo 1122621981 constify ast_state2str() and note it is not reentrant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-15 04:03:42 +00:00
Russell Bryant 17a2888d2e Staticize one, and Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:28:56 +00:00
Olle Johansson e3b099c12a Formatting fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-01 20:49:06 +00:00
Luigi Rizzo d7b26b6bf8 set pointers to NULL after freeing memory to avoid multiple free()
probably 1.4/1.2 issue as well if someone can look into that.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-25 09:02:42 +00:00
Steve Murphy 6dcb17baaf This update fulfils the request of bug 7109, which claimed the language arg to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17 23:18:51 +00:00
Paul Cadach fc58bec502 Merged revisions 44809 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r44809 | pcadach | 2006-10-10 23:44:54 +0700 (Втр, 10 Окт 2006) | 1 line

CHANNEL() function sometime mix parameter and value
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-16 08:18:41 +00:00
Joshua Colp 0f15e43add Merged revisions 47707 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47707 | file | 2006-11-15 16:33:41 -0500 (Wed, 15 Nov 2006) | 2 lines

We need to ensure timelimit stuff is included as well so warnings get played. (issue #8050 reported by KNK)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-15 21:36:13 +00:00
Steve Murphy 2e375b388e This mod via bug 7531
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-08 23:17:27 +00:00
Steve Murphy 908f176cf3 A fair number of changes for the sake of bug 7506
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07 21:47:49 +00:00
Tilghman Lesher 10875731ec Merged revisions 47051 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines

Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments"

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 23:16:09 +00:00
Tilghman Lesher a8d3ee89c6 Merged revisions 46078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46078 | tilghman | 2006-10-23 22:01:00 -0500 (Mon, 23 Oct 2006) | 3 lines

Pass through a frame if we don't know what it is, rather than trying to pass a
NULL, which will segfault a channel driver (Bug 8149)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 03:09:48 +00:00
Russell Bryant bd53e7ee4c Extend the thread storage API such that a custom initialization function can
be called for each thread specific object after they are allocated.  Note that
there was already the ability to define a custom cleanup function.  Also, if
the custom cleanup function is used, it *MUST* call free on the thread
specific object at the end.  There is no way to have this magically done that
I can think of because the cleanup function registered with the pthread
implementation will only call the function back with a pointer to the
thread specific object, not the parent ast_threadstorage object.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 01:00:57 +00:00
Russell Bryant 40b8afd54f Merged revisions 45441 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45441 | russell | 2006-10-17 22:41:36 -0400 (Tue, 17 Oct 2006) | 7 lines

Don't attempt to access private data members of the pthread_mutex_t object,
because this does not work on all linux systems.  Instead, just access
the reentrancy field in the ast_mutex_info struct when DEBUG_THREADS is
enabled.  If DEBUG_CHANNEL_LOCKS is enabled, the developer probably has
DEBUG_THREADS on as well.
(issue #8139, me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 02:46:39 +00:00
Kevin P. Fleming 696f9ed677 Merged revisions 45408 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45408 | kpfleming | 2006-10-17 17:24:10 -0500 (Tue, 17 Oct 2006) | 3 lines

optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17 22:24:45 +00:00
Joshua Colp b5f2589e33 Add Masquerade manager event which trips when a masquerade happens (issue #7840 reported by moy)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 17:10:16 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp 3e4a081e1c Make callerid fields in Manager events more consistent. CallerIDNum for number and CallerIDName for name. (issue #7976 reported by suhler)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-02 20:35:16 +00:00
Russell Bryant d2c57c5f4f Merged revisions 43779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43779 | russell | 2006-09-27 12:55:49 -0400 (Wed, 27 Sep 2006) | 50 lines

Merged revisions 43778 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r43778 | russell | 2006-09-27 12:54:30 -0400 (Wed, 27 Sep 2006) | 42 lines

Fix a problem that occurred if a user entered a digit that matched a bridge
feature that was configured using multiple digits, and the digit that was
pressed timed out in the feature digit timeout period.  For example, if blind
transfer is configured as '##', and a user presses just '#'.  In this situation,
the call would lock up and no longer pass any frames.
(issue #7977 reported by festr, and issue #7982 reported by michaels and
 valuable input provided by mneuhauser and kuj.  Fixed by me, with testing help
 and peer review from Joshua Colp).

There are a couple of issues involved in this fix:

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

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

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

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

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

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-27 16:57:44 +00:00
Joshua Colp becd11ddb8 Merged revisions 43695 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43695 | file | 2006-09-26 16:09:41 -0400 (Tue, 26 Sep 2006) | 2 lines

Slight overhaul of the whisper support. 1. We need to duplicate the frame from ast_translate 2. We need to ensure we always have signed linear coming in for signed linear combining. 3. We need to ensure we are always feeding signed linear out. 4. Properly store and restore write format when beeping on the channel we are whispering on. 5. Properly discontinue the stream on the channel for the beep. (issue #8019 reported by timkelly1980)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-26 20:11:44 +00:00
Kevin P. Fleming acf824fe5e Merged revisions 43486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r43486 | kpfleming | 2006-09-22 10:51:13 -0500 (Fri, 22 Sep 2006) | 2 lines

all the Linux systems I have don't use '__m_count' for this field, so I don't know where this came from...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-22 16:25:04 +00:00
Tilghman Lesher 2b55678e1f Remove deprecated CLI apps from the core
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 21:17:39 +00:00
Joshua Colp 1c764935f2 SS7 marked the start of an open season for trunk again but here's something minor - abstract early bridging into the technology so that we don't always assume they use RTP and try it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 19:27:26 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Joshua Colp 0f3eaaf703 Merged revisions 42600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42600 | file | 2006-09-09 16:24:19 -0400 (Sat, 09 Sep 2006) | 2 lines

Only truly consider the channel in the same format if the format matches the raw format OR if a translation path already exists to translate between them. (issue #7887 reported by softins & issue #7803 reported by alvaro_palma_aste). Thanks goes to stubert for giving me access to a box and showing me a scenario where this occured.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-09 20:25:45 +00:00
Joshua Colp 160cea6139 Merged revisions 42452 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r42452 | file | 2006-09-08 14:50:43 -0400 (Fri, 08 Sep 2006) | 2 lines

Swap spies during masquerading

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42453 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 18:53:41 +00:00
Joshua Colp d597b76c36 whentohangup is already in seconds, just need to convert to milliseconds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-08 02:54:45 +00:00
Joshua Colp 55d594e9da Make the difference clear about what the responsibilities of the core and a spy are when it comes to spying on a channel. The core is responsible for adding a spy to a channel, feeding frames into the spy, removing the spy from the channel, and notifying the spy that is has been detached. The spy is responsible for reading frames in, and cleaning itself up. Each side will not try to do the other's job.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 23:30:37 +00:00
Joshua Colp 6fdd2ef790 Tweak the if statement a bit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 16:44:49 +00:00
Russell Bryant e576ac0930 Don't use ast_frdup() in the AST_LIST_INSERT_TAIL macro directly. That was a
very stupid thing to do.  It ends up duplicating the frame twice, linking in
one of them and setting the tail pointer to the other one.  Sorry ...

Thanks to file for pointing out the breakage!!!  file rocks.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-03 16:41:02 +00:00
Joshua Colp 9edf55b64d Merged revisions 41690 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r41690 | file | 2006-09-01 12:28:08 -0400 (Fri, 01 Sep 2006) | 2 lines

Don't treat an unexpected control subclass as voice (issue #7858 reported by PCadach)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-01 16:34:57 +00:00
Joshua Colp d6096858d0 Don't fail the write if they try to write a NULL or IAX frame as we just ignore these.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 18:47:51 +00:00
Joshua Colp c6977b9983 Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 01:59:02 +00:00
Russell Bryant 1ffff64e66 fix a bug introduced when I merged my frame caching branch. Queue the
translated frame to the spies, *not* the original frame.  Thanks PCadach!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-30 17:07:07 +00:00
Russell Bryant f7e7161607 Merge team/russell/frame_caching
There are some situations in Asterisk where ast_frame and/or iax_frame
structures are rapidly allocatted and freed (at least 50 times per second
for one call).

This code significantly improves the performance of ast_frame_header_new(), 
ast_frdup(), ast_frfree(), iax_frame_new(), and iax_frame_free() by keeping
a thread-local cache of these structures and using frames from the cache 
whenever possible instead of calling malloc/free every time.

This commit also converts the ast_frame and iax_frame structures to use the
linked list macros.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-29 20:50:36 +00:00
Russell Bryant 1ff5a0988d Merged revisions 40994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r40994 | russell | 2006-08-24 15:41:26 -0400 (Thu, 24 Aug 2006) | 11 lines

Fix a few issues related to the handling of channel variables
 - in pbx_builtin_serialize_variables(), the variable list traversal would stop
   on a variables with empty name/values, which is not appropriate
 - When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of
   AST_LIST_REMOVE
 - During masquerading, when copying the variables list from one channel to the
   other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list.
   It leaves the tail pointer of the list invalid.  Introduce a new macro,
   AST_LIST_APPEND_LIST that appends a list properly.
(issue #7802, softins)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-24 19:53:43 +00:00
Russell Bryant 389c605a67 - use the atomic operations for incrementing the unique int
- free the string fields allocation if ast_create_channel() failes to open the
  alert pipe
- formatting tweaks


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 19:35:28 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00