Commit Graph

238 Commits

Author SHA1 Message Date
Russell Bryant 881ad15f2b various whitespace changes to reduce indentation and to better conform to
formatting guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 14:15:12 +00:00
Russell Bryant c227df91d9 Change the buffer used in callerid_feed() and callerid_feed_jp() to be
allocated on the stack using alloca() instead of using malloc() since
they are only used locally to these functions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02 14:07:48 +00:00
Russell Bryant d2117bf5a0 Merged revisions 46857 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46857 | russell | 2006-11-01 18:01:48 -0500 (Wed, 01 Nov 2006) | 2 lines

fix saying one hundred and two hundred in hebrew (issue #7810, eldadran)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 23:04:14 +00:00
Joshua Colp 9335b4bc1c Merged revisions 46780 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46780 | file | 2006-11-01 13:39:47 -0500 (Wed, 01 Nov 2006) | 2 lines

Force poll() emulation for Darwin to always be on. It's too broken to consider being used. This resolves the console issue OSX users have been seeing. I would have liked to autoconf this but I haven't been able to come up with a test case that works. Que sera.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 18:41:49 +00:00
Steve Murphy a89a16eb41 This introduces Brazilian Portuguese via 7663
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 18:14:17 +00:00
Steve Murphy 1bb9f6b362 Cleanups suggested by Russell.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 17:46:40 +00:00
Kevin P. Fleming 39a4700047 Merged revisions 46714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46714 | kpfleming | 2006-10-31 15:47:48 -0600 (Tue, 31 Oct 2006) | 2 lines

add an API so that translators can activate/deactivate themselves when needed

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 22:19:08 +00:00
Jason Parker 8b9ef26a45 Fix "core show translation" output. Issue #8243, patch by Damin.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 22:07:18 +00:00
Russell Bryant 59dbf47c91 Fix the new send text manager command. There is no way this could have worked.
- Check the channel name string length to be zero, not non-zero
- Check the message string length to be zero, not non-zero
- unlock the channel *after* calling sendtext


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 15:22:28 +00:00
Olle Johansson f003df1315 Issue #80898 - Restoring func_enum (otmar)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 11:01:06 +00:00
Olle Johansson 1aa8c2cffc Add manager sendtext action. (Issue 6131, ZX81 - thanks!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 10:42:22 +00:00
Olle Johansson 0487368645 Take two, using find_resource on Kevin's suggestion.
Might need better locking support, giving up if we can't get the lock. Right now,
using existing locking in find_resource


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 08:08:56 +00:00
Russell Bryant 2e5e32c574 Merged revisions 46561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r46561 | russell | 2006-10-31 01:19:56 -0500 (Tue, 31 Oct 2006) | 11 lines

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

........
r46560 | russell | 2006-10-31 01:18:36 -0500 (Tue, 31 Oct 2006) | 3 lines

When handling the case where the hostname is just an IPV4 numeric address,
be sure to set the address type.  (issue #8247, alexr)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:21:40 +00:00
Russell Bryant 94c9db95b1 Merged revisions 46554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46554 | russell | 2006-10-31 00:55:07 -0500 (Tue, 31 Oct 2006) | 5 lines

Add a small tweak to the code that checks to see whether destination formats
are translatable based on the source format.  If we have already determined
that there is no translation path in one direction, don't bother checking the
other direction.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-31 06:10:59 +00:00
Kevin P. Fleming 7afa6a1d01 Merged revisions 46526 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46526 | kpfleming | 2006-10-30 16:19:55 -0600 (Mon, 30 Oct 2006) | 3 lines

when unregistering a translator, don't rebuild the translation matrix unless needed
when filtering formats out of an offer, ensure we check for translation ability in both directions

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 22:27:56 +00:00
Olle Johansson 11d00cac15 Adding dialplan function IFMODULE, so you can create dialplans that handle
various PBX installations and checks if a module is loaded before using
it.
	example IFMODULE(chan_sip3.so)

issue #6671 in the bug tracker, finally gone. Thanks to mithraen for keeping
it updated.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 21:48:41 +00:00
Olle Johansson 692dc8fd80 Issue #3930 - Add manager command for listing dialplan (coded april 2005, in bugtracker since)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 21:18:39 +00:00
Olle Johansson 2cb07fbaa4 In debug mode, recognize that someone is sending zrtp, even though we
can't do anything with it yet. Ideally a first step would be a 
passthrough mode.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 16:59:02 +00:00
Olle Johansson 8a2e564df5 Issue 8246 Doxygen updates (kshumard)
THANK YOU!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30 16:33:02 +00:00
Olle Johansson 829f2c895d Small formatting changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 20:47:01 +00:00
Olle Johansson 52a5d63a2d Bind RTCP to the same IP as RTP.
I currently don't see this as a bug that needs to be fixed in 1.4/1.2 too,
but feel free to backport if you see it that way. RTCP now binds to
ALL IP addresses on the host, RTP to a specific address.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-29 20:21:33 +00:00
Russell Bryant 4337a82563 Merged revisions 46363 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46363 | russell | 2006-10-27 12:39:31 -0500 (Fri, 27 Oct 2006) | 5 lines

We should always be using _exit() after a fork() or vfork() instead of exit().
This is because exit() does some extra cleanup which in some implementations
of vfork(), for example, can actually modify the state of the parent process,
causing very weird bugs or crashes.  (issue #7971, Nick Gavrikov)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 17:42:57 +00:00
Russell Bryant 0ca6a42d7e fix various spelling mistakes in comments (issue #8237, jmls)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 17:52:15 +00:00
Russell Bryant 192a93aa37 Merged revisions 46329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46329 | russell | 2006-10-26 11:31:05 -0500 (Thu, 26 Oct 2006) | 11 lines

- If the source has no audio or no video portion, do not call powerof() to
  get the format index.
- Don't run through the audio and video loops if there is no audio or video
  portion of the source
If 0 is passed to powerof, it will return -1.  This value of -1 was then being
used as an array index in these loops, which caused a crash on some systems.
Other than this issue, this code works as we expected it to.  If a format is
not in the source, and we have to translation path to it, it is not offered in
the list of acceptable destination formats.
(fixes issue #8231)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 16:35:34 +00:00
Luigi Rizzo 6b2b63a909 fix a problem that i recently introduced when
the manager receives long commands.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 12:47:23 +00:00
Mark Spencer b7517f1231 Fix comment preservation code (thanks murf!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-26 01:38:47 +00:00
Kevin P. Fleming 5f5faa310a Merged revisions 46082-46083,46152-46153 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46082 | kpfleming | 2006-10-23 22:45:42 -0500 (Mon, 23 Oct 2006) | 2 lines

add an API call to allow channel drivers to determine which media formats are compatible (passthrough or transcode) with the format an existing channel is already using

........
r46083 | kpfleming | 2006-10-23 22:53:32 -0500 (Mon, 23 Oct 2006) | 2 lines

ensure that the translation matrix is properly lock-protected every place it is used

........
r46152 | kpfleming | 2006-10-24 18:45:19 -0500 (Tue, 24 Oct 2006) | 2 lines

if multiple translators are registered for the same source/dest combination, ensure that the lowest-cost one is always inserted earlier in the list

........
r46153 | kpfleming | 2006-10-24 19:10:54 -0500 (Tue, 24 Oct 2006) | 2 lines

code zone experiment: don't offer formats in the outbound INVITE that aren't either passthrough or translatable

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:55:11 +00:00
Kevin P. Fleming 749029de38 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Kevin P. Fleming 88efcea05e Merged revisions 46154 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46154 | kpfleming | 2006-10-24 19:26:17 -0500 (Tue, 24 Oct 2006) | 2 lines

add passthrough and file format support for G.722 16KHz audio (issue #5084, original patch by andrew, updated by mithraen)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 00:32:23 +00:00
Luigi Rizzo a7d5fcd8b8 i really think it is safe to commit this version, that
simplifies the manager queue handling as described in
the comment, and will make a lot easier to make further
work on this code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46120 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-24 17:14:12 +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
Luigi Rizzo 9bbf557dfb use autodetected support for gethostbyname_r
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 16:54:54 +00:00
Luigi Rizzo c15f7953c8 Fix a few issues in the previous (disabled) HTTPS code,
and support linux as well (using fopencookie(), which should
be available in glibc).

Update configure.ac to check for funopen (BSD) and fopencookie(glibc),
and while we are at it also for gethostbyname_r
(the generated files need to be updated, or you need
to run bootstrap.sh yourself).

Document the new options in http.conf.sample
(names are only tentative, better ones are welcome).

At this point we can safely enable the option.
Anyone willing to try this on Sun and Apple platforms ?



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 19:09:25 +00:00
Luigi Rizzo e8a65b7155 Implement https support.
The changes are not large. Most of the diff comes from putting the
global variables describing an accept session into a structure, so
we can reuse the existing code for running multiple accept threads
on different ports.

Once this is done, and if your system has the funopen() library
function (and ssl, of course), it is just a matter of calling
the appropriate functions to set up the ssl connection on the
existing socket, and everything works on the secure channel now.

At the moment, the code is disabled because i have not implemented yet
the autoconf code to detect the presence of funopen(), and add -lssl
to main/Makefile if ssl libraries are present. And a bit of documentation
on the http.conf arguments, too.


If you want to manually enable https support, that is very simple
(step 0 1 2 will be eventually detected by ./configure, the
rest is something you will have to do anyways).

0. make sure your system has funopen(3). FreeBSD does, linux probably
   does too, not sure about other systems.

1. uncomment the following line in main/http.c
   // #define      DO_SSL  /* comment in/out if you want to support ssl */

2. add -lssl to AST_LIBS in main/Makefile

3. add the following options to http.conf

	sslenable=yes
	sslbindport=4433	; pick one you like
	sslcert=/tmp/foo.pem		; path to your certificate file.

4. generate a suitable certificate e.g. (example from mini_httpd's Makefile:

	openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem

and here you go:

	https://localhost:4433/asterisk/manager

now works.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 12:02:35 +00:00
Luigi Rizzo 5aa25a8d33 it is useless and possibly wrong to use ast_cli() to send the
reply back to http clients.
Use fprintf/fwrite instead, since we are already using a FILE *
to read the input.

If you wonder why, this is because it makes it trivial to
implement https support (as long as your system has funopen()).

And this is what i am going to put in with the next few commits...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 08:28:16 +00:00
Joshua Colp e85da9be41 Let's have build.h created a bit earlier so that func_version can use it and not stop the build on a fresh machine that has never had Asterisk installed on it before...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-22 04:44:43 +00:00
Luigi Rizzo a0ae6ebd8e the default port number was erroneously stored in host order,
and reading from the config file used ntohs instead of htons.

this ought to be merged to 1.4 as well.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-21 20:24:04 +00:00
Joshua Colp 62d3a11eb9 Merged revisions 45817 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45817 | file | 2006-10-21 14:48:58 -0400 (Sat, 21 Oct 2006) | 2 lines

Don't use promotion on Darwin because it doesn't seem to work quite right in all cases, this should solve the unresolved symbol issue people have been seeing.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-21 18:52:33 +00:00
Luigi Rizzo edd8e11889 minor comment changes, code rearrangement and field renaming
to minimize diffs with future modifications.

The current implementation is problematic for the following reasons:
+ all insertions are O(N) because the event list does not have a tail
  pointer;
+ there is only a single lock protecting both session and users queues.
+ the implementation of the queue itself is not documented.
  I think i have figured it out, more or less, but am unclear on
  whether there is proper locking in place

The rewrite (which i have working locally) uses a tailq so insertions
are O(1), separate locks for the event and session queues, and has
a documented implementation so hopefully we can figure out if/where
bug exist.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-20 11:24:43 +00:00
Olle Johansson e19576388d Doxygen corrections
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-20 08:00:13 +00:00
Luigi Rizzo e7c2295b81 more fixes to comments and very minor code rearrangement.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 17:26:20 +00:00
Luigi Rizzo 32214ffc02 implement proper XML/HTML formatting of multiple messages
(e.g. the result of waitevent).

Also fix some comments.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 17:07:08 +00:00
Luigi Rizzo 9934b7f4d2 more documentation of data structure and functions.
Of interest:
+ ast_get_manager_by_name_locked() is now without the ast_
  prefix as it is a local function;

+ unuse_eventqent() renamed to unref_event(), and returns
  the pointer to the next entry.

+ marked with XXX a couple of usages of unref_event()
  because i suspect we are addressing the wrong entry.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-19 07:43:43 +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
Luigi Rizzo 71c67605ca silent warning from a debugging message (which will go away
soon, anyways)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 22:40:02 +00:00
Luigi Rizzo eee51dbd1c remove trailing whitespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 21:41:09 +00:00
Luigi Rizzo 9e9edb05ec ouch! remember to unlink temporary files once done with them.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 21:36:20 +00:00
Luigi Rizzo 3c2eaaf1f0 + move output_format variables in the http section of the file;
+ more comments on struct mansession and global variables;
+ small improvements to the session matching code so it supports
  multiple sessions from the same IP



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 21:30:21 +00:00
Joshua Colp 0ff90f87c5 Merged revisions 45595 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r45595 | file | 2006-10-18 17:03:34 -0400 (Wed, 18 Oct 2006) | 2 lines

Don't modify things if we are using vfork as this is very bad and may cause unexpected behavior (issue #7970 reported by Nick Gavrikov)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 21:05:52 +00:00
Luigi Rizzo c046fb40d8 another bunch of comments on the data structures.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-18 17:53:47 +00:00