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
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
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
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
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
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
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
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
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
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
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
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
+ 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
around so that functions belonging to the same group are
close to each other.
At the beginning of each group i have added a bit of documentation
to explain what the group does and what is the typical flow - basically,
all i have learned by code inspection over the past few days should
be documented for you to read.
I have not put many doxygen annotations just because i am not
sure what are the proper ones. Hopefully some doxygen experts will jump in.
Next on the plate: try to figure out how "struct eventqent"
are supposed to work.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
On passing, fix a bug: close the socket if the allocation
of a structure for the new session fails.
(the bugfix is a candidate for 1.4)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
to start manager responses that need further lines.
This removes a lot of duplicate code from the various handlers
that at the moment build an ActionID string themselves.
Once settled, the function should move to manager.h so
it can be used by other files (chan_agent, chan_iax2, chan_sip,
chan_zap, res_jabber and app_queue).
I am not totally clear if there is a preferred position for
the ActionID: line in a message. Some instances put it at
the end, but one would argue that it is preferable to have
it at the beginning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
rather than use inline code for them.
Things are more readable this way, and also error processing
is more consistent.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
(they are committed a bit at a time so it is easier to
revert them in case we find a bug at a later time).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
of the file, so it can be used from more places;
+ make the declaration of contenttype[] more robust;
+ remove the wrappers around __xml_translate(), since they were
used only in one place, and rename to xml_translate().
This allows for a bit of simplifications.
+ document the output produced by the above function.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45485 65c4cc65-6c06-0410-ace0-fbb531ad65f3