Copied remotely
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@45 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9e25200d8e
commit
71963ea8f7
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
APR (> make apr)
|
||||
it will and download and build and install apr if needed but remember to make sure
|
||||
/usr/local/apr/lib is in the LD_LIBRARY_PATH that's up to you
|
||||
|
||||
|
||||
cp modules.conf.in modules.conf and edit to taste
|
||||
|
||||
if you want sip:
|
||||
make sure mod_exosip is uncommeted in modules.conf
|
||||
make common
|
||||
make exosip
|
||||
|
||||
|
||||
make; make install
|
||||
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
EXTRA_DIST =
|
||||
SUBDIRS =
|
||||
AUTOMAKE_OPTS = gnu
|
||||
MAKE=gmake
|
||||
NAME=freeswitch
|
||||
PREFIX=$(prefix)/${NAME}
|
||||
APR_CONFIG=$(prefix)/bin/apr-1-config
|
||||
AM_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes)
|
||||
|
||||
AM_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs )
|
||||
OSARCH=$(shell uname -s)
|
||||
|
||||
if ISLINUX
|
||||
AM_LDFLAGS += -Wl,-E
|
||||
endif
|
||||
|
||||
AM_LDFLAGS += -L$(PREFIX)/lib
|
||||
|
||||
|
||||
AM_CFLAGS += -fPIC -Wall
|
||||
AM_CFLAGS +=-I$(PWD) -I$(PWD)/src/include -I$(PREFIX)/include
|
||||
AM_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
|
||||
AM_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
|
||||
AM_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
|
||||
|
||||
libfreeswitch_la_SOURCES = \
|
||||
src/include/switch.h \
|
||||
src/include/switch_channel.h \
|
||||
src/include/switch_config.h \
|
||||
src/include/switch_console.h \
|
||||
src/include/switch_core.h \
|
||||
src/include/switch_frame.h \
|
||||
src/include/switch_loadable_module.h \
|
||||
src/include/switch_module_interfaces.h \
|
||||
src/include/switch_mutex.h \
|
||||
src/include/switch_types.h \
|
||||
src/include/switch_utils.h \
|
||||
src/include/switch_caller.h \
|
||||
src/include/switch_buffer.h \
|
||||
src/switch_buffer.c \
|
||||
src/switch_caller.c \
|
||||
src/switch_channel.c \
|
||||
src/switch_config.c \
|
||||
src/switch_console.c \
|
||||
src/switch_core.c \
|
||||
src/switch_loadable_module.c \
|
||||
src/switch_mutex.c \
|
||||
src/switch_utils.c
|
||||
|
||||
#bindir = $(PREFIX)/bin
|
||||
#libdir = $(PREFIX)/lib
|
||||
library_includedir = $(PREFIX)/include
|
||||
library_include_HEADERS = src/include/switch.h \
|
||||
src/include/switch_channel.h \
|
||||
src/include/switch_config.h \
|
||||
src/include/switch_console.h \
|
||||
src/include/switch_core.h \
|
||||
src/include/switch_frame.h \
|
||||
src/include/switch_loadable_module.h \
|
||||
src/include/switch_module_interfaces.h \
|
||||
src/include/switch_mutex.h \
|
||||
src/include/switch_types.h \
|
||||
src/include/switch_utils.h \
|
||||
src/include/switch_caller.h \
|
||||
src/include/switch_buffer.h
|
||||
|
||||
lib_LTLIBRARIES = libfreeswitch.la
|
||||
libfreeswitch_la_CFLAGS = $(AM_CFLAGS) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g
|
||||
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
|
||||
|
||||
bin_PROGRAMS = freeswitch
|
||||
freeswitch_SOURCES = src/switch.c
|
||||
freeswitch_CFLAGS = $(AM_CFLAGS)
|
||||
freeswitch_LDFLAGS = -static -lfreeswitch
|
||||
|
||||
modules: $(NAME)
|
||||
@echo making modules
|
||||
@cd src/mod && for i in $(shell cat modules.conf | grep -v \#) ; do echo making $$i ; LDFLAGS="$(AM_LDFLAGS) -lfreeswitch" CFLAGS="$(AM_CFLAGS)" CC="$(CC)" MOD="$$i" $(PWD)/modmake.sh $(PWD) $$i || exit 1; done
|
||||
|
||||
modclean:
|
||||
@cd src/mod && for i in [a-z]* ; do echo making clean $$i ; CFLAGS="$(CFLAGS)" CC="$(CC)" MOD="$$i" make -f $(PWD)/generic_mod.mk -C $$i clean || exit 1; done
|
||||
|
||||
|
||||
install_mod:
|
||||
@echo Installing $(NAME)
|
||||
@mkdir -p $(PREFIX) $(PREFIX)/conf $(PREFIX)/mod $(PREFIX)/db
|
||||
@/bin/cp -p ./$(NAME) $(PREFIX)/bin
|
||||
@ln -sf $(PREFIX)/bin/$(NAME) /usr/bin
|
||||
@echo Installing Modules
|
||||
@/bin/cp -f src/mod/*/mod_*.so $(PREFIX)/mod >/dev/null 2<&1 || echo No modules to copy.
|
||||
@echo done
|
||||
|
||||
|
||||
eclean: clean
|
||||
rm -f `find . -type f -name \*~`
|
||||
rm -f `find . -type f -name \.*~`
|
||||
rm -f `find . -type f -name \#\*`
|
||||
rm -f `find . -type f -name \.\#\*`
|
||||
rm -f `find . -type f -name core\*`
|
||||
rm -f *.tar *.tgz *.gz
|
||||
|
||||
megaclean: eclean modclean
|
||||
rm -fr $(SQLITETAR) $(SQLITE) $(APR) $(APRTAR) $(SOX) $(SOXTAR) $(COMMONTAR)
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,32 @@
|
|||
Freeswitch depends on several out of tree libraries. All of freeswitch depends on APR, and mod_exosip depends on osip, exosip, jtrhead, and jrtplib.
|
||||
Download locations and links for details can be found below.
|
||||
|
||||
Apr info available at: http://apr.apache.org
|
||||
|
||||
Download Locations:
|
||||
apr: http://apache.mirrors.versehost.com/apr/apr-1.2.2.tar.gz
|
||||
|
||||
Backup Download Locations:
|
||||
apr: http://www.sofaswitch.org/mikej/apr-1.2.2.tar.gz
|
||||
|
||||
|
||||
Exosip\Osip info available at: http://www.antisip.com/
|
||||
|
||||
Download Locations:
|
||||
osip: http://www.antisip.com/download/libosip2-2.2.1.tar.gz
|
||||
exosip: http://www.antisip.com/download/libeXosip-0.9.0.tar.gz
|
||||
|
||||
Backup Download Locations:
|
||||
osip: http://www.sofaswitch.org/mikej/libosip2-2.2.1.tar.gz
|
||||
exosip: http://www.sofaswitch.org/mikej/libeXosip-0.9.0.tar.gz
|
||||
|
||||
|
||||
Jthread\Jrtplib info available at: http://research.edm.luc.ac.be/jori/page.html
|
||||
|
||||
Download Locations:
|
||||
jthread: http://research.edm.luc.ac.be/jori/jthread/jthread-1.1.2.tar.gz
|
||||
jrtplib: http://research.edm.luc.ac.be/jori/jrtplib/jrtplib-3.3.0.tar.gz
|
||||
|
||||
Backup Download Locations:
|
||||
jthread: http://www.sofaswitch.org/mikej/jthread-1.1.2.tar.gz
|
||||
jrtplib: http://www.sofaswitch.org/mikej/jrtplib-3.3.0.tar.gz
|
|
@ -0,0 +1,9 @@
|
|||
1. MOD_PLAYBACK: Convert to use APR files, remove all the WIN32 ifdefs for file stuff.
|
||||
2. switch.h: Find a good home for the SWITCH_DECLARE stuff for win32
|
||||
3. MOD_WOOMERACHAN: #if 1==0 sectiton, convert to use switch_now instead of gettimeof day
|
||||
SWITCH_SLEEP (should I be using switch_sleep or switch_yield where I changed from sleep and usleep)
|
||||
4. all // comented headers and code, cleanup\remove after verifying everything works happy on other platforms
|
||||
5. if we don't need the timeval stuff let's get rid of it... it doesn't appear to be used.
|
||||
6. Decide if we are going to keep the libraries in tree or if we build a system that downloads (and patches if necessary)
|
||||
7. Exclude .ilk files from loading as modules (they are built when building debug builds and greatly increase the speed of re-linking the lib on a recompile)...
|
||||
it is necessary if we want to be able to debug from the gui. It can be #ifdef WIN32'd if you like.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,99 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# compile PROGRAM [ARGS]...
|
||||
# `-o FOO.o' is removed from the args passed to the actual compile.
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
args=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we do something ugly here.
|
||||
ofile=$2
|
||||
shift
|
||||
case "$ofile" in
|
||||
*.o | *.obj)
|
||||
;;
|
||||
*)
|
||||
args="$args -o $ofile"
|
||||
ofile=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
args="$args $1"
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$prog" $args
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir $lockdir > /dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir $lockdir; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$prog" $args
|
||||
status=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir $lockdir
|
||||
exit $status
|
|
@ -0,0 +1,4 @@
|
|||
[extensions]
|
||||
|
||||
1000 => playback /tmp/siriusraw.raw
|
||||
888 => bridge woomera/888@10.200.68.194
|
|
@ -0,0 +1,8 @@
|
|||
[settings]
|
||||
span=1
|
||||
dchan=24
|
||||
node=cpe
|
||||
switch=ni2
|
||||
debug=1
|
||||
dialplan=demo
|
||||
bpf=160
|
|
@ -0,0 +1,8 @@
|
|||
[settings]
|
||||
debug=2
|
||||
|
||||
[profile]
|
||||
host=localhost
|
||||
port=42420
|
||||
audio_ip=10.200.10.20
|
||||
dialplan=demo
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,155 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#undef HAVE_STRNCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,41 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
|
||||
AM_INIT_AUTOMAKE(libfreeswitch,0.1)
|
||||
AC_CONFIG_SRCDIR([src/switch.c])
|
||||
AC_CONFIG_HEADER([src/include/config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([sys/types.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS([gethostname])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
|
||||
|
||||
|
||||
|
||||
AC_OUTPUT
|
|
@ -0,0 +1,45 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
|
||||
AC_CONFIG_SRCDIR([switch.c])
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# Checks for libraries.
|
||||
# FIXME: Replace `main' with a function in `-leXosip2':
|
||||
AC_CHECK_LIB([eXosip2], [main])
|
||||
# FIXME: Replace `main' with a function in `-lsangoma':
|
||||
AC_CHECK_LIB([sangoma], [main])
|
||||
# FIXME: Replace `main' with a function in `-lspeex':
|
||||
AC_CHECK_LIB([speex], [main])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
# Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_STRFTIME
|
||||
AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset socket strcasecmp strchr strdup strncasecmp strstr])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
mod/mod_exosip/Makefile
|
||||
mod/mod_g711codec/Makefile
|
||||
mod/mod_speexcodec/Makefile
|
||||
mod/mod_wanchan/Makefile])
|
||||
AC_OUTPUT
|
|
@ -0,0 +1,479 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
$(MOD).so: $(MOD).c
|
||||
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
|
||||
$(CC) -shared -Xlinker -x $(MOD).o -o $(MOD).so $(LDFLAGS)
|
||||
|
||||
all: $(MOD).so
|
||||
|
||||
clean:
|
||||
rm -fr *.so *.o *~
|
||||
|
|
@ -0,0 +1,294 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,336 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,111 @@
|
|||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
pwd=$1
|
||||
shift
|
||||
mod=$1
|
||||
shift
|
||||
|
||||
make=`which gmake`
|
||||
|
||||
if [ -z $make ] ; then
|
||||
make=`which make`
|
||||
fi
|
||||
|
||||
if [ -f $mod/Makefile ] ; then
|
||||
$make -C $mod
|
||||
else
|
||||
$make -f $pwd/generic_mod.mk -C $mod
|
||||
fi
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# list the modules to build
|
||||
mod_bridgecall
|
||||
mod_dialplan_demo
|
||||
mod_softtimer
|
||||
mod_woomerachan
|
||||
mod_playback
|
||||
#mod_wanchan
|
||||
mod_speexcodec
|
||||
mod_exosip
|
||||
mod_g711codec
|
||||
mod_rawaudio
|
|
@ -0,0 +1,14 @@
|
|||
# list the modules to build
|
||||
mod_bridgecall
|
||||
mod_dialplan_demo
|
||||
mod_softtimer
|
||||
#mod_zaptimer
|
||||
#mod_rtctimer
|
||||
mod_woomerachan
|
||||
mod_playback
|
||||
#mod_wanchan
|
||||
#mod_speexcodec
|
||||
#mod_speextest
|
||||
#mod_exosip
|
||||
mod_g711codec
|
||||
mod_rawaudio
|
|
@ -0,0 +1,254 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="FreeSwitchConsole"
|
||||
ProjectGUID="{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)include;$(InputDir)..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/FreeSwitch.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/FreeSwitchConsole.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)include;$(InputDir)..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/FreeSwitch.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\switch.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_buffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_caller.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_channel.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_console.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_core.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_frame.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_loadable_module.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_module_interfaces.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_mutex.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_utils.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,291 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="FreeSwitchCoreLib"
|
||||
ProjectGUID="{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
|
||||
RootNamespace="FreeSwitchCoreLib"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\src\include;"..\..\..\apr-1.2.2\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/FreeSwitch.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/FreeSwitchCore.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/FreeSwitchCore.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)include;$(InputDir)..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib"
|
||||
OutputFile="$(OutDir)/FreeSwitch.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/FreeSwitchCore.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_buffer.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_caller.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_channel.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_config.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_console.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_core.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_loadable_module.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_mutex.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_utils.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_buffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_caller.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_channel.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_console.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_core.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_frame.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_loadable_module.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_module_interfaces.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_mutex.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_utils.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,342 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "FreeSwitchCore.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "FreeSwitchConsole.vcproj", "{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_bridgecall", "mod_bridgecall.vcproj", "{E1794405-29D4-466D-9BE3-DD2344C2A663}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_softtimer", "mod_softtimer.vcproj", "{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_demo", "mod_dialplan_demo.vcproj", "{2988EB83-785F-45D4-8731-8E1E4345177E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_exosip", "mod_exosip.vcproj", "{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA} = {85255507-5D16-4218-85E2-F683BB2F04DA}
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783} = {E85B3E1F-B671-4E84-9F09-90F61A27D783}
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5} = {44F46B7E-0E51-4304-9735-330DFBAB41E5}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262} = {4EA67539-9EE9-4065-BD39-87E517FD8262}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g711codec", "mod_g711codec.vcproj", "{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_playback", "mod_playback.vcproj", "{78100236-7CEA-4948-96CC-E8ED3160329C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rawaudio", "mod_rawaudio.vcproj", "{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_woomerachan", "mod_woomerachan.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{13860EB7-038A-438F-898F-1032E42A5574} = {13860EB7-038A-438F-898F-1032E42A5574}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapr", "..\..\..\apr\libapr.vcproj", "{13860EB7-038A-438F-898F-1032E42A5574}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osip2", "..\..\..\osip\platform\vsnet\osip2.vcproj", "{85255507-5D16-4218-85E2-F683BB2F04DA}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5} = {44F46B7E-0E51-4304-9735-330DFBAB41E5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osipparser2", "..\..\..\osip\platform\vsnet\osipparser2.vcproj", "{44F46B7E-0E51-4304-9735-330DFBAB41E5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eXosip", "..\..\..\eXosip\platform\vsnet\eXosip.vcproj", "{4EA67539-9EE9-4065-BD39-87E517FD8262}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtp4c", "..\..\..\jrtp4c\w32\jrtp4c\jrtp4c.vcproj", "{E85B3E1F-B671-4E84-9F09-90F61A27D783}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{4009F58A-E333-424B-A868-7E82804DD055} = {4009F58A-E333-424B-A868-7E82804DD055}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jthread", "..\..\..\jthread\jthread.vcproj", "{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "..\..\..\jrtplib\jrtplib.vcproj", "{4009F58A-E333-424B-A868-7E82804DD055}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6} = {96A714AE-BE53-4EFF-8569-C3809AD4F3B6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug IPv6 MSR|Win32 = Debug IPv6 MSR|Win32
|
||||
Debug IPv6 Musica|Win32 = Debug IPv6 Musica|Win32
|
||||
Debug IPv6 Win2000|Win32 = Debug IPv6 Win2000|Win32
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release IPv6 Win2000|Win32 = Release IPv6 Win2000|Win32
|
||||
Release IPv6 XP|Win32 = Release IPv6 XP|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}.Release|Win32.Build.0 = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}.Release|Win32.Build.0 = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E1794405-29D4-466D-9BE3-DD2344C2A663}.Release|Win32.Build.0 = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}.Release|Win32.Build.0 = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2988EB83-785F-45D4-8731-8E1E4345177E}.Release|Win32.Build.0 = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}.Release|Win32.Build.0 = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}.Release|Win32.Build.0 = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{78100236-7CEA-4948-96CC-E8ED3160329C}.Release|Win32.Build.0 = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}.Release|Win32.Build.0 = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FE3540C5-3303-46E0-A69E-D92F775687F1}.Release|Win32.Build.0 = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{13860EB7-038A-438F-898F-1032E42A5574}.Release|Win32.Build.0 = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{85255507-5D16-4218-85E2-F683BB2F04DA}.Release|Win32.Build.0 = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{44F46B7E-0E51-4304-9735-330DFBAB41E5}.Release|Win32.Build.0 = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.Build.0 = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E85B3E1F-B671-4E84-9F09-90F61A27D783}.Release|Win32.Build.0 = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}.Release|Win32.Build.0 = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4009F58A-E333-424B-A868-7E82804DD055}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,124 @@
|
|||
REM @echo off
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** VARIABLE SETUP *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
for /f %%i in ('cscript /Nologo .\tools\Fulldir.vbs .\..\..\..\..') DO SET BASEDIR=%%i
|
||||
set UTILSDIR=%BASEDIR%\src\freeswitch\platform\vsnet\Tools
|
||||
set INCLUDEDIR=%BASEDIR%\include
|
||||
set LIBSRCDIR=%BASEDIR%\src
|
||||
set DEBUGLIBBINDIR=%BASEDIR%\debuglib
|
||||
set WGET=cscript %UTILSDIR%\wget.vbs
|
||||
set TAR=%UTILSDIR%\tar.exe
|
||||
set TARURL=http://users.pandora.be/larc/download/windows_management/tar.exe
|
||||
set TARURL2=http://www.sofaswitch.org/mikej/tar.exe
|
||||
set GUNZIP=%UTILSDIR%\gunzip.exe
|
||||
set GUNZIPURL=http://users.pandora.be/larc/download/windows_management/gunzip.exe
|
||||
set GUNZIPURL2=http://www.sofaswitch.org/mikej/gunzip.exe
|
||||
set UNIX2DOS=%UTILSDIR%\unix2dos.vbs
|
||||
set APRDIR=apr-1.2.2
|
||||
set APRTAR=%APRDIR%.tar.gz
|
||||
set APRURL=ftp://ftp.wayne.edu/apache/apr/
|
||||
set APRDESTDIR=apr
|
||||
REM set CCRTPDIR=ccrtp-1.3.5
|
||||
REM set CCRTPTAR=%CCRTPDIR%.tar.gz
|
||||
REM set CCRTPURL=ftp://ftp.gnu.org/pub/gnu/ccrtp/
|
||||
REM set CCRTPDESTDIR=ccrtp
|
||||
REM set CCPPDIR=commoncpp2-1.3.21
|
||||
REM set CCPPTAR=%CCPPDIR%.tar.gz
|
||||
REM set CCPPURL=ftp://ftp.gnu.org/gnu/commoncpp/
|
||||
REM set CCPPDESTDIR=commoncpp2
|
||||
set EXOSIPDIR=libeXosip-0.9.0
|
||||
set EXOSIPTAR=%EXOSIPDIR%.tar.gz
|
||||
set EXOSIPURL=http://www.antisip.com/download/
|
||||
set EXOSIPDESTDIR=eXosip
|
||||
set OSIPDIR=libosip2-2.2.1
|
||||
set OSIPTAR=%OSIPDIR%.tar.gz
|
||||
set OSIPURL=http://www.antisip.com/download/
|
||||
set OSIPDESTDIR=libosip2-2.2.0
|
||||
|
||||
IF NOT EXIST %INCLUDEDIR% md %INCLUDEDIR%
|
||||
IF NOT EXIST %DEBUGLIBBINDIR% md %DEBUGLIBBINDIR%
|
||||
IF NOT EXIST %LIBSRCDIR% md %LIBSRCDIR%
|
||||
cd %LIBSRCDIR%
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** DOWNLOADS *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
IF NOT EXIST %TAR% %WGET% %TARURL% %UTILSDIR%
|
||||
IF NOT EXIST %TAR% %WGET% %TARURL2% %UTILSDIR%
|
||||
IF NOT EXIST %GUNZIP% %WGET% %GUNZIPURL% %UTILSDIR%
|
||||
IF NOT EXIST %GUNZIP% %WGET% %GUNZIPURL2% %UTILSDIR%
|
||||
|
||||
IF NOT EXIST %APRTAR% IF NOT EXIST %APRDESTDIR% %WGET% %APRURL%%APRTAR% & %GUNZIP% < %APRTAR% | %TAR% xvf - & ren %APRDIR% %APRDESTDIR% & del %APRTAR%
|
||||
IF NOT EXIST %EXOSIPTAR% IF NOT EXIST %EXOSIPDESTDIR% %WGET% %EXOSIPURL%%EXOSIPTAR% & %GUNZIP% < %EXOSIPTAR% | %TAR% xvf - & ren %EXOSIPDIR% %EXOSIPDESTDIR% & del %EXOSIPTAR%
|
||||
IF NOT EXIST %OSIPTAR% IF NOT EXIST %OSIPDESTDIR% %WGET% %OSIPURL%%OSIPTAR% & %GUNZIP% < %OSIPTAR% | %TAR% xvf - & ren %OSIPDIR% %OSIPDESTDIR% & del %OSIPTAR%
|
||||
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** VS Version Detection *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
IF EXIST "%VS80COMNTOOLS%..\IDE\devenv.exe" GOTO VS8
|
||||
IF EXIST "%VS71COMNTOOLS%..\IDE\devenv.exe" GOTO VS7
|
||||
echo no Visual Studio .net 2003 or greater found. I don't know how to autobuild projects. Please manually build libs.
|
||||
GOTO END
|
||||
|
||||
:VS8
|
||||
set DEVENV="%VS80COMNTOOLS%..\IDE\devenv"
|
||||
IF NOT EXIST %UTILSDIR%\upgrade.vbs copy %UTILSDIR%\upgrade8.vbs %UTILSDIR%\upgrade.vbs
|
||||
call "%VS80COMNTOOLS%vsvars32.bat"
|
||||
GOTO NEXT
|
||||
|
||||
:VS7
|
||||
set DEVENV="%VS71COMNTOOLS%..\IDE\devenv"
|
||||
IF NOT EXIST %UTILSDIR%\upgrade.vbs copy %UTILSDIR%\upgrade7.vbs %UTILSDIR%\upgrade.vbs
|
||||
call "%VS71COMNTOOLS%vsvars32.bat"
|
||||
|
||||
:NEXT
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** APR BUILD *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
cd %APRDESTDIR%
|
||||
IF NOT EXIST %INCLUDEDIR%\apr.h copy %LIBSRCDIR%\%APRDESTDIR%\include\*.h %INCLUDEDIR%
|
||||
IF NOT EXIST %INCLUDEDIR%\apr.h copy %LIBSRCDIR%\%APRDESTDIR%\include\apr.hw %INCLUDEDIR%\apr.h
|
||||
IF NOT EXIST libapr.vcproj %UNIX2DOS% libapr.dsp
|
||||
IF NOT EXIST libapr.vcproj cscript %UTILSDIR%\upgrade.vbs libapr.dsp libapr.vcproj
|
||||
%DEVENV% libapr.vcproj /build Debug
|
||||
REM %DEVENV% libapr.vcproj /build Release
|
||||
copy %LIBSRCDIR%\%APRDESTDIR%\debug\*.lib %DEBUGLIBBINDIR%
|
||||
copy %LIBSRCDIR%\%APRDESTDIR%\debug\*.dll %DEBUGLIBBINDIR%
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** OSIP BUILD *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
IF NOT EXIST %INCLUDEDIR%\osip2 md %INCLUDEDIR%\osip2
|
||||
IF NOT EXIST %INCLUDEDIR%\osipparser2 md %INCLUDEDIR%\osipparser2
|
||||
IF NOT EXIST %INCLUDEDIR%\osip2\osip.h copy %LIBSRCDIR%\%OSIPDESTDIR%\include\osip2\*.h %INCLUDEDIR%\osip2
|
||||
IF NOT EXIST %INCLUDEDIR%\osipparser2\osip_parser.h copy %LIBSRCDIR%\%OSIPDESTDIR%\include\osipparser2\*.h %INCLUDEDIR%\osipparser2
|
||||
%DEVENV% %LIBSRCDIR%\%OSIPDESTDIR%\platform\vsnet\osip.sln /Upgrade
|
||||
%DEVENV% %LIBSRCDIR%\%OSIPDESTDIR%\platform\vsnet\osip.sln /build Debug
|
||||
REM %DEVENV% %LIBSRCDIR%\%OSIPDESTDIR%\platform\vsnet\osip.sln /build Release
|
||||
copy %LIBSRCDIR%\%OSIPDESTDIR%\platform\vsnet\debug\*.lib %DEBUGLIBBINDIR%
|
||||
|
||||
|
||||
ECHO ****************************************************************
|
||||
ECHO ************** EXOSIP BUILD *****************
|
||||
ECHO ****************************************************************
|
||||
|
||||
IF NOT EXIST "%INCLUDEDIR%\eXosip" md "%INCLUDEDIR%\eXosip"
|
||||
IF NOT EXIST %INCLUDEDIR%\eXosip copy "%LIBSRCDIR%\%EXOSIPDESTDIR%\include\eXosip\*.h" "%INCLUDEDIR%\eXosip"
|
||||
%UNIX2DOS% %LIBSRCDIR%\%EXOSIPDESTDIR%\platform\windows\eXosip.vcproj
|
||||
%DEVENV% %LIBSRCDIR%\%EXOSIPDESTDIR%\platform\windows\eXosip.vcproj /Upgrade
|
||||
%DEVENV% %LIBSRCDIR%\%EXOSIPDESTDIR%\platform\windows\eXosip.vcproj /build Debug
|
||||
REM %DEVENV% %LIBSRCDIR%\%EXOSIPDESTDIR%\platform\windows\eXosip.vcproj /build Release
|
||||
copy %LIBSRCDIR%\%EXOSIPDESTDIR%\platform\windows\debug\*.lib %DEBUGLIBBINDIR%
|
||||
|
||||
|
||||
:END
|
||||
cd %BASEDIR%
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
echo %0
|
||||
md conf
|
||||
xcopy -D ..\..\..\conf\*.* conf
|
||||
cd mod
|
||||
md temp
|
||||
move *.ilk temp
|
||||
cd ..
|
||||
FreeSwitch.exe
|
||||
cd mod
|
||||
copy .\temp\*.ilk
|
||||
del .\temp\*.ilk
|
||||
rd temp
|
||||
pause
|
|
@ -0,0 +1,12 @@
|
|||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'system, user, or process
|
||||
wscript.echo Showpath(objargs(0))
|
||||
|
||||
Function Showpath(folderspec)
|
||||
Dim fso, f
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
Set f = fso.GetFolder(folderspec)
|
||||
showpath = f.path
|
||||
End Function
|
|
@ -0,0 +1,20 @@
|
|||
Const OpenAsASCII = 0 ' Opens the file as ASCII (TristateFalse)
|
||||
Const OpenAsUnicode = -1 ' Opens the file as Unicode (TristateTrue)
|
||||
Const OpenAsDefault = -2 ' Opens the file using the system default
|
||||
|
||||
Const OverwriteIfExist = -1
|
||||
Const FailIfNotExist = 0
|
||||
Const ForReading = 1
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
' path to original log file
|
||||
sFileName = objargs(0)
|
||||
|
||||
Set oFSO = CreateObject("Scripting.FileSystemObject")
|
||||
Set fOrgFile = oFSO.OpenTextFile(sFileName, ForReading, FailIfNotExist, OpenAsASCII)
|
||||
sText = fOrgFile.ReadAll
|
||||
fOrgFile.Close
|
||||
sText = Replace(sText, vbLf, vbCrLf)
|
||||
Set fNewFile = oFSO.CreateTextFile(sFileName, OverwriteIfExist, OpenAsASCII)
|
||||
fNewFile.WriteLine sText
|
||||
fNewFile.Close
|
|
@ -0,0 +1,28 @@
|
|||
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.7.1")
|
||||
Set objFile = Createobject("Scripting.FileSystemObject")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'// check the arguments to be sure it's right
|
||||
if (objArgs.Count() < 2) Then
|
||||
WScript.Echo("VC6 or 5 DSP Project File Conversion")
|
||||
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
|
||||
WScript.Echo("Will create project file with .vcproj extension")
|
||||
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
|
||||
WScript.Quit(1)
|
||||
End If
|
||||
WScript.Echo("Converting: "+ objArgs.Item(0))
|
||||
'// If there is a file name of the .vcproj extension, do not convert
|
||||
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
|
||||
If Not objFile.FileExists(vcProject.ProjectFile) Then
|
||||
' // specify name and location of new project file
|
||||
vcProject.ProjectFile = objArgs.Item(1)
|
||||
|
||||
' // call the project engine to save this off.
|
||||
' // when no name is shown, it will create one with the .vcproj name
|
||||
vcProject.Save()
|
||||
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
|
||||
|
||||
else
|
||||
|
||||
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
|
||||
End If
|
|
@ -0,0 +1,28 @@
|
|||
Set vcProj = CreateObject("VisualStudio.VCProjectEngine.8.0")
|
||||
Set objFile = Createobject("Scripting.FileSystemObject")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
'// check the arguments to be sure it's right
|
||||
if (objArgs.Count() < 2) Then
|
||||
WScript.Echo("VC6 or 5 DSP Project File Conversion")
|
||||
WScript.Echo("Opens specified .dsp and converts to VC7.1 Format.")
|
||||
WScript.Echo("Will create project file with .vcproj extension")
|
||||
WScript.Echo("usage: <full path\project.dsp> <full path\project.vcproj>")
|
||||
WScript.Quit(1)
|
||||
End If
|
||||
WScript.Echo("Converting: "+ objArgs.Item(0))
|
||||
'// If there is a file name of the .vcproj extension, do not convert
|
||||
Set vcProject = vcProj.LoadProject(objArgs.Item(0))
|
||||
If Not objFile.FileExists(vcProject.ProjectFile) Then
|
||||
' // specify name and location of new project file
|
||||
vcProject.ProjectFile = objArgs.Item(1)
|
||||
|
||||
' // call the project engine to save this off.
|
||||
' // when no name is shown, it will create one with the .vcproj name
|
||||
vcProject.Save()
|
||||
WScript.Echo("New Project Name: "+vcProject.ProjectFile+"")
|
||||
|
||||
else
|
||||
|
||||
WScript.Echo("ERROR!: "+vcProject.ProjectFile+" already exists!")
|
||||
End If
|
|
@ -0,0 +1,47 @@
|
|||
Set WshShell = WScript.CreateObject("WScript.Shell")
|
||||
Set objArgs = WScript.Arguments
|
||||
|
||||
StartPos = InstrRev(objargs(0), "/", -1, 1)
|
||||
strlength = Len(objargs(0))
|
||||
|
||||
If objArgs.Count > 1 Then
|
||||
Path= Showpath(objargs(1))
|
||||
Else
|
||||
Path= Showpath(".")
|
||||
End If
|
||||
Wget objargs(0), Path & "\", Right(objargs(0),strlength-StartPos)
|
||||
|
||||
|
||||
Sub Wget(URL, DestFolder, Imagefile)
|
||||
|
||||
Set xml = CreateObject("Microsoft.XMLHTTP")
|
||||
xml.Open "GET", URL, False
|
||||
xml.Send
|
||||
|
||||
set oStream = createobject("Adodb.Stream")
|
||||
Const adTypeBinary = 1
|
||||
Const adSaveCreateOverWrite = 2
|
||||
Const adSaveCreateNotExist = 1
|
||||
|
||||
oStream.type = adTypeBinary
|
||||
oStream.open
|
||||
oStream.write xml.responseBody
|
||||
|
||||
' Do not overwrite an existing file
|
||||
oStream.savetofile DestFolder & ImageFile, adSaveCreateNotExist
|
||||
|
||||
' Use this form to overwrite a file if it already exists
|
||||
' oStream.savetofile DestFolder & ImageFile, adSaveCreateOverWrite
|
||||
|
||||
oStream.close
|
||||
|
||||
set oStream = nothing
|
||||
Set xml = Nothing
|
||||
End Sub
|
||||
|
||||
Function Showpath(folderspec)
|
||||
Dim fso, f
|
||||
Set fso = CreateObject("Scripting.FileSystemObject")
|
||||
Set f = fso.GetFolder(folderspec)
|
||||
showpath = f.path
|
||||
End Function
|
|
@ -0,0 +1,5 @@
|
|||
[settings]
|
||||
port => 5060
|
||||
dialplan => demo
|
||||
rtp_min_port => 10000
|
||||
rtp_max_port => 20000
|
|
@ -0,0 +1,6 @@
|
|||
[extensions]
|
||||
|
||||
#1000 => speextest /tmp/siriusraw.spx
|
||||
1000 => playback d:\dev\raw\siriusraw.raw
|
||||
888 => bridge woomera/996@10.200.68.194
|
||||
#1000 => bridge exosip/996@10.200.68.194
|
|
@ -0,0 +1,8 @@
|
|||
[settings]
|
||||
debug=0
|
||||
|
||||
[profile]
|
||||
host=10.3.3.104
|
||||
port=42420
|
||||
audio_ip=10.3.3.249
|
||||
dialplan=demo
|
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_bridgecall"
|
||||
ProjectGUID="{E1794405-29D4-466D-9BE3-DD2344C2A663}"
|
||||
RootNamespace="mod_bridgecall"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_bridgecall.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_bridgecall.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_bridgecall.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_bridgecall.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_bridgecall.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_bridgecall\mod_bridgecall.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_dialplan_demo"
|
||||
ProjectGUID="{2988EB83-785F-45D4-8731-8E1E4345177E}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_dialplan_demo.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_dialplan_demo.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_dialplan_demo.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_dialplan_demo.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_dialplan_demo.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_dialplan_demo\mod_dialplan_demo.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,229 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_exosip"
|
||||
ProjectGUID="{45DF84ED-D24A-4FF6-B5B0-0A9A5FDB9552}"
|
||||
RootNamespace="mod_exosip"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/D _CRT_SECURE_NO_DEPRECATE"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\src\include;"$(InputDir)..\..\..\libs\apr-1.2.2\include";..\..\..\eXosip\include;..\..\..\osip\include;..\..\..\jrtp4c\src"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
GeneratePreprocessedFile="0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/NODEFAULTLIB:LIBCMT"
|
||||
AdditionalDependencies="Ws2_32.lib Iphlpapi.lib libcpmt.lib"
|
||||
ShowProgress="0"
|
||||
OutputFile="$(OutDir)/mod/mod_exosip.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""
|
||||
IgnoreAllDefaultLibraries="false"
|
||||
IgnoreDefaultLibraryNames=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_exosip.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_exosip.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\include";"$(InputDir)include";"$(InputDir)..\..\..\libs\apr-1.2.2\include";"$(InputDir)libs\eXosip\include";"$(InputDir)libs\osip\include";"$(InputDir)libs\common\src""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Ws2_32.lib Iphlpapi.lib"
|
||||
OutputFile="$(OutDir)/mod/mod_exosip.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_exosip.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{E3B37452-127D-4C22-BB33-3B08E23721DF}"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{4EA67539-9EE9-4065-BD39-87E517FD8262}"
|
||||
RelativePathToProject="..\..\..\eXosip\platform\vsnet\eXosip.vcproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{85255507-5D16-4218-85E2-F683BB2F04DA}"
|
||||
RelativePathToProject="..\..\..\osip\platform\vsnet\osip2.vcproj"
|
||||
/>
|
||||
<ProjectReference
|
||||
ReferencedProjectIdentifier="{44F46B7E-0E51-4304-9735-330DFBAB41E5}"
|
||||
RelativePathToProject="..\..\..\osip\platform\vsnet\osipparser2.vcproj"
|
||||
/>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_exosip\mod_exosip.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,212 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_g711codec"
|
||||
ProjectGUID="{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_g711codec.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_g711codec.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_g711codec.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_g711codec.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_g711codec.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_g711codec\g711.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_g711codec\mod_g711codec.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_g711codec\g711.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_playback"
|
||||
ProjectGUID="{78100236-7CEA-4948-96CC-E8ED3160329C}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_playback.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_playback.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_playback.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_playback.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_playback.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_playback\mod_playback.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_rawaudio"
|
||||
ProjectGUID="{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_rawaudio.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_rawaudio.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_rawaudio.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_rawaudio.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_rawaudio.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_rawaudio\mod_rawaudio.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_softtimer"
|
||||
ProjectGUID="{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_softtimer.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_softtimer.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_softtimer.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_softtimer.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_softtimer.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_softtimer\mod_softtimer.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_woomerachan"
|
||||
ProjectGUID="{FE3540C5-3303-46E0-A69E-D92F775687F1}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_woomerachan.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_woomerachan.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_woomerachan.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(InputDir)..\..\include;$(InputDir)include;$(InputDir)..\..\..\libs\apr-1.2.2\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/mod/mod_woomerachan.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(OutDir)/mod_woomerachan.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\mod\mod_woomerachan\mod_woomerachan.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,155 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#undef HAVE_MEMMOVE
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#undef HAVE_STRNCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* switch.h -- Main Library Header
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_H
|
||||
#define SWITCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <apr.h>
|
||||
#include <apr_network_io.h>
|
||||
#include <apr_errno.h>
|
||||
#include <apr_general.h>
|
||||
#include <apr_thread_proc.h>
|
||||
#include <apr_thread_mutex.h>
|
||||
#include <apr_thread_cond.h>
|
||||
#include <apr_thread_rwlock.h>
|
||||
#include <apr_file_io.h>
|
||||
#include <apr_poll.h>
|
||||
#include <apr_dso.h>
|
||||
#include <apr_hash.h>
|
||||
#include <apr_strings.h>
|
||||
#include <apr_network_io.h>
|
||||
#include <apr_poll.h>
|
||||
#include <assert.h>
|
||||
|
||||
//#include <time.h>
|
||||
//#include <stdlib.h>
|
||||
//#include <stdio.h>
|
||||
//#include <sys/types.h>
|
||||
//#include <stdarg.h>
|
||||
//#include <sys/types.h>
|
||||
//#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(SWITCH_CORE_DECLARE_STATIC)
|
||||
#define SWITCH_DECLARE(type) type __stdcall
|
||||
#define SWITCH_DECLARE_NONSTD(type) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA
|
||||
#elif defined(FREESWITCHCORE_EXPORTS)
|
||||
#define SWITCH_DECLARE(type) __declspec(dllexport) type __stdcall
|
||||
#define SWITCH_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA __declspec(dllexport)
|
||||
#else
|
||||
#define SWITCH_DECLARE(type) __declspec(dllimport) type __stdcall
|
||||
#define SWITCH_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#if defined(SWITCH_MOD_DECLARE_STATIC)
|
||||
#define SWITCH_MOD_DECLARE(type) type __cdecl
|
||||
#elif defined(MOD_EXPORTS)
|
||||
#define SWITCH_MOD_DECLARE(type) __declspec(dllexport) type __cdecl
|
||||
#else
|
||||
#define SWITCH_MOD_DECLARE(type) __declspec(dllimport) type __cdecl
|
||||
#endif
|
||||
#else //not win32
|
||||
#define SWITCH_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_NONSTD(type) type
|
||||
#define SWITCH_MOD_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_DATA
|
||||
#ifndef getpid
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <switch_types.h>
|
||||
#include <switch_core.h>
|
||||
#include <switch_loadable_module.h>
|
||||
#include <switch_console.h>
|
||||
#include <switch_utils.h>
|
||||
#include <switch_caller.h>
|
||||
#include <switch_mutex.h>
|
||||
#include <switch_config.h>
|
||||
#include <switch_frame.h>
|
||||
#include <switch_module_interfaces.h>
|
||||
#include <switch_channel.h>
|
||||
#include <switch_buffer.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_buffer.h -- Data Buffering Code
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_BUFFER_H
|
||||
#define SWITCH_BUFFER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
struct switch_buffer;
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool *pool, switch_buffer **buffer, size_t max_len);
|
||||
SWITCH_DECLARE(int) switch_buffer_len(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(int) switch_buffer_freespace(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(int) switch_buffer_inuse(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(int) switch_buffer_read(switch_buffer *buffer, void *data, size_t datalen);
|
||||
SWITCH_DECLARE(int) switch_buffer_write(switch_buffer *buffer, void *data, size_t datalen);
|
||||
SWITCH_DECLARE(int) switch_buffer_toss(switch_buffer *buffer, size_t datalen);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_caller.h -- Caller Identification
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_CALLER_H
|
||||
#define SWITCH_CALLER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
struct switch_caller_step {
|
||||
char *step_name;
|
||||
struct switch_caller_step *next_step;
|
||||
};
|
||||
|
||||
struct switch_caller_profile {
|
||||
char *dialplan;
|
||||
char *caller_id_name;
|
||||
char *caller_id_number;
|
||||
char *ani;
|
||||
char *ani2;
|
||||
char *destination_number;
|
||||
struct switch_caller_step *steps;
|
||||
};
|
||||
|
||||
struct switch_caller_application {
|
||||
char *application_name;
|
||||
char *application_data;
|
||||
switch_application_function application_function;
|
||||
struct switch_caller_application *next;
|
||||
};
|
||||
|
||||
struct switch_caller_extension {
|
||||
char *extension_name;
|
||||
char *extension_number;
|
||||
struct switch_caller_application *current_application;
|
||||
struct switch_caller_application *last_application;
|
||||
struct switch_caller_application *applications;
|
||||
};
|
||||
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_caller_extension_new(switch_core_session *session,
|
||||
char *extension_name,
|
||||
char *extension_number
|
||||
);
|
||||
|
||||
SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session *session,
|
||||
switch_caller_extension *caller_extension,
|
||||
char *application_name,
|
||||
char *extra_data);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_new(switch_core_session *session,
|
||||
char *dialplan,
|
||||
char *caller_id_name,
|
||||
char *caller_id_number,
|
||||
char *ani,
|
||||
char *ani2,
|
||||
char *destination_number);
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_clone(switch_core_session *session,
|
||||
switch_caller_profile *tocopy);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_channel.h -- Media Channel Interface
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_CHANNEL_H
|
||||
#define SWITCH_CHANNEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *channel, switch_channel_state state);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel **channel, switch_memory_pool *pool);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel *channel,
|
||||
switch_core_session *session,
|
||||
switch_channel_state state,
|
||||
switch_channel_flag flags);
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile);
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_caller_profile(switch_channel *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile);
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originator_caller_profile(switch_channel *channel);
|
||||
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel *channel, char *varname);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel *channel, char *varname, char *value);
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel *channel, switch_caller_extension *caller_extension);
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(switch_channel *channel);
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_test_flag(switch_channel *channel, int flags);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_flag(switch_channel *channel, int flags);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_clear_flag(switch_channel *channel, int flags);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_answer(switch_channel *channel);
|
||||
SWITCH_DECLARE(void) switch_channel_set_event_handlers(switch_channel *channel, const struct switch_event_handler_table *event_handlers);
|
||||
SWITCH_DECLARE(const struct switch_event_handler_table *) switch_channel_get_event_handlers(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private);
|
||||
SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel *channel, char *name);
|
||||
SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel);
|
||||
SWITCH_DECLARE(int) switch_channel_has_dtmf(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel, char *dtmf);
|
||||
SWITCH_DECLARE(int) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, size_t len);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode (switch_channel *channel, int freq, int bits, int channels, int ms, int kbps);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode (switch_channel *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_config.h -- Configuration File Parser
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_CONFIG_H
|
||||
#define SWITCH_CONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
struct switch_config {
|
||||
FILE *file;
|
||||
char *path;
|
||||
char category[256];
|
||||
char buf[1024];
|
||||
int lineno;
|
||||
};
|
||||
|
||||
typedef struct switch_config switch_config;
|
||||
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config *cfg, char *file_path);
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config *cfg);
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config *cfg, char **var, char **val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_console.h -- Simple Console
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_CONSOLE_H
|
||||
#define SWITCH_CONSOLE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
SWITCH_DECLARE(void) switch_console_loop(void);
|
||||
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line, char *fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_core.h -- Core Library
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_CORE_H
|
||||
#define SWITCH_CORE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#define MAX_CORE_THREAD_SESSION_OBJS 128
|
||||
struct switch_core_thread_session {
|
||||
int running;
|
||||
void *objs[MAX_CORE_THREAD_SESSION_OBJS];
|
||||
};
|
||||
|
||||
struct switch_core_session;
|
||||
struct switch_core_runtime;
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_core_init(void);
|
||||
SWITCH_DECLARE(switch_status) switch_core_destroy(void);
|
||||
SWITCH_DECLARE(switch_status) switch_core_do_perl(char *txt);
|
||||
SWITCH_DECLARE(switch_status) switch_core_new_memory_pool(switch_memory_pool **pool);
|
||||
SWITCH_DECLARE(switch_status) switch_core_destroy_memory_pool(switch_memory_pool **pool);
|
||||
SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_core_session *) switch_core_session_request(const switch_endpoint_interface *endpoint_interface, switch_memory_pool *pool);
|
||||
SWITCH_DECLARE(switch_core_session *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool *pool);
|
||||
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session *session, size_t memory);
|
||||
SWITCH_DECLARE(void) switch_core_session_thread_launch(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_channel *) switch_core_session_get_channel(switch_core_session *session);
|
||||
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session *session, size_t memory);
|
||||
SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session **session);
|
||||
SWITCH_DECLARE(void *) switch_core_permenant_alloc(size_t memory);
|
||||
SWITCH_DECLARE(char *) switch_core_permenant_strdup(char *todup);
|
||||
SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session *session, char *todup);
|
||||
SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session *session, void *private);
|
||||
SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool *pool, size_t memory);
|
||||
/* Hash Frontend */
|
||||
SWITCH_DECLARE(switch_status) switch_core_hash_init(switch_hash **hash, switch_memory_pool *pool);
|
||||
SWITCH_DECLARE(switch_status) switch_core_hash_destroy(switch_hash *hash);
|
||||
SWITCH_DECLARE(switch_status) switch_core_hash_insert(switch_hash *hash, char *key, void *data);
|
||||
SWITCH_DECLARE(switch_status) switch_core_hash_delete(switch_hash *hash, char *key);
|
||||
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash *hash, char *key);
|
||||
SWITCH_DECLARE(void) switch_core_launch_module_thread(void *(*func)(switch_thread *, void*), void *obj);
|
||||
SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel channel);
|
||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session *session, void *(*func)(switch_thread *, void *), void *obj);
|
||||
SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *timer_name, int interval, int samples);
|
||||
SWITCH_DECLARE(int) switch_core_timer_next(switch_timer *timer);
|
||||
SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer *timer);
|
||||
SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session *thread_session);
|
||||
SWITCH_DECLARE(void) switch_core_service_session(switch_core_session *session, switch_core_thread_session *thread_session);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_session *session,
|
||||
char *endpoint_name,
|
||||
switch_caller_profile *caller_profile,
|
||||
switch_core_session **new_session);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_answer_channel(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session *session, switch_frame **frame, int timeout);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_session *session, switch_frame *frame, int timeout);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_kill_channel(switch_core_session *session, switch_signal sig);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_read(switch_core_session *session, int timeout);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_session *session, int timeout);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch_core_session *session, switch_outgoing_channel_hook outgoing_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(switch_core_session *session, switch_answer_channel_hook answer_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(switch_core_session *session, switch_read_frame_hook read_frame);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(switch_core_session *session, switch_write_frame_hook write_frame);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(switch_core_session *session, switch_kill_channel_hook kill_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(switch_core_session *session, switch_waitfor_read_hook waitfor_read);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(switch_core_session *session, switch_waitfor_write_hook waitfor_write);
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec *codec, char *codec_name, int rate, int ms, switch_codec_flag flags, const switch_codec_settings *codec_settings);
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag);
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag);
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec *codec);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session *session, switch_codec *codec);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_session *session, switch_codec *codec);
|
||||
SWITCH_DECLARE(switch_memory_pool *) switch_core_session_get_pool(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) pbx_core_session_signal_state_change(switch_core_session *session);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_frame.h -- Media Frame Structure
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_FRAME_H
|
||||
#define SWITCH_FRAME_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
struct switch_frame {
|
||||
switch_codec *codec;
|
||||
void *data;
|
||||
size_t datalen;
|
||||
int samples;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_loadable_module.h -- Loadable Modules
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_LOADABLE_MODULE_H
|
||||
#define SWITCH_LOADABLE_MODULE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
|
||||
struct switch_loadable_module_interface {
|
||||
const char *module_name;
|
||||
const switch_endpoint_interface *endpoint_interface;
|
||||
const switch_timer_interface *timer_interface;
|
||||
const switch_dialplan_interface *dialplan_interface;
|
||||
const switch_codec_interface *codec_interface;
|
||||
const switch_application_interface *application_interface;
|
||||
};
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_loadable_module_init(void);
|
||||
SWITCH_DECLARE(switch_endpoint_interface *) loadable_module_get_endpoint_interface(char *name);
|
||||
SWITCH_DECLARE(switch_codec_interface *) loadable_module_get_codec_interface(char *name);
|
||||
SWITCH_DECLARE(switch_dialplan_interface *) loadable_module_get_dialplan_interface(char *name);
|
||||
SWITCH_DECLARE(switch_timer_interface *) loadable_module_get_timer_interface(char *name);
|
||||
SWITCH_DECLARE(switch_application_interface *) loadable_module_get_application_interface(char *name);
|
||||
SWITCH_DECLARE(int) loadable_module_get_codecs(switch_memory_pool *pool, switch_codec_interface **array, int arraylen);
|
||||
SWITCH_DECLARE(void) loadable_module_shutdown(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,247 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_module_interfaces.h -- Module Interface Definitions
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_MODULE_INTERFACES_H
|
||||
#define SWITCH_MODULE_INTERFACES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
/* A table of functions to execute at various states */
|
||||
struct switch_event_handler_table {
|
||||
switch_event_handler on_init;
|
||||
switch_event_handler on_ring;
|
||||
switch_event_handler on_execute;
|
||||
switch_event_handler on_hangup;
|
||||
switch_event_handler on_loopback;
|
||||
switch_event_handler on_transmit;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_outgoing_channel {
|
||||
switch_outgoing_channel_hook outgoing_channel;
|
||||
struct switch_io_event_hook_outgoing_channel *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_answer_channel {
|
||||
switch_answer_channel_hook answer_channel;
|
||||
struct switch_io_event_hook_answer_channel *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_read_frame {
|
||||
switch_read_frame_hook read_frame;
|
||||
struct switch_io_event_hook_read_frame *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_write_frame {
|
||||
switch_write_frame_hook write_frame;
|
||||
struct switch_io_event_hook_write_frame *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_kill_channel {
|
||||
switch_kill_channel_hook kill_channel;
|
||||
struct switch_io_event_hook_kill_channel *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_waitfor_read {
|
||||
switch_waitfor_read_hook waitfor_read;
|
||||
struct switch_io_event_hook_waitfor_read *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hook_waitfor_write {
|
||||
switch_waitfor_write_hook waitfor_write;
|
||||
struct switch_io_event_hook_waitfor_write *next;
|
||||
};
|
||||
|
||||
struct switch_io_event_hooks {
|
||||
struct switch_io_event_hook_outgoing_channel *outgoing_channel;
|
||||
struct switch_io_event_hook_answer_channel *answer_channel;
|
||||
struct switch_io_event_hook_read_frame *read_frame;
|
||||
struct switch_io_event_hook_write_frame *write_frame;
|
||||
struct switch_io_event_hook_kill_channel *kill_channel;
|
||||
struct switch_io_event_hook_waitfor_read *waitfor_read;
|
||||
struct switch_io_event_hook_waitfor_write *waitfor_write;
|
||||
};
|
||||
|
||||
struct switch_io_routines {
|
||||
switch_status (*outgoing_channel)(switch_core_session *, switch_caller_profile *, switch_core_session **);
|
||||
switch_status (*answer_channel)(switch_core_session *);
|
||||
switch_status (*read_frame)(switch_core_session *, switch_frame **, int, switch_io_flag);
|
||||
switch_status (*write_frame)(switch_core_session *, switch_frame *, int, switch_io_flag);
|
||||
switch_status (*kill_channel)(switch_core_session *, int);
|
||||
switch_status (*waitfor_read)(switch_core_session *, int);
|
||||
switch_status (*waitfor_write)(switch_core_session *, int);
|
||||
};
|
||||
|
||||
/*
|
||||
This is the glue between the abstract idea of a "channel" and what is really going on under the
|
||||
hood. Each endpoint module fills out one of these tables and makes it available when a channel
|
||||
is created of it's paticular type.
|
||||
*/
|
||||
|
||||
struct switch_endpoint_interface {
|
||||
/* the interface's name */
|
||||
const char *interface_name;
|
||||
|
||||
/* channel abstraction methods */
|
||||
const switch_io_routines *io_routines;
|
||||
|
||||
/* state machine methods */
|
||||
const switch_event_handler_table *event_handlers;
|
||||
|
||||
/* private information */
|
||||
void *private;
|
||||
|
||||
/* to facilitate linking */
|
||||
const struct switch_endpoint_interface *next;
|
||||
};
|
||||
|
||||
struct switch_timer {
|
||||
int interval;
|
||||
unsigned int samples;
|
||||
unsigned int samplecount;
|
||||
struct switch_timer_interface *timer_interface;
|
||||
switch_memory_pool *memory_pool;
|
||||
void *private;
|
||||
};
|
||||
|
||||
struct switch_timer_interface {
|
||||
const char *interface_name;
|
||||
switch_status (*timer_init)(switch_timer *);
|
||||
switch_status (*timer_next)(switch_timer *);
|
||||
switch_status (*timer_destroy)(switch_timer *);
|
||||
const struct switch_timer_interface *next;
|
||||
};
|
||||
|
||||
struct switch_dialplan_interface {
|
||||
const char *interface_name;
|
||||
switch_dialplan_hunt_function hunt_function;
|
||||
const struct switch_dialplan_interface *next;
|
||||
};
|
||||
|
||||
/* nobody has more setting than speex so we will let them set the standard */
|
||||
struct switch_codec_settings {
|
||||
int quality;
|
||||
int complexity;
|
||||
int enhancement;
|
||||
int vad;
|
||||
int vbr;
|
||||
float vbr_quality;
|
||||
int abr;
|
||||
int dtx;
|
||||
int preproc;
|
||||
int pp_vad;
|
||||
int pp_agc;
|
||||
float pp_agc_level;
|
||||
int pp_denoise;
|
||||
int pp_dereverb;
|
||||
float pp_dereverb_decay;
|
||||
float pp_dereverb_level;
|
||||
};
|
||||
|
||||
struct switch_codec {
|
||||
const struct switch_codec_interface *codec_interface;
|
||||
const struct switch_codec_implementation *implementation;
|
||||
struct switch_codec_settings codec_settings;
|
||||
switch_codec_flag flags;
|
||||
switch_memory_pool *memory_pool;
|
||||
|
||||
switch_frame raw_write_frame;
|
||||
unsigned char *raw_write_frame_data;
|
||||
switch_buffer *raw_write_buffer;
|
||||
|
||||
switch_frame enc_write_frame;
|
||||
unsigned char *enc_write_frame_data;
|
||||
switch_buffer *enc_write_buffer;
|
||||
|
||||
|
||||
switch_frame raw_read_frame;
|
||||
unsigned char *raw_read_frame_data;
|
||||
switch_buffer *raw_read_buffer;
|
||||
|
||||
switch_frame enc_read_frame;
|
||||
unsigned char *enc_read_frame_data;
|
||||
switch_buffer *enc_read_buffer;
|
||||
|
||||
void *private;
|
||||
};
|
||||
|
||||
struct switch_codec_implementation {
|
||||
int samples_per_second;
|
||||
int bits_per_second;
|
||||
int microseconds_per_frame;
|
||||
int samples_per_frame;
|
||||
int bytes_per_frame;
|
||||
int encoded_bytes_per_frame;
|
||||
int number_of_channels;
|
||||
int pref_frames_per_packet;
|
||||
int max_frames_per_packet;
|
||||
switch_status (*init)(switch_codec *, switch_codec_flag, const switch_codec_settings *codec_settings);
|
||||
switch_status (*encode)(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag);
|
||||
switch_status (*decode)(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag);
|
||||
switch_status (*destroy)(switch_codec *);
|
||||
const struct switch_codec_implementation *next;
|
||||
};
|
||||
|
||||
struct switch_codec_interface {
|
||||
const char *interface_name;
|
||||
const switch_codec_type codec_type;
|
||||
int ianacode;
|
||||
char *iananame;
|
||||
const switch_codec_implementation *implementations;
|
||||
const struct switch_codec_interface *next;
|
||||
};
|
||||
|
||||
|
||||
struct switch_application_interface {
|
||||
const char *interface_name;
|
||||
switch_application_function application_function;
|
||||
const char *long_desc;
|
||||
const char *short_desc;
|
||||
const char *syntax;
|
||||
const struct switch_application_interface *next;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_mutex.h -- Mutex Locking
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_MUTEX_H
|
||||
#define SWITCH_MUTEX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
|
||||
switch_lock_flag flags,
|
||||
switch_memory_pool *pool);
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_destroy(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_lock(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_unlock(switch_mutex_t *lock);
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_trylock(switch_mutex_t *lock);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
|
@ -0,0 +1,314 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* switch_types.h -- Data Types
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_TYPES_H
|
||||
#define SWITCH_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
//#include <sqlite3.h>
|
||||
//#include <apr_thread_mutex.h>
|
||||
//#include <apr_thread_proc.h>
|
||||
//#include <apr_hash.h>
|
||||
//#include <apr_network_io.h>
|
||||
//#include <apr_poll.h>
|
||||
//#include <sys/types.h>
|
||||
|
||||
#define SWITCH_GLOBAL_VERSION "1.5"
|
||||
|
||||
typedef enum {
|
||||
SWITCH_STATUS_SUCCESS,
|
||||
SWITCH_STATUS_FALSE,
|
||||
SWITCH_STATUS_TIMEOUT,
|
||||
SWITCH_STATUS_RESTART,
|
||||
SWITCH_STATUS_TERM,
|
||||
SWITCH_STATUS_NOTIMPL,
|
||||
SWITCH_STATUS_MEMERR,
|
||||
SWITCH_STATUS_NOOP,
|
||||
SWITCH_STATUS_GENERR
|
||||
} switch_status;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_CHANNEL_ID_CONSOLE,
|
||||
SWITCH_CHANNEL_ID_CONSOLE_CLEAN
|
||||
} switch_text_channel;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
#ifndef __FUNCTION__
|
||||
#define __FUNCTION__ ""
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#define SWITCH_CHANNEL_CONSOLE SWITCH_CHANNEL_ID_CONSOLE, __FILE__, __FUNCTION__, __LINE__
|
||||
#define SWITCH_CHANNEL_CONSOLE_CLEAN SWITCH_CHANNEL_ID_CONSOLE_CLEAN, __FILE__, __FUNCTION__, __LINE__
|
||||
|
||||
typedef enum {
|
||||
CS_NEW,
|
||||
CS_INIT,
|
||||
CS_RING,
|
||||
CS_TRANSMIT,
|
||||
CS_EXECUTE,
|
||||
CS_LOOPBACK,
|
||||
CS_HANGUP,
|
||||
CS_DONE
|
||||
} switch_channel_state;
|
||||
|
||||
typedef enum {
|
||||
CF_SEND_AUDIO = (1 << 0),
|
||||
CF_RECV_AUDIO = (1 << 1),
|
||||
CF_ANSWERED = (1 << 2),
|
||||
CF_OUTBOUND = (1 << 3),
|
||||
} switch_channel_flag;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_MUTEX_DEFAULT = APR_THREAD_MUTEX_DEFAULT,
|
||||
SWITCH_MUTEX_NESTED = APR_THREAD_MUTEX_NESTED,
|
||||
SWITCH_MUTEX_UNNESTED = APR_THREAD_MUTEX_UNNESTED
|
||||
} switch_lock_flag;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_SIG_KILL
|
||||
} switch_signal;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_CODEC_FLAG_ENCODE = (1 << 0),
|
||||
SWITCH_CODEC_FLAG_DECODE = (1 << 1),
|
||||
SWITCH_CODEC_FLAG_SILENCE_START = (1 << 2),
|
||||
SWITCH_CODEC_FLAG_SILENCE_STOP = (1 << 3),
|
||||
SWITCH_CODEC_FLAG_SILENCE = (1 << 4),
|
||||
|
||||
} switch_codec_flag;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_CODEC_TYPE_AUDIO,
|
||||
SWITCH_CODEC_TYPE_VIDEO,
|
||||
SWITCH_CODEC_TYPE_T38,
|
||||
SWITCH_CODEC_TYPE_APP
|
||||
} switch_codec_type;
|
||||
|
||||
typedef enum {
|
||||
SWITCH_IO_FLAG_NOOP = 0,
|
||||
} switch_io_flag;
|
||||
|
||||
typedef struct switch_loadable_module switch_loadable_module;
|
||||
typedef struct switch_frame switch_frame;
|
||||
typedef struct switch_channel switch_channel;
|
||||
typedef struct switch_endpoint_interface switch_endpoint_interface;
|
||||
typedef struct switch_timer_interface switch_timer_interface;
|
||||
typedef struct switch_dialplan_interface switch_dialplan_interface;
|
||||
typedef struct switch_codec_interface switch_codec_interface;
|
||||
typedef struct switch_application_interface switch_application_interface;
|
||||
typedef struct switch_core_session switch_core_session;
|
||||
typedef struct switch_loadable_module_interface switch_loadable_module_interface;
|
||||
typedef struct switch_caller_profile switch_caller_profile;
|
||||
typedef struct switch_caller_step switch_caller_step;
|
||||
typedef struct switch_caller_extension switch_caller_extension;
|
||||
typedef struct switch_caller_application switch_caller_application;
|
||||
typedef struct switch_event_handler_table switch_event_handler_table;
|
||||
typedef struct switch_timer switch_timer;
|
||||
typedef struct switch_codec switch_codec;
|
||||
typedef struct switch_core_thread_session switch_core_thread_session;
|
||||
typedef struct switch_codec_implementation switch_codec_implementation;
|
||||
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel;
|
||||
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel;
|
||||
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame;
|
||||
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame;
|
||||
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel;
|
||||
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read;
|
||||
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write;
|
||||
typedef struct switch_io_routines switch_io_routines;
|
||||
typedef struct switch_io_event_hooks switch_io_event_hooks;
|
||||
typedef struct switch_buffer switch_buffer;
|
||||
typedef struct switch_codec_settings switch_codec_settings;
|
||||
typedef void (*switch_application_function)(switch_core_session *, char *);
|
||||
typedef switch_caller_extension *(*switch_dialplan_hunt_function)(switch_core_session *);
|
||||
typedef switch_status (*switch_event_handler)(switch_core_session *);
|
||||
typedef switch_status (*switch_outgoing_channel_hook)(switch_core_session *, switch_caller_profile *, switch_core_session *);
|
||||
typedef switch_status (*switch_answer_channel_hook)(switch_core_session *);
|
||||
typedef switch_status (*switch_read_frame_hook)(switch_core_session *, switch_frame **, int, switch_io_flag);
|
||||
typedef switch_status (*switch_write_frame_hook)(switch_core_session *, switch_frame *, int, switch_io_flag);
|
||||
typedef switch_status (*switch_kill_channel_hook)(switch_core_session *, int);
|
||||
typedef switch_status (*switch_waitfor_read_hook)(switch_core_session *, int);
|
||||
typedef switch_status (*switch_waitfor_write_hook)(switch_core_session *, int);
|
||||
|
||||
/*
|
||||
The pieces of apr we allow ppl to pass around between modules we typedef into our namespace and wrap all the functions
|
||||
any other apr code should be as hidden as possible.
|
||||
*/
|
||||
typedef apr_hash_t switch_hash;
|
||||
typedef apr_pool_t switch_memory_pool;
|
||||
typedef apr_thread_t switch_thread;
|
||||
typedef apr_thread_mutex_t switch_mutex_t;
|
||||
typedef apr_time_t switch_time_t;
|
||||
typedef apr_time_exp_t switch_time_exp_t;
|
||||
typedef apr_thread_start_t switch_thread_start_t;
|
||||
typedef apr_sockaddr_t switch_sockaddr_t;
|
||||
typedef apr_socket_t switch_socket_t;
|
||||
typedef apr_pollfd_t switch_pollfd_t;
|
||||
typedef apr_pollset_t switch_pollset_t;
|
||||
typedef apr_file_t switch_file_t;
|
||||
typedef apr_thread_cond_t switch_thread_cond_t;
|
||||
|
||||
#define SWITCH_UNSPEC APR_UNSPEC
|
||||
#define SWITCH_POLLIN APR_POLLIN
|
||||
#define SWITCH_POLLPRI APR_POLLPRI
|
||||
#define SWITCH_POLLOUT APR_POLLOUT
|
||||
#define SWITCH_POLLERR APR_POLLERR
|
||||
#define SWITCH_POLLHUP APR_POLLHUP
|
||||
#define SWITCH_POLLNVAL APR_POLLNVAL
|
||||
#define SWITCH_READ APR_READ
|
||||
#define SWITCH_FPROT_UREAD APR_FPROT_UREAD
|
||||
#define SWITCH_FPROT_GREAD APR_FPROT_GREAD
|
||||
|
||||
#define switch_thread_cond_create apr_thread_cond_create
|
||||
#define switch_thread_cond_wait apr_thread_cond_wait
|
||||
#define switch_thread_cond_timedwait apr_thread_cond_timedwait
|
||||
#define switch_thread_cond_signal apr_thread_cond_signal
|
||||
#define switch_thread_cond_broadcast apr_thread_cond_broadcast
|
||||
#define switch_thread_cond_destroy apr_thread_cond_destroy
|
||||
|
||||
#define switch_poll_setup apr_poll_setup
|
||||
#define switch_pollset_create apr_pollset_create
|
||||
#define switch_pollset_add apr_pollset_add
|
||||
#define switch_poll apr_poll
|
||||
#define SWITCH_POLL_SOCKET APR_POLL_SOCKET
|
||||
#define SWITCH_THREAD_FUNC APR_THREAD_FUNC
|
||||
#define switch_time_now apr_time_now
|
||||
#define switch_strftime apr_strftime
|
||||
#define switch_time_exp_get apr_time_exp_get
|
||||
#define switch_time_exp_lt apr_time_exp_lt
|
||||
#define switch_thread_create apr_thread_create
|
||||
#define switch_sleep apr_sleep
|
||||
#define switch_socket_create apr_socket_create
|
||||
#define switch_socket_shutdown apr_socket_shutdown
|
||||
#define switch_socket_close apr_socket_close
|
||||
#define switch_socket_bind apr_socket_bind
|
||||
#define switch_socket_listen apr_socket_listen
|
||||
#define switch_socket_accept apr_socket_accept
|
||||
#define switch_socket_connect apr_socket_connect
|
||||
#define switch_sockaddr_info_get apr_sockaddr_info_get
|
||||
#define switch_getnameinfo apr_getnameinfo
|
||||
#define switch_parse_addr_port apr_parse_addr_port
|
||||
#define switch_gethostname apr_gethostname
|
||||
#define switch_socket_data_get apr_socket_data_get
|
||||
#define switch_socket_data_set apr_socket_data_set
|
||||
#define switch_socket_send apr_socket_send
|
||||
#define switch_socket_sendv apr_socket_sendv
|
||||
#define switch_socket_sendto apr_socket_sendto
|
||||
#define switch_socket_recvfrom apr_socket_recvfrom
|
||||
#define switch_socket_sendfile apr_socket_sendfile
|
||||
#define switch_socket_recv apr_socket_recv
|
||||
#define switch_socket_opt_set apr_socket_opt_set
|
||||
#define switch_socket_timeout_set apr_socket_timeout_set
|
||||
#define switch_socket_opt_get apr_socket_opt_get
|
||||
#define switch_socket_timeout_get apr_socket_timeout_get
|
||||
#define switch_socket_atmark apr_socket_atmark
|
||||
#define switch_socket_addr_get apr_socket_addr_get
|
||||
#define switch_sockaddr_ip_get apr_sockaddr_ip_get
|
||||
#define switch_sockaddr_equal apr_sockaddr_equal
|
||||
#define switch_socket_type_get apr_socket_type_get
|
||||
#define switch_getservbyname apr_getservbyname
|
||||
#define switch_ipsubnet_create apr_ipsubnet_create
|
||||
#define switch_ipsubnet_test apr_ipsubnet_test
|
||||
#define switch_socket_protocol_get apr_socket_protocol_get
|
||||
#define switch_mcast_join apr_mcast_join
|
||||
#define switch_mcast_leave apr_mcast_leave
|
||||
#define switch_mcast_hops apr_mcast_hops
|
||||
#define switch_mcast_loopback apr_mcast_loopback
|
||||
#define switch_mcast_interface apr_mcast_interface
|
||||
#define switch_file_open apr_file_open
|
||||
#define switch_file_close apr_file_close
|
||||
#define switch_file_read apr_file_read
|
||||
#define switch_file_write apr_file_write
|
||||
|
||||
#define SWITCH_FOPEN_READ APR_FOPEN_READ
|
||||
#define SWITCH_FOPEN_WRITE APR_FOPEN_WRITE
|
||||
#define SWITCH_FOPEN_CREATE APR_FOPEN_CREATE
|
||||
#define SWITCH_FOPEN_APPEND APR_FOPEN_APPEND
|
||||
#define SWITCH_FOPEN_TRUNCATE APR_FOPEN_TRUNCATE
|
||||
#define SWITCH_FOPEN_BINARY APR_FOPEN_BINARY
|
||||
#define SWITCH_FOPEN_EXCL APR_FOPEN_EXCL
|
||||
#define SWITCH_FOPEN_BUFFERED APR_FOPEN_BUFFERED
|
||||
#define SWITCH_FOPEN_DELONCLOSE APR_FOPEN_DELONCLOSE
|
||||
#define SWITCH_FOPEN_XTHREAD APR_FOPEN_XTHREAD
|
||||
#define SWITCH_FOPEN_SHARELOCK APR_FOPEN_SHARELOCK
|
||||
#define SWITCH_FOPEN_NOCLEANUP APR_FOPEN_NOCLEANUP
|
||||
#define SWITCH_FOPEN_SENDFILE_ENABLED APR_FOPEN_SENDFILE_ENABLED
|
||||
#define SWITCH_FOPEN_LARGEFILE APR_FOPEN_LARGEFILE
|
||||
|
||||
|
||||
|
||||
#define SWITCH_FPROT_USETID APR_FPROT_USETID
|
||||
#define SWITCH_FPROT_UREAD APR_FPROT_UREAD
|
||||
#define SWITCH_FPROT_UWRITE APR_FPROT_UWRITE
|
||||
#define SWITCH_FPROT_UEXECUTE APR_FPROT_UEXECUTE
|
||||
|
||||
#define SWITCH_FPROT_GSETID APR_FPROT_GSETID
|
||||
#define SWITCH_FPROT_GREAD APR_FPROT_GREAD
|
||||
#define SWITCH_FPROT_GWRITE APR_FPROT_GWRITE
|
||||
#define SWITCH_FPROT_GEXECUTE APR_FPROT_GEXECUTE
|
||||
|
||||
#define SWITCH_FPROT_WSETID APR_FPROT_U WSETID
|
||||
#define SWITCH_FPROT_WREAD APR_FPROT_WREAD
|
||||
#define SWITCH_FPROT_WWRITE APR_FPROT_WWRITE
|
||||
#define SWITCH_FPROT_WEXECUTE APR_FPROT_WEXECUTE
|
||||
|
||||
#define SWITCH_FPROT_OS_DEFAULT APR_FPROT_OS_DEFAULT
|
||||
#define SWITCH_FPROT_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS
|
||||
|
||||
/* things we don't deserve to know about */
|
||||
struct switch_channel;
|
||||
struct switch_core_session;
|
||||
|
||||
#ifndef uint32_t
|
||||
#ifdef WIN32
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef __int8 int8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned long in_addr_t;
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_utils.h -- Compatability and Helper Code
|
||||
*
|
||||
*/
|
||||
#ifndef SWITCH_UTILS_H
|
||||
#define SWITCH_UTILS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
//#ifdef WIN32
|
||||
//#include <winsock2.h>
|
||||
//#include <time.h>
|
||||
//#define Public __declspec( dllexport )
|
||||
//#define PubImp __declspec( dllimport )
|
||||
//#else
|
||||
//#define Public
|
||||
//#define PubImp
|
||||
//#include <sys/time.h>
|
||||
//#include <unistd.h>
|
||||
//#endif
|
||||
|
||||
//#define HAVE_TIMEVAL_STRUCT
|
||||
|
||||
|
||||
#ifndef snprintf
|
||||
#define snprintf apr_snprintf
|
||||
#endif
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf apr_vsnprintf
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIMEVAL_STRUCT
|
||||
extern struct timeval tv;
|
||||
#ifdef WIN32
|
||||
typedef long switch_timeval_t;
|
||||
typedef long switch_suseconds_t;
|
||||
#else
|
||||
typedef typeof(tv.tv_sec) switch_timeval_t;
|
||||
typedef typeof(tv.tv_usec) switch_suseconds_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define switch_copy_string apr_cpystrn
|
||||
#define switch_test_flag(obj, flag) ((obj)->flags & flag)
|
||||
#define switch_set_flag(obj, flag) (obj)->flags |= (flag)
|
||||
#define switch_clear_flag(obj, flag) (obj)->flags &= ~(flag)
|
||||
#define switch_copy_flags(dest, src, flags) (dest)->flags &= ~(flags); (dest)->flags |= ((src)->flags & (flags))
|
||||
#define switch_strlen_zero(s) (s && *s != '\0') ? 0 : 1
|
||||
#define switch_yield(ms) apr_sleep(ms * 10); apr_thread_yield();
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock, unsigned int flags, switch_memory_pool *pool);
|
||||
SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
|
||||
|
||||
|
||||
#if !defined(switch_strdupa) && defined(__GNUC__)
|
||||
# define switch_strdupa(s) \
|
||||
(__extension__ \
|
||||
({ \
|
||||
__const char *__old = (s); \
|
||||
size_t __len = strlen (__old) + 1; \
|
||||
char *__new = (char *) __builtin_alloca (__len); \
|
||||
(char *) memcpy (__new, __old, __len); \
|
||||
}))
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_TIMEVAL_STRUCT
|
||||
struct timeval switch_tvadd(struct timeval a, struct timeval b);
|
||||
struct timeval switch_tvsub(struct timeval a, struct timeval b);
|
||||
|
||||
|
||||
/*static struct timeval switch_tvnow(void)
|
||||
{
|
||||
struct timeval t;
|
||||
gettimeofday(&t, NULL);
|
||||
return t;
|
||||
}
|
||||
*/
|
||||
|
||||
static struct timeval switch_tv(switch_timeval_t sec, switch_suseconds_t usec)
|
||||
{
|
||||
struct timeval t;
|
||||
t.tv_sec = sec;
|
||||
t.tv_usec = usec;
|
||||
return t;
|
||||
|
||||
}
|
||||
|
||||
static int switch_tvdiff_ms(struct timeval end, struct timeval start)
|
||||
{
|
||||
/* the offset by 1,000,000 below is intentional...
|
||||
it avoids differences in the way that division
|
||||
is handled for positive and negative numbers, by ensuring
|
||||
that the divisor is always positive
|
||||
*/
|
||||
return ((end.tv_sec - start.tv_sec) * 1000) +
|
||||
(((1000000 + end.tv_usec - start.tv_usec) / 1000) - 1000);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,266 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_bridgecall.c -- Channel Bridge Application Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
static const char modname[] = "mod_bridgecall";
|
||||
|
||||
struct audio_bridge_data {
|
||||
switch_core_session *session_a;
|
||||
switch_core_session *session_b;
|
||||
int running;
|
||||
};
|
||||
|
||||
static void *audio_bridge_thread(switch_thread *thread, void *obj)
|
||||
{
|
||||
struct switch_core_thread_session *data = obj;
|
||||
|
||||
switch_channel *chan_a, *chan_b;
|
||||
switch_frame *read_frame;
|
||||
switch_core_session *session_a, *session_b;
|
||||
|
||||
session_a = data->objs[0];
|
||||
session_b = data->objs[1];
|
||||
|
||||
chan_a = switch_core_session_get_channel(session_a);
|
||||
chan_b = switch_core_session_get_channel(session_b);
|
||||
|
||||
while(data->running > 0) {
|
||||
switch_channel_state b_state = switch_channel_get_state(chan_b);
|
||||
|
||||
switch (b_state) {
|
||||
case CS_HANGUP:
|
||||
data->running = -1;
|
||||
continue;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (switch_core_session_read_frame(session_a, &read_frame, -1) == SWITCH_STATUS_SUCCESS && read_frame->datalen) {
|
||||
if (switch_core_session_write_frame(session_b, read_frame, -1) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame.... %d Bubye!\n", read_frame->datalen);
|
||||
data->running = -1;
|
||||
}
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame....Bubye!\n");
|
||||
data->running = -1;
|
||||
}
|
||||
//switch_yield(100);
|
||||
}
|
||||
|
||||
switch_channel_hangup(chan_b);
|
||||
data->running = 0;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static switch_status audio_bridge_on_hangup(switch_core_session *session)
|
||||
{
|
||||
switch_core_session *other_session;
|
||||
switch_channel *channel = NULL, *other_channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
other_session = switch_channel_get_private(channel);
|
||||
assert(other_session != NULL);
|
||||
|
||||
other_channel = switch_core_session_get_channel(other_session);
|
||||
assert(other_channel != NULL);
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "CUSTOM HANGUP %s kill %s\n", switch_channel_get_name(channel), switch_channel_get_name(other_channel));
|
||||
|
||||
switch_core_session_kill_channel(other_session, SWITCH_SIG_KILL);
|
||||
switch_core_session_kill_channel(session, SWITCH_SIG_KILL);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status audio_bridge_on_ring(switch_core_session *session)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "CUSTOM RING\n");
|
||||
|
||||
/* put the channel in a passive state so we can loop audio to it */
|
||||
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
|
||||
switch_channel_set_state(channel, CS_TRANSMIT);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static const switch_event_handler_table audio_bridge_peer_event_handlers = {
|
||||
/*.on_init*/ NULL,
|
||||
/*.on_ring*/ audio_bridge_on_ring,
|
||||
/*.on_execute*/ NULL,
|
||||
/*.on_hangup*/ audio_bridge_on_hangup,
|
||||
/*.on_loopback*/ NULL,
|
||||
/*.on_transmit*/ NULL
|
||||
};
|
||||
|
||||
static const switch_event_handler_table audio_bridge_caller_event_handlers = {
|
||||
/*.on_init*/ NULL,
|
||||
/*.on_ring*/ NULL,
|
||||
/*.on_execute*/ NULL,
|
||||
/*.on_hangup*/ audio_bridge_on_hangup,
|
||||
/*.on_loopback*/ NULL,
|
||||
/*.on_transmit*/ NULL
|
||||
};
|
||||
|
||||
static void audio_bridge_function(switch_core_session *session, char *data)
|
||||
{
|
||||
switch_channel *caller_channel, *peer_channel;
|
||||
switch_core_session *peer_session;
|
||||
switch_caller_profile *caller_profile, *caller_caller_profile;
|
||||
char chan_type[128]= {'\0'}, *chan_data;
|
||||
int timelimit = 60; /* probably a useful option to pass in when there's time */
|
||||
caller_channel = switch_core_session_get_channel(session);
|
||||
assert(caller_channel != NULL);
|
||||
|
||||
switch_channel_answer(caller_channel);
|
||||
|
||||
|
||||
strncpy(chan_type, data, sizeof(chan_type));
|
||||
|
||||
if ((chan_data = strchr(chan_type, '/'))) {
|
||||
*chan_data = '\0';
|
||||
chan_data++;
|
||||
}
|
||||
|
||||
caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
|
||||
caller_profile = switch_caller_profile_new(session,
|
||||
caller_caller_profile->dialplan,
|
||||
caller_caller_profile->caller_id_name,
|
||||
caller_caller_profile->caller_id_number,
|
||||
NULL,
|
||||
NULL,
|
||||
chan_data);
|
||||
|
||||
|
||||
|
||||
if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "DOH!\n");
|
||||
} else {
|
||||
struct switch_core_thread_session this_audio_thread, other_audio_thread;
|
||||
time_t start;
|
||||
|
||||
peer_channel = switch_core_session_get_channel(peer_session);
|
||||
|
||||
memset(&other_audio_thread, 0, sizeof(other_audio_thread));
|
||||
memset(&this_audio_thread, 0, sizeof(this_audio_thread));
|
||||
other_audio_thread.objs[0] = session;
|
||||
other_audio_thread.objs[1] = peer_session;
|
||||
other_audio_thread.running = 5;
|
||||
|
||||
this_audio_thread.objs[0] = peer_session;
|
||||
this_audio_thread.objs[1] = session;
|
||||
this_audio_thread.running = 2;
|
||||
|
||||
|
||||
switch_channel_set_private(caller_channel, peer_session);
|
||||
switch_channel_set_private(peer_channel, session);
|
||||
switch_channel_set_event_handlers(caller_channel, &audio_bridge_caller_event_handlers);
|
||||
switch_channel_set_event_handlers(peer_channel, &audio_bridge_peer_event_handlers);
|
||||
switch_core_session_thread_launch(peer_session);
|
||||
|
||||
for(;;) {
|
||||
int state = switch_channel_get_state(peer_channel);
|
||||
if (state > CS_RING) {
|
||||
break;
|
||||
}
|
||||
switch_yield(100);
|
||||
}
|
||||
|
||||
time(&start);
|
||||
while(switch_channel_get_state(caller_channel) == CS_EXECUTE &&
|
||||
switch_channel_get_state(peer_channel) == CS_TRANSMIT &&
|
||||
!switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
|
||||
((time(NULL) - start) < timelimit)) {
|
||||
switch_yield(100);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
|
||||
switch_core_session_launch_thread(session, audio_bridge_thread, (void *) &other_audio_thread);
|
||||
audio_bridge_thread(NULL, (void *) &this_audio_thread);
|
||||
switch_channel_hangup(peer_channel);
|
||||
if (other_audio_thread.running > 0) {
|
||||
other_audio_thread.running = -1;
|
||||
/* wait for the other audio thread */
|
||||
while (other_audio_thread.running) {
|
||||
switch_yield(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
switch_channel_hangup(caller_channel);
|
||||
switch_channel_hangup(peer_channel);
|
||||
}
|
||||
|
||||
|
||||
static const switch_application_interface bridge_application_interface = {
|
||||
/*.interface_name*/ "bridge",
|
||||
/*.application_function*/ audio_bridge_function
|
||||
};
|
||||
|
||||
|
||||
static const switch_loadable_module_interface mod_bridgecall_module_interface = {
|
||||
/*.module_name = */ modname,
|
||||
/*.endpoint_interface = */ NULL,
|
||||
/*.timer_interface = */ NULL,
|
||||
/*.dialplan_interface = */ NULL,
|
||||
/*.codec_interface = */ NULL,
|
||||
/*.application_interface*/ &bridge_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_bridgecall_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_dialplan_demo.c -- Example Dialplan Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
static const char modname[] = "mod_dialplan_demo";
|
||||
|
||||
|
||||
switch_caller_extension *demo_dialplan_hunt(switch_core_session *session)
|
||||
{
|
||||
switch_caller_profile *caller_profile;
|
||||
switch_caller_extension *extension = NULL;
|
||||
switch_channel *channel;
|
||||
char *cf = "extensions.conf";
|
||||
switch_config cfg;
|
||||
char *var, *val;
|
||||
char app[1024];
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
caller_profile = switch_channel_get_caller_profile(channel);
|
||||
//switch_channel_set_variable(channel, "pleasework", "yay");
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Hello %s You Dialed %s!\n", caller_profile->caller_id_name, caller_profile->destination_number);
|
||||
|
||||
if (!switch_config_open_file(&cfg, cf)) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "open of %s failed\n", cf);
|
||||
switch_channel_hangup(channel);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (switch_config_next_pair(&cfg, &var, &val)) {
|
||||
if (!strcasecmp(cfg.category, "extensions")) {
|
||||
if (!strcmp(var, caller_profile->destination_number) && val) {
|
||||
char *data;
|
||||
|
||||
memset(app, 0, sizeof(app));
|
||||
strncpy(app, val, sizeof(app));
|
||||
|
||||
if ((data = strchr(app, ' '))) {
|
||||
*data = '\0';
|
||||
data++;
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "invalid extension on line %d\n", cfg.lineno);
|
||||
continue;
|
||||
}
|
||||
if (!extension) {
|
||||
if (!(extension = switch_caller_extension_new(session, caller_profile->destination_number, caller_profile->destination_number))) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "memory error!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch_caller_extension_add_application(session, extension, app, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch_config_close_file(&cfg);
|
||||
|
||||
if (extension) {
|
||||
switch_channel_set_state(channel, CS_EXECUTE);
|
||||
} else {
|
||||
switch_channel_hangup(channel);
|
||||
}
|
||||
|
||||
return extension;
|
||||
}
|
||||
|
||||
|
||||
static const switch_dialplan_interface demo_dialplan_interface = {
|
||||
/*.interface_name =*/ "demo",
|
||||
/*.hunt_function = */ demo_dialplan_hunt
|
||||
/*.next = NULL */
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface demo_dialplan_module_interface = {
|
||||
/*.module_name = */ modname,
|
||||
/*.endpoint_interface = */ NULL,
|
||||
/*.timer_interface = */ NULL,
|
||||
/*.dialplan_interface = */ &demo_dialplan_interface,
|
||||
/*.codec_interface = */ NULL,
|
||||
/*.application_interface =*/ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &demo_dialplan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
#CFLAGS += -I/usr/src/common/src
|
||||
LDFLAGS += -leXosip2 -ljrtp4c
|
||||
|
||||
$(MOD).so: $(MOD).c
|
||||
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
|
||||
$(CC) -shared -Xlinker -x -o $(MOD).so $(MOD).o $(LDFLAGS)
|
||||
|
||||
all: $(MOD).so
|
||||
|
||||
clean:
|
||||
rm -fr *.so *.o *~
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,15 @@
|
|||
|
||||
all: $(MOD).so
|
||||
|
||||
g711.o: g711.c g711.h
|
||||
$(CC) -c -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE g711.c -o g711.o
|
||||
|
||||
$(MOD).so: $(MOD).c g711.o
|
||||
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
|
||||
$(CC) -shared -Xlinker -x g711.o $(MOD).o -o $(MOD).so $(LDFLAGS)
|
||||
|
||||
|
||||
|
||||
clean:
|
||||
rm -fr *.so *.o *~
|
||||
|
|
@ -0,0 +1,312 @@
|
|||
/*
|
||||
* This source code is a product of Sun Microsystems, Inc. and is provided
|
||||
* for unrestricted use. Users may copy or modify this source code without
|
||||
* charge.
|
||||
*
|
||||
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
|
||||
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun source code is provided with no support and without any obligation on
|
||||
* the part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
/*
|
||||
* December 30, 1994:
|
||||
* Functions linear2alaw, linear2ulaw have been updated to correctly
|
||||
* convert unquantized 16 bit values.
|
||||
* Tables for direct u- to A-law and A- to u-law conversions have been
|
||||
* corrected.
|
||||
* Borge Lindberg, Center for PersonKommunikation, Aalborg University.
|
||||
* bli@cpk.auc.dk
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Downloaded from comp.speech site in Cambridge.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "g711.h"
|
||||
|
||||
/*
|
||||
* g711.c
|
||||
*
|
||||
* u-law, A-law and linear PCM conversions.
|
||||
*/
|
||||
#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */
|
||||
#define QUANT_MASK (0xf) /* Quantization field mask. */
|
||||
#define NSEGS (8) /* Number of A-law segments. */
|
||||
#define SEG_SHIFT (4) /* Left shift for segment number. */
|
||||
#define SEG_MASK (0x70) /* Segment field mask. */
|
||||
|
||||
static short seg_aend[8] = {0x1F, 0x3F, 0x7F, 0xFF,
|
||||
0x1FF, 0x3FF, 0x7FF, 0xFFF};
|
||||
static short seg_uend[8] = {0x3F, 0x7F, 0xFF, 0x1FF,
|
||||
0x3FF, 0x7FF, 0xFFF, 0x1FFF};
|
||||
|
||||
/* copy from CCITT G.711 specifications */
|
||||
unsigned char _u2a[128] = { /* u- to A-law conversions */
|
||||
1, 1, 2, 2, 3, 3, 4, 4,
|
||||
5, 5, 6, 6, 7, 7, 8, 8,
|
||||
9, 10, 11, 12, 13, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24,
|
||||
25, 27, 29, 31, 33, 34, 35, 36,
|
||||
37, 38, 39, 40, 41, 42, 43, 44,
|
||||
46, 48, 49, 50, 51, 52, 53, 54,
|
||||
55, 56, 57, 58, 59, 60, 61, 62,
|
||||
64, 65, 66, 67, 68, 69, 70, 71,
|
||||
72, 73, 74, 75, 76, 77, 78, 79,
|
||||
/* corrected:
|
||||
81, 82, 83, 84, 85, 86, 87, 88,
|
||||
should be: */
|
||||
80, 82, 83, 84, 85, 86, 87, 88,
|
||||
89, 90, 91, 92, 93, 94, 95, 96,
|
||||
97, 98, 99, 100, 101, 102, 103, 104,
|
||||
105, 106, 107, 108, 109, 110, 111, 112,
|
||||
113, 114, 115, 116, 117, 118, 119, 120,
|
||||
121, 122, 123, 124, 125, 126, 127, 128};
|
||||
|
||||
unsigned char _a2u[128] = { /* A- to u-law conversions */
|
||||
1, 3, 5, 7, 9, 11, 13, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 32, 33, 33, 34, 34, 35, 35,
|
||||
36, 37, 38, 39, 40, 41, 42, 43,
|
||||
44, 45, 46, 47, 48, 48, 49, 49,
|
||||
50, 51, 52, 53, 54, 55, 56, 57,
|
||||
58, 59, 60, 61, 62, 63, 64, 64,
|
||||
65, 66, 67, 68, 69, 70, 71, 72,
|
||||
/* corrected:
|
||||
73, 74, 75, 76, 77, 78, 79, 79,
|
||||
should be: */
|
||||
73, 74, 75, 76, 77, 78, 79, 80,
|
||||
80, 81, 82, 83, 84, 85, 86, 87,
|
||||
88, 89, 90, 91, 92, 93, 94, 95,
|
||||
96, 97, 98, 99, 100, 101, 102, 103,
|
||||
104, 105, 106, 107, 108, 109, 110, 111,
|
||||
112, 113, 114, 115, 116, 117, 118, 119,
|
||||
120, 121, 122, 123, 124, 125, 126, 127};
|
||||
|
||||
static short search(
|
||||
short val,
|
||||
short *table,
|
||||
short size)
|
||||
{
|
||||
short i;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (val <= *table++)
|
||||
return (i);
|
||||
}
|
||||
return (size);
|
||||
}
|
||||
|
||||
/*
|
||||
* linear2alaw() - Convert a 16-bit linear PCM value to 8-bit A-law
|
||||
*
|
||||
* linear2alaw() accepts an 16-bit integer and encodes it as A-law data.
|
||||
*
|
||||
* Linear Input Code Compressed Code
|
||||
* ------------------------ ---------------
|
||||
* 0000000wxyza 000wxyz
|
||||
* 0000001wxyza 001wxyz
|
||||
* 000001wxyzab 010wxyz
|
||||
* 00001wxyzabc 011wxyz
|
||||
* 0001wxyzabcd 100wxyz
|
||||
* 001wxyzabcde 101wxyz
|
||||
* 01wxyzabcdef 110wxyz
|
||||
* 1wxyzabcdefg 111wxyz
|
||||
*
|
||||
* For further information see John C. Bellamy's Digital Telephony, 1982,
|
||||
* John Wiley & Sons, pps 98-111 and 472-476.
|
||||
*/
|
||||
unsigned char
|
||||
linear2alaw(short pcm_val) /* 2's complement (16-bit range) */
|
||||
{
|
||||
short mask;
|
||||
short seg;
|
||||
unsigned char aval;
|
||||
|
||||
pcm_val = pcm_val >> 3;
|
||||
|
||||
if (pcm_val >= 0) {
|
||||
mask = 0xD5; /* sign (7th) bit = 1 */
|
||||
} else {
|
||||
mask = 0x55; /* sign bit = 0 */
|
||||
pcm_val = -pcm_val - 1;
|
||||
}
|
||||
|
||||
/* Convert the scaled magnitude to segment number. */
|
||||
seg = search(pcm_val, seg_aend, 8);
|
||||
|
||||
/* Combine the sign, segment, and quantization bits. */
|
||||
|
||||
if (seg >= 8) /* out of range, return maximum value. */
|
||||
return (unsigned char) (0x7F ^ mask);
|
||||
else {
|
||||
aval = (unsigned char) seg << SEG_SHIFT;
|
||||
if (seg < 2)
|
||||
aval |= (pcm_val >> 1) & QUANT_MASK;
|
||||
else
|
||||
aval |= (pcm_val >> seg) & QUANT_MASK;
|
||||
return (aval ^ mask);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* alaw2linear() - Convert an A-law value to 16-bit linear PCM
|
||||
*
|
||||
*/
|
||||
short
|
||||
alaw2linear(
|
||||
unsigned char a_val)
|
||||
{
|
||||
short t;
|
||||
short seg;
|
||||
|
||||
a_val ^= 0x55;
|
||||
|
||||
t = (a_val & QUANT_MASK) << 4;
|
||||
seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
|
||||
switch (seg) {
|
||||
case 0:
|
||||
t += 8;
|
||||
break;
|
||||
case 1:
|
||||
t += 0x108;
|
||||
break;
|
||||
default:
|
||||
t += 0x108;
|
||||
t <<= seg - 1;
|
||||
}
|
||||
return ((a_val & SIGN_BIT) ? t : -t);
|
||||
}
|
||||
|
||||
#define BIAS (0x84) /* Bias for linear code. */
|
||||
#define CLIP 8159
|
||||
|
||||
/*
|
||||
* linear2ulaw() - Convert a linear PCM value to u-law
|
||||
*
|
||||
* In order to simplify the encoding process, the original linear magnitude
|
||||
* is biased by adding 33 which shifts the encoding range from (0 - 8158) to
|
||||
* (33 - 8191). The result can be seen in the following encoding table:
|
||||
*
|
||||
* Biased Linear Input Code Compressed Code
|
||||
* ------------------------ ---------------
|
||||
* 00000001wxyza 000wxyz
|
||||
* 0000001wxyzab 001wxyz
|
||||
* 000001wxyzabc 010wxyz
|
||||
* 00001wxyzabcd 011wxyz
|
||||
* 0001wxyzabcde 100wxyz
|
||||
* 001wxyzabcdef 101wxyz
|
||||
* 01wxyzabcdefg 110wxyz
|
||||
* 1wxyzabcdefgh 111wxyz
|
||||
*
|
||||
* Each biased linear code has a leading 1 which identifies the segment
|
||||
* number. The value of the segment number is equal to 7 minus the number
|
||||
* of leading 0's. The quantization interval is directly available as the
|
||||
* four bits wxyz. * The trailing bits (a - h) are ignored.
|
||||
*
|
||||
* Ordinarily the complement of the resulting code word is used for
|
||||
* transmission, and so the code word is complemented before it is returned.
|
||||
*
|
||||
* For further information see John C. Bellamy's Digital Telephony, 1982,
|
||||
* John Wiley & Sons, pps 98-111 and 472-476.
|
||||
*/
|
||||
unsigned char
|
||||
linear2ulaw(
|
||||
short pcm_val) /* 2's complement (16-bit range) */
|
||||
{
|
||||
short mask;
|
||||
short seg;
|
||||
unsigned char uval;
|
||||
|
||||
/* Get the sign and the magnitude of the value. */
|
||||
pcm_val = pcm_val >> 2;
|
||||
if (pcm_val < 0) {
|
||||
pcm_val = -pcm_val;
|
||||
mask = 0x7F;
|
||||
} else {
|
||||
mask = 0xFF;
|
||||
}
|
||||
if ( pcm_val > CLIP ) pcm_val = CLIP; /* clip the magnitude */
|
||||
pcm_val += (BIAS >> 2);
|
||||
|
||||
/* Convert the scaled magnitude to segment number. */
|
||||
seg = search(pcm_val, seg_uend, 8);
|
||||
|
||||
/*
|
||||
* Combine the sign, segment, quantization bits;
|
||||
* and complement the code word.
|
||||
*/
|
||||
if (seg >= 8) /* out of range, return maximum value. */
|
||||
return (unsigned char) (0x7F ^ mask);
|
||||
else {
|
||||
uval = (unsigned char) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF);
|
||||
return (uval ^ mask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* ulaw2linear() - Convert a u-law value to 16-bit linear PCM
|
||||
*
|
||||
* First, a biased linear code is derived from the code word. An unbiased
|
||||
* output can then be obtained by subtracting 33 from the biased code.
|
||||
*
|
||||
* Note that this function expects to be passed the complement of the
|
||||
* original code word. This is in keeping with ISDN conventions.
|
||||
*/
|
||||
short
|
||||
ulaw2linear(
|
||||
unsigned char u_val)
|
||||
{
|
||||
short t;
|
||||
|
||||
/* Complement to obtain normal u-law value. */
|
||||
u_val = ~u_val;
|
||||
|
||||
/*
|
||||
* Extract and bias the quantization bits. Then
|
||||
* shift up by the segment number and subtract out the bias.
|
||||
*/
|
||||
t = ((u_val & QUANT_MASK) << 3) + BIAS;
|
||||
t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
|
||||
|
||||
return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
|
||||
}
|
||||
|
||||
/* A-law to u-law conversion */
|
||||
unsigned char
|
||||
alaw2ulaw(
|
||||
unsigned char aval)
|
||||
{
|
||||
aval &= 0xff;
|
||||
return (unsigned char) ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) :
|
||||
(0x7F ^ _a2u[aval ^ 0x55]));
|
||||
}
|
||||
|
||||
/* u-law to A-law conversion */
|
||||
unsigned char
|
||||
ulaw2alaw(
|
||||
unsigned char uval)
|
||||
{
|
||||
uval &= 0xff;
|
||||
return (unsigned char) ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) :
|
||||
(0x55 ^ (_u2a[0x7F ^ uval] - 1)));
|
||||
}
|
||||
|
||||
/* ---------- end of g711.c ----------------------------------------------------- */
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* This source code is a product of Sun Microsystems, Inc. and is provided
|
||||
* for unrestricted use. Users may copy or modify this source code without
|
||||
* charge.
|
||||
*
|
||||
* SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
|
||||
* THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
||||
*
|
||||
* Sun source code is provided with no support and without any obligation on
|
||||
* the part of Sun Microsystems, Inc. to assist in its use, correction,
|
||||
* modification or enhancement.
|
||||
*
|
||||
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
||||
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
|
||||
* OR ANY PART THEREOF.
|
||||
*
|
||||
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
||||
* or profits or other special, indirect and consequential damages, even if
|
||||
* Sun has been advised of the possibility of such damages.
|
||||
*
|
||||
* Sun Microsystems, Inc.
|
||||
* 2550 Garcia Avenue
|
||||
* Mountain View, California 94043
|
||||
*/
|
||||
/*
|
||||
* December 30, 1994:
|
||||
* Functions linear2alaw, linear2ulaw have been updated to correctly
|
||||
* convert unquantized 16 bit values.
|
||||
* Tables for direct u- to A-law and A- to u-law conversions have been
|
||||
* corrected.
|
||||
* Borge Lindberg, Center for PersonKommunikation, Aalborg University.
|
||||
* bli@cpk.auc.dk
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Downloaded from comp.speech site in Cambridge.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _G711_H_
|
||||
#define _G711_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
unsigned char linear2alaw(short pcm_val);
|
||||
short alaw2linear(unsigned char a_val);
|
||||
unsigned char linear2ulaw(short pcm_val);
|
||||
short ulaw2linear(unsigned char u_val);
|
||||
unsigned char alaw2ulaw(unsigned char aval);
|
||||
unsigned char ulaw2alaw(unsigned char uval);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _G711_H_ */
|
|
@ -0,0 +1,295 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_g711codec.c -- G711 Ulaw/Alaw Codec Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include "g711.h"
|
||||
|
||||
|
||||
static const char modname[] = "mod_g711codec";
|
||||
|
||||
|
||||
static switch_status switch_g711u_init(switch_codec *codec, switch_codec_flag flags, const struct switch_codec_settings *codec_settings)
|
||||
{
|
||||
int encoding, decoding;
|
||||
|
||||
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (!(encoding || decoding)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static switch_status switch_g711u_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
|
||||
for (i = 0; i < decoded_data_len / sizeof(short); i++) {
|
||||
ebuf[i] = linear2ulaw(dbuf[i]);
|
||||
}
|
||||
|
||||
*encoded_data_len = i;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status switch_g711u_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
|
||||
if (*flag & SWITCH_CODEC_FLAG_SILENCE) {
|
||||
memset(dbuf, 0, codec->implementation->bytes_per_frame);
|
||||
*decoded_data_len = codec->implementation->bytes_per_frame;
|
||||
} else {
|
||||
for (i = 0; i < encoded_data_len; i++) {
|
||||
dbuf[i] = ulaw2linear(ebuf[i]);
|
||||
}
|
||||
|
||||
*decoded_data_len = i * 2;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status switch_g711u_destroy(switch_codec *codec)
|
||||
{
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static switch_status switch_g711a_init(switch_codec *codec, switch_codec_flag flags, const struct switch_codec_settings *codec_settings)
|
||||
{
|
||||
int encoding, decoding;
|
||||
|
||||
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (!(encoding || decoding)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static switch_status switch_g711a_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
|
||||
for (i = 0; i < decoded_data_len / sizeof(short); i++) {
|
||||
ebuf[i] = linear2alaw(dbuf[i]);
|
||||
}
|
||||
|
||||
*encoded_data_len = i;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status switch_g711a_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
short *dbuf;
|
||||
unsigned char *ebuf;
|
||||
size_t i;
|
||||
|
||||
dbuf = decoded_data;
|
||||
ebuf = encoded_data;
|
||||
|
||||
if (*flag & SWITCH_CODEC_FLAG_SILENCE) {
|
||||
memset(dbuf, 0, codec->implementation->bytes_per_frame);
|
||||
*decoded_data_len = codec->implementation->bytes_per_frame;
|
||||
} else {
|
||||
for (i = 0; i < encoded_data_len; i++) {
|
||||
dbuf[i] = alaw2linear(ebuf[i]);
|
||||
}
|
||||
|
||||
*decoded_data_len = i * 2;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status switch_g711a_destroy(switch_codec *codec)
|
||||
{
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* Registration */
|
||||
|
||||
|
||||
static const switch_codec_implementation g711u_8k_60ms_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 19200,
|
||||
/*.microseconds_per_frame*/ 60000,
|
||||
/*.samples_per_frame*/ 480,
|
||||
/*.bytes_per_frame*/ 960,
|
||||
/*.encoded_bytes_per_frame*/ 480,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_g711u_init,
|
||||
/*.encode*/ switch_g711u_encode,
|
||||
/*.decode*/ switch_g711u_decode,
|
||||
/*.destroy*/ switch_g711u_destroy
|
||||
};
|
||||
|
||||
static const switch_codec_implementation g711u_8k_30ms_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 96000,
|
||||
/*.microseconds_per_frame*/ 30000,
|
||||
/*.samples_per_frame*/ 240,
|
||||
/*.bytes_per_frame*/ 480,
|
||||
/*.encoded_bytes_per_frame*/ 240,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_g711u_init,
|
||||
/*.encode*/ switch_g711u_encode,
|
||||
/*.decode*/ switch_g711u_decode,
|
||||
/*.destroy*/ switch_g711u_destroy,
|
||||
/*.next*/ &g711u_8k_60ms_implementation
|
||||
};
|
||||
|
||||
static const switch_codec_implementation g711u_8k_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 64000,
|
||||
/*.microseconds_per_frame*/ 20000,
|
||||
/*.samples_per_frame*/ 160,
|
||||
/*.bytes_per_frame*/ 320,
|
||||
/*.encoded_bytes_per_frame*/ 160,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_g711u_init,
|
||||
/*.encode*/ switch_g711u_encode,
|
||||
/*.decode*/ switch_g711u_decode,
|
||||
/*.destroy*/ switch_g711u_destroy,
|
||||
///*.next*/ &g711u_8k_30ms_implementation
|
||||
};
|
||||
|
||||
|
||||
static const switch_codec_implementation g711a_8k_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 64000,
|
||||
/*.microseconds_per_frame*/ 20000,
|
||||
/*.samples_per_frame*/ 160,
|
||||
/*.bytes_per_frame*/ 320,
|
||||
/*.encoded_bytes_per_frame*/ 160,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_g711a_init,
|
||||
/*.encode*/ switch_g711a_encode,
|
||||
/*.decode*/ switch_g711a_decode,
|
||||
/*.destroy*/ switch_g711a_destroy
|
||||
};
|
||||
|
||||
|
||||
static const switch_codec_interface g711a_codec_interface = {
|
||||
/*.interface_name*/ "g711 alaw",
|
||||
/*.codec_type*/ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode*/ 8,
|
||||
/*.iananame*/ "PCMA",
|
||||
/*.implementations*/ &g711a_8k_implementation
|
||||
};
|
||||
|
||||
static const switch_codec_interface g711u_codec_interface = {
|
||||
/*.interface_name*/ "g711 ulaw",
|
||||
/*.codec_type*/ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode*/ 0,
|
||||
/*.iananame*/ "PCMU",
|
||||
/*.implementations*/ &g711u_8k_implementation,
|
||||
/*.next*/ &g711a_codec_interface
|
||||
};
|
||||
|
||||
static switch_loadable_module_interface g711_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ NULL,
|
||||
/*.dialplan_interface*/ NULL,
|
||||
/*.codec_interface*/ &g711u_codec_interface,
|
||||
/*.application_interface*/ NULL
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &g711_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_playback.c -- Raw Audio File Streaming Application Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
static const char modname[] = "mod_playback";
|
||||
|
||||
|
||||
void playback_function(switch_core_session *session, char *data)
|
||||
{
|
||||
switch_channel *channel;
|
||||
switch_file_t *fd;
|
||||
char buf[960];
|
||||
int interval = 0, samples = 0;
|
||||
size_t len = 0, ilen = 0;
|
||||
switch_frame write_frame;
|
||||
switch_timer timer;
|
||||
switch_core_thread_session thread_session;
|
||||
switch_codec codec;
|
||||
int x;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
switch_channel_answer(channel);
|
||||
|
||||
write_frame.data = buf;
|
||||
|
||||
|
||||
if (switch_file_open(&fd, data, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OPEN FILE FAILED\n");
|
||||
switch_channel_hangup(channel);
|
||||
return;
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OPEN FILE %s\n", data);
|
||||
|
||||
interval = 20;
|
||||
len = 320;
|
||||
samples = 160;
|
||||
|
||||
|
||||
#if 0
|
||||
interval = 30;
|
||||
len = 480;
|
||||
samples = 240;
|
||||
#endif
|
||||
/* You can use zap instead of soft if you have it loaded */
|
||||
if (switch_core_timer_init(&timer, "soft", interval, samples) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "setup timer failed!\n");
|
||||
switch_channel_hangup(channel);
|
||||
return;
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "setup timer success %d bytes per %d ms!\n", len, interval);
|
||||
|
||||
if (switch_core_codec_init(&codec, "L16", 8000, interval, SWITCH_CODEC_FLAG_ENCODE|SWITCH_CODEC_FLAG_DECODE, NULL) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Raw Codec Activated\n");
|
||||
write_frame.codec = &codec;
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Raw Codec Activation Failed\n");
|
||||
switch_channel_hangup(channel);
|
||||
return;
|
||||
}
|
||||
|
||||
/* start a thread to absorb incoming audio */
|
||||
switch_core_service_session(session, &thread_session);
|
||||
ilen = len;
|
||||
while(switch_channel_get_state(channel) == CS_EXECUTE) {
|
||||
if(switch_file_read(fd, buf, &ilen) != SWITCH_STATUS_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
|
||||
write_frame.datalen = ilen;
|
||||
if (switch_core_session_write_frame(session, &write_frame, -1) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Write\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if ((x = switch_core_timer_next(&timer)) < 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "done playing file\n");
|
||||
switch_file_close(fd);
|
||||
|
||||
/* End the audio absorbing thread */
|
||||
switch_core_thread_session_end(&thread_session);
|
||||
|
||||
switch_core_timer_destroy(&timer);
|
||||
|
||||
switch_core_codec_destroy(&codec);
|
||||
|
||||
switch_channel_hangup(channel);
|
||||
}
|
||||
|
||||
static const switch_application_interface playback_application_interface = {
|
||||
/*.interface_name*/ "playback",
|
||||
/*.application_function*/ playback_function
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface mod_playback_module_interface = {
|
||||
/*.module_name = */ modname,
|
||||
/*.endpoint_interface = */ NULL,
|
||||
/*.timer_interface = */ NULL,
|
||||
/*.dialplan_interface = */ NULL,
|
||||
/*.codec_interface = */ NULL,
|
||||
/*.application_interface*/ &playback_application_interface
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_playback_module_interface;
|
||||
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* 'switch_module_runtime' will start up in a thread by itself just by having it exist
|
||||
if it returns anything but SWITCH_STATUS_TERM it will be called again automaticly
|
||||
*/
|
||||
|
||||
|
||||
//switch_status switch_module_runtime(void)
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,185 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_rawaudio.c -- Raw Signed Linear Codec
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static const char modname[] = "mod_rawaudio";
|
||||
|
||||
static switch_status switch_raw_init(switch_codec *codec, switch_codec_flag flags, const struct switch_codec_settings *codec_settings)
|
||||
{
|
||||
int encoding, decoding;
|
||||
|
||||
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (!(encoding || decoding)) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
static switch_status switch_raw_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary.
|
||||
TBD look at other_codec to determine the original format of the data and determine if we need to resample
|
||||
in the event the audio is the same format but different implementations.
|
||||
*/
|
||||
|
||||
return SWITCH_STATUS_NOOP;
|
||||
}
|
||||
|
||||
static switch_status switch_raw_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
|
||||
//printf("decode %d %d->%d\n", encoded_data_len, other_codec->implementation->bytes_per_frame, codec->implementation->bytes_per_frame);
|
||||
return SWITCH_STATUS_NOOP;
|
||||
}
|
||||
|
||||
static switch_status switch_raw_destroy(switch_codec *codec)
|
||||
{
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* Registration */
|
||||
|
||||
static const switch_codec_implementation raw_32k_implementation = {
|
||||
/*.samples_per_second = */ 32000,
|
||||
/*.bits_per_second = */ 512000,
|
||||
/*.samples_per_frame = */ 640,
|
||||
/*.bytes_per_frame = */ 1280,
|
||||
/*.encoded_bytes_per_frame = */ 1280,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.number_of_channels = */ 1,
|
||||
/*.pref_frames_per_packet = */ 1,
|
||||
/*.max_frames_per_packet = */ 1,
|
||||
/*.init = */ switch_raw_init,
|
||||
/*.encode = */ switch_raw_encode,
|
||||
/*.decode = */ switch_raw_decode,
|
||||
/*.destroy = */ switch_raw_destroy
|
||||
};
|
||||
|
||||
static const switch_codec_implementation raw_16k_implementation = {
|
||||
/*.samples_per_second = */ 16000,
|
||||
/*.bits_per_second = */ 256000,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 320,
|
||||
/*.bytes_per_frame = */ 640,
|
||||
/*.encoded_bytes_per_frame = */ 640,
|
||||
/*.number_of_channels = */ 1,
|
||||
/*.pref_frames_per_packet = */ 1,
|
||||
/*.max_frames_per_packet = */ 1,
|
||||
/*.init = */ switch_raw_init,
|
||||
/*.encode = */ switch_raw_encode,
|
||||
/*.decode = */ switch_raw_decode,
|
||||
/*.destroy = */ switch_raw_destroy,
|
||||
/*.next = */ &raw_32k_implementation
|
||||
};
|
||||
|
||||
static const switch_codec_implementation raw_8k_implementation = {
|
||||
/*.samples_per_second = */ 8000,
|
||||
/*.bits_per_second = */ 128000,
|
||||
/*.microseconds_per_frame = */ 20000,
|
||||
/*.samples_per_frame = */ 160,
|
||||
/*.bytes_per_frame = */ 320,
|
||||
/*.encoded_bytes_per_frame = */ 320,
|
||||
/*.number_of_channels = */ 1,
|
||||
/*.pref_frames_per_packet = */ 1,
|
||||
/*.max_frames_per_packet = */ 1,
|
||||
/*.init = */ switch_raw_init,
|
||||
/*.encode = */ switch_raw_encode,
|
||||
/*.decode = */ switch_raw_decode,
|
||||
/*.destroy = */ switch_raw_destroy,
|
||||
/*.next = */ &raw_16k_implementation
|
||||
};
|
||||
|
||||
|
||||
static const switch_codec_implementation raw_8k_30ms_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 128000,
|
||||
/*.microseconds_per_frame*/ 30000,
|
||||
/*.samples_per_frame*/ 240,
|
||||
/*.bytes_per_frame*/ 480,
|
||||
/*.encoded_bytes_per_frame*/ 480,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_raw_init,
|
||||
/*.encode*/ switch_raw_encode,
|
||||
/*.decode*/ switch_raw_decode,
|
||||
/*.destroy*/ switch_raw_destroy,
|
||||
/*.next*/ &raw_8k_implementation
|
||||
};
|
||||
|
||||
|
||||
static const switch_codec_interface raw_codec_interface = {
|
||||
/*.interface_name*/ "raw signed linear (16 bit)",
|
||||
/*.codec_type*/ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode*/ 10,
|
||||
/*.iananame*/ "L16",
|
||||
/*.implementations*/ &raw_8k_30ms_implementation
|
||||
};
|
||||
|
||||
static switch_loadable_module_interface raw_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ NULL,
|
||||
/*.dialplan_interface*/ NULL,
|
||||
/*.codec_interface*/ &raw_codec_interface,
|
||||
/*.application_interface*/ NULL
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &raw_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_skel.c -- Framework Demo Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static const char modname[] = "mod_skel";
|
||||
|
||||
static switch_loadable_module_interface skel_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ NULL,
|
||||
/*.dialplan_interface*/ NULL,
|
||||
/*.codec_interface*/ NULL,
|
||||
/*.application_interface*/ NULL
|
||||
};
|
||||
|
||||
switch_status switch_module_load(switch_loadable_module_interface **interface) {
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &skel_module_interface;
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Hello World!\n");
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_softtimer.c -- Software Timer Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static const char modname[] = "mod_softtimer";
|
||||
|
||||
#ifdef WIN32
|
||||
//#define WINTIMER
|
||||
#endif
|
||||
|
||||
struct timer_private {
|
||||
#ifdef WINTIMER
|
||||
LARGE_INTEGER freq;
|
||||
LARGE_INTEGER base;
|
||||
LARGE_INTEGER now;
|
||||
#else
|
||||
switch_time_t reference;
|
||||
#endif
|
||||
};
|
||||
|
||||
static switch_status soft_timer_init(switch_timer *timer)
|
||||
{
|
||||
struct timer_private *private;
|
||||
|
||||
private = switch_core_alloc(timer->memory_pool, sizeof(*private));
|
||||
timer->private = private;
|
||||
|
||||
#ifdef WINTIMER
|
||||
QueryPerformanceFrequency(&private->freq);
|
||||
QueryPerformanceCounter(&private->base);
|
||||
#else
|
||||
private->reference = switch_time_now();
|
||||
#endif
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status soft_timer_next(switch_timer *timer)
|
||||
{
|
||||
struct timer_private *private = timer->private;
|
||||
|
||||
#ifdef WINTIMER
|
||||
private->base.QuadPart += timer->interval * (private->freq.QuadPart / 1000);
|
||||
for(;;) {
|
||||
QueryPerformanceCounter(&private->now);
|
||||
if(private->now.QuadPart >= private->base.QuadPart) {
|
||||
break;
|
||||
}
|
||||
switch_yield(100);
|
||||
}
|
||||
#else
|
||||
private->reference += timer->interval * 1000;
|
||||
|
||||
while (switch_time_now() < private->reference) {
|
||||
switch_yield(1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
timer->samplecount += timer->samples;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status soft_timer_destroy(switch_timer *timer)
|
||||
{
|
||||
timer->private = NULL;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static const switch_timer_interface soft_timer_interface = {
|
||||
/*.interface_name*/ "soft",
|
||||
/*.timer_init*/ soft_timer_init,
|
||||
/*.timer_next*/ soft_timer_next,
|
||||
/*.timer_destroy*/ soft_timer_destroy
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface mod_timers_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ &soft_timer_interface,
|
||||
/*.switch_dialplan_interface*/ NULL,
|
||||
/*.switch_codec_interface*/ NULL,
|
||||
/*.switch_application_interface*/ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &mod_timers_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
$(MOD).so: $(MOD).c
|
||||
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
|
||||
$(CC) -shared -Xlinker -x $(MOD).o -o $(MOD).so $(LDFLAGS) -lspeex
|
||||
|
||||
all: $(MOD).so
|
||||
|
||||
clean:
|
||||
rm -fr *.so *.o *~
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_speexcodec.c -- Speex Codec Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <speex.h>
|
||||
#include <speex/speex_preprocess.h>
|
||||
|
||||
static const char modname[] = "mod_speexcodec";
|
||||
|
||||
const struct switch_codec_settings default_codec_settings = {
|
||||
/*.quality*/ 3,
|
||||
/*.complexity*/ 2,
|
||||
/*.enhancement*/ 1,
|
||||
/*.vad*/ 0,
|
||||
/*.vbr*/ 0,
|
||||
/*.vbr_quality*/ 4,
|
||||
/*.abr*/ 0,
|
||||
/*.dtx*/ 0,
|
||||
/*.preproc*/ 0,
|
||||
/*.pp_vad*/ 0,
|
||||
/*.pp_agc*/ 0,
|
||||
/*.pp_agc_level*/ 8000,
|
||||
/*.pp_denoise*/ 0,
|
||||
/*.pp_dereverb*/ 0,
|
||||
/*.pp_dereverb_decay*/ 0.4,
|
||||
/*.pp_dereverb_level*/ 0.3,
|
||||
};
|
||||
|
||||
struct speex_context {
|
||||
switch_codec *codec;
|
||||
unsigned int flags;
|
||||
|
||||
/* Encoder */
|
||||
void *encoder_state;
|
||||
struct SpeexBits encoder_bits;
|
||||
unsigned int encoder_frame_size;
|
||||
int encoder_mode;
|
||||
SpeexPreprocessState *pp;
|
||||
|
||||
/* Decoder */
|
||||
void *decoder_state;
|
||||
struct SpeexBits decoder_bits;
|
||||
unsigned int decoder_frame_size;
|
||||
int decoder_mode;
|
||||
};
|
||||
|
||||
static switch_status switch_speex_init(switch_codec *codec, switch_codec_flag flags, const struct switch_codec_settings *codec_settings)
|
||||
{
|
||||
struct speex_context *context = NULL;
|
||||
int encoding, decoding;
|
||||
|
||||
encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
decoding = (flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (!codec_settings) {
|
||||
codec_settings = &default_codec_settings;
|
||||
}
|
||||
|
||||
memcpy(&codec->codec_settings, codec_settings, sizeof(codec->codec_settings));
|
||||
|
||||
if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(*context))))) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
} else {
|
||||
const SpeexMode *mode = NULL;
|
||||
|
||||
context->codec = codec;
|
||||
if (codec->implementation->samples_per_second == 8000) {
|
||||
mode = &speex_nb_mode;
|
||||
} else if (codec->implementation->samples_per_second == 16000) {
|
||||
mode = &speex_wb_mode;
|
||||
} else if (codec->implementation->samples_per_second == 32000) {
|
||||
mode = &speex_uwb_mode;
|
||||
}
|
||||
|
||||
if (!mode) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (encoding) {
|
||||
speex_bits_init(&context->encoder_bits);
|
||||
context->encoder_state = speex_encoder_init(mode);
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_GET_FRAME_SIZE, &context->encoder_frame_size);
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_COMPLEXITY, &codec->codec_settings.complexity);
|
||||
if (codec->codec_settings.preproc) {
|
||||
context->pp = speex_preprocess_state_init(context->encoder_frame_size, codec->implementation->samples_per_second);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_VAD, &codec->codec_settings.pp_vad);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC, &codec->codec_settings.pp_agc);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_AGC_LEVEL, &codec->codec_settings.pp_agc_level);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DENOISE, &codec->codec_settings.pp_denoise);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB, &codec->codec_settings.pp_dereverb);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &codec->codec_settings.pp_dereverb_decay);
|
||||
speex_preprocess_ctl(context->pp, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &codec->codec_settings.pp_dereverb_level);
|
||||
}
|
||||
|
||||
if (!codec->codec_settings.abr && !codec->codec_settings.vbr) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_QUALITY, &codec->codec_settings.quality);
|
||||
if (codec->codec_settings.vad) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VAD, &codec->codec_settings.vad);
|
||||
}
|
||||
}
|
||||
if (codec->codec_settings.vbr) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VBR, &codec->codec_settings.vbr);
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_VBR_QUALITY, &codec->codec_settings.vbr_quality);
|
||||
}
|
||||
if (codec->codec_settings.abr) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_ABR, &codec->codec_settings.abr);
|
||||
}
|
||||
if (codec->codec_settings.dtx) {
|
||||
speex_encoder_ctl(context->encoder_state, SPEEX_SET_DTX, &codec->codec_settings.dtx);
|
||||
}
|
||||
}
|
||||
|
||||
if (decoding) {
|
||||
speex_bits_init(&context->decoder_bits);
|
||||
context->decoder_state = speex_decoder_init(mode);
|
||||
if (codec->codec_settings.enhancement) {
|
||||
speex_decoder_ctl(context->decoder_state, SPEEX_SET_ENH, &codec->codec_settings.enhancement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
codec->private = context;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
static switch_status switch_speex_encode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *decoded_data,
|
||||
size_t decoded_data_len,
|
||||
void *encoded_data,
|
||||
size_t *encoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private;
|
||||
short *buf;
|
||||
int is_speech = 1;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
buf = decoded_data;
|
||||
|
||||
if (context->pp) {
|
||||
is_speech = speex_preprocess(context->pp, buf, NULL);
|
||||
}
|
||||
|
||||
if (is_speech) {
|
||||
is_speech = speex_encode_int(context->encoder_state, buf, &context->encoder_bits) || ! context->codec->codec_settings.dtx;
|
||||
} else {
|
||||
speex_bits_pack(&context->encoder_bits, 0, 5);
|
||||
}
|
||||
|
||||
|
||||
if (is_speech) {
|
||||
switch_clear_flag(context, SWITCH_CODEC_FLAG_SILENCE);
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE_STOP;
|
||||
} else {
|
||||
if (switch_test_flag(context, SWITCH_CODEC_FLAG_SILENCE)) {
|
||||
*encoded_data_len = 0;
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_set_flag(context, SWITCH_CODEC_FLAG_SILENCE);
|
||||
*flag |= SWITCH_CODEC_FLAG_SILENCE_START;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
speex_bits_pack(&context->encoder_bits, 15, 5);
|
||||
*encoded_data_len = speex_bits_write(&context->encoder_bits, (char *)encoded_data, context->encoder_frame_size);
|
||||
speex_bits_reset(&context->encoder_bits);
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status switch_speex_decode(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
void *encoded_data,
|
||||
size_t encoded_data_len,
|
||||
void *decoded_data,
|
||||
size_t *decoded_data_len,
|
||||
unsigned int *flag)
|
||||
{
|
||||
struct speex_context *context = codec->private;
|
||||
short *buf;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
buf = decoded_data;
|
||||
if (*flag & SWITCH_CODEC_FLAG_SILENCE) {
|
||||
speex_decode_int(context->decoder_state, NULL, buf);
|
||||
} else {
|
||||
speex_bits_read_from(&context->decoder_bits, (char *)encoded_data, *decoded_data_len);
|
||||
speex_decode_int(context->decoder_state, &context->decoder_bits, buf);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static switch_status switch_speex_destroy(switch_codec *codec)
|
||||
{
|
||||
int encoding, decoding;
|
||||
struct speex_context *context = codec->private;
|
||||
|
||||
if (!context) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
|
||||
decoding = (codec->flags & SWITCH_CODEC_FLAG_DECODE);
|
||||
|
||||
if (encoding) {
|
||||
speex_bits_destroy(&context->encoder_bits);
|
||||
speex_encoder_destroy(context->encoder_state);
|
||||
}
|
||||
|
||||
if (decoding) {
|
||||
speex_bits_destroy(&context->decoder_bits);
|
||||
speex_decoder_destroy(context->decoder_state);
|
||||
}
|
||||
|
||||
codec->private = NULL;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* Registration */
|
||||
static const switch_codec_implementation speex_32k_implementation = {
|
||||
/*.samples_per_second*/ 32000,
|
||||
/*.bits_per_second*/ 512000,
|
||||
/*.nanoseconds_per_frame*/ 20000,
|
||||
/*.samples_per_frame*/ 640,
|
||||
/*.bytes_per_frame*/ 1280,
|
||||
/*.encoded_bytes_per_frame*/ 1280,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_speex_init,
|
||||
/*.encode*/ switch_speex_encode,
|
||||
/*.decode*/ switch_speex_decode,
|
||||
/*.destroy*/ switch_speex_destroy
|
||||
};
|
||||
|
||||
static const switch_codec_implementation speex_16k_implementation = {
|
||||
/*.samples_per_second*/ 16000,
|
||||
/*.bits_per_second*/ 256000,
|
||||
/*.nanoseconds_per_frame*/ 20000,
|
||||
/*.samples_per_frame*/ 320,
|
||||
/*.bytes_per_frame*/ 640,
|
||||
/*.encoded_bytes_per_frame*/ 640,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_speex_init,
|
||||
/*.encode*/ switch_speex_encode,
|
||||
/*.decode*/ switch_speex_decode,
|
||||
/*.destroy*/ switch_speex_destroy,
|
||||
/*.next*/ &speex_32k_implementation
|
||||
};
|
||||
|
||||
static const switch_codec_implementation speex_8k_implementation = {
|
||||
/*.samples_per_second*/ 8000,
|
||||
/*.bits_per_second*/ 128000,
|
||||
/*.nanoseconds_per_frame*/ 20000,
|
||||
/*.samples_per_frame*/ 160,
|
||||
/*.bytes_per_frame*/ 320,
|
||||
/*.encoded_bytes_per_frame*/ 320,
|
||||
/*.number_of_channels*/ 1,
|
||||
/*.pref_frames_per_packet*/ 1,
|
||||
/*.max_frames_per_packet*/ 1,
|
||||
/*.init*/ switch_speex_init,
|
||||
/*.encode*/ switch_speex_encode,
|
||||
/*.decode*/ switch_speex_decode,
|
||||
/*.destroy*/ switch_speex_destroy,
|
||||
/*.next*/ &speex_16k_implementation
|
||||
};
|
||||
|
||||
static const switch_codec_interface speex_codec_interface = {
|
||||
/*.interface_name*/ "speex",
|
||||
/*.codec_type*/ SWITCH_CODEC_TYPE_AUDIO,
|
||||
/*.ianacode*/ 98,
|
||||
/*.iananame*/ "speex",
|
||||
/*.implementations*/ &speex_8k_implementation
|
||||
};
|
||||
|
||||
static switch_loadable_module_interface speex_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ NULL,
|
||||
/*.timer_interface*/ NULL,
|
||||
/*.dialplan_interface*/ NULL,
|
||||
/*.codec_interface*/ &speex_codec_interface,
|
||||
/*.application_interface*/ NULL
|
||||
};
|
||||
|
||||
switch_status switch_module_load(switch_loadable_module_interface **interface) {
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &speex_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
|
@ -0,0 +1,634 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* mod_wanchan.c -- WANPIPE PRI Channel Module
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/queue.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <libsangoma.h>
|
||||
#include <sangoma_pri.h>
|
||||
|
||||
static const char modname[] = "mod_wanchan";
|
||||
#define STRLEN 15
|
||||
|
||||
static switch_memory_pool *module_pool;
|
||||
|
||||
typedef enum {
|
||||
PFLAG_ANSWER = (1 << 0),
|
||||
PFLAG_HANGUP = (1 << 1),
|
||||
} PFLAGS;
|
||||
|
||||
|
||||
typedef enum {
|
||||
PPFLAG_RING = (1 << 0),
|
||||
} PPFLAGS;
|
||||
|
||||
typedef enum {
|
||||
TFLAG_MEDIA = (1 << 0),
|
||||
TFLAG_INBOUND = (1 << 1),
|
||||
TFLAG_OUTBOUND = (1 << 2),
|
||||
TFLAG_INCOMING = (1 << 3),
|
||||
TFLAG_PARSE_INCOMING = (1 << 4),
|
||||
TFLAG_ACTIVATE = (1 << 5),
|
||||
TFLAG_DTMF = (1 << 6),
|
||||
TFLAG_DESTROY = (1 << 7),
|
||||
TFLAG_ABORT = (1 << 8),
|
||||
TFLAG_SWITCH = (1 << 9),
|
||||
} TFLAGS;
|
||||
|
||||
#define PACKET_LEN 160
|
||||
#define DEFAULT_BYTES_PER_FRAME 160
|
||||
|
||||
static struct {
|
||||
int debug;
|
||||
int panic;
|
||||
int span;
|
||||
int dchan;
|
||||
int node;
|
||||
int pswitch;
|
||||
int bytes_per_frame;
|
||||
char *dialplan;
|
||||
} globals;
|
||||
|
||||
|
||||
|
||||
struct private_object {
|
||||
unsigned int flags; /* FLAGS */
|
||||
struct switch_frame frame; /* Frame for Writing */
|
||||
unsigned char databuf[1024];
|
||||
struct sangoma_pri *spri;
|
||||
pri_event ring_event;
|
||||
pri_event hangup_event;
|
||||
sangoma_api_hdr_t hdrframe;
|
||||
switch_caller_profile *caller_profile;
|
||||
int socket;
|
||||
int callno;
|
||||
int cause;
|
||||
};
|
||||
|
||||
struct channel_map {
|
||||
switch_core_session *map[36];
|
||||
};
|
||||
|
||||
|
||||
static void set_global_dialplan(char *dialplan)
|
||||
{
|
||||
if (globals.dialplan) {
|
||||
free(globals.dialplan);
|
||||
globals.dialplan = NULL;
|
||||
}
|
||||
|
||||
globals.dialplan = strdup(dialplan);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int str2node(char *node)
|
||||
{
|
||||
if (!strcasecmp(node, "cpe"))
|
||||
return PRI_CPE;
|
||||
if (!strcasecmp(node, "network"))
|
||||
return PRI_NETWORK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int str2switch(char *swtype)
|
||||
{
|
||||
if (!strcasecmp(swtype, "ni2"))
|
||||
return PRI_SWITCH_NI2;
|
||||
if (!strcasecmp(swtype, "dms100"))
|
||||
return PRI_SWITCH_DMS100;
|
||||
if (!strcasecmp(swtype, "lucent5e"))
|
||||
return PRI_SWITCH_LUCENT5E;
|
||||
if (!strcasecmp(swtype, "att4ess"))
|
||||
return PRI_SWITCH_ATT4ESS;
|
||||
if (!strcasecmp(swtype, "euroisdn"))
|
||||
return PRI_SWITCH_EUROISDN_E1;
|
||||
if (!strcasecmp(swtype, "gr303eoc"))
|
||||
return PRI_SWITCH_GR303_EOC;
|
||||
if (!strcasecmp(swtype, "gr303tmc"))
|
||||
return PRI_SWITCH_GR303_TMC;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void set_global_dialplan(char *dialplan);
|
||||
static int str2node(char *node);
|
||||
static int str2switch(char *swtype);
|
||||
static switch_status wanchan_on_init(switch_core_session *session);
|
||||
static switch_status wanchan_on_hangup(switch_core_session *session);
|
||||
static switch_status wanchan_on_loopback(switch_core_session *session);
|
||||
static switch_status wanchan_on_transmit(switch_core_session *session);
|
||||
static switch_status wanchan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile, switch_core_session **new_session);
|
||||
static switch_status wanchan_read_frame(switch_core_session *session, switch_frame **frame, int timeout, switch_io_flag flags);
|
||||
static switch_status wanchan_write_frame(switch_core_session *session, switch_frame *frame, int timeout, switch_io_flag flags);
|
||||
static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event);
|
||||
static int on_hangup(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event);
|
||||
static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event);
|
||||
static int check_flags(struct sangoma_pri *spri);
|
||||
static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event);
|
||||
static int on_anything(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event);
|
||||
static void *pri_thread_run(switch_thread *thread, void *obj);
|
||||
static int config_wanpipe(int reload);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
State methods they get called when the state changes to the specific state
|
||||
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
|
||||
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
|
||||
*/
|
||||
static switch_status wanchan_on_init(switch_core_session *session)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
tech_pvt->frame.data = tech_pvt->databuf;
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "WANCHAN INIT\n");
|
||||
|
||||
|
||||
/* Move Channel's State Machine to RING */
|
||||
switch_channel_set_state(channel, CS_RING);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_on_ring(switch_core_session *session)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "WANCHAN RING\n");
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_on_hangup(switch_core_session *session)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
switch_socket_close(&tech_pvt->socket);
|
||||
|
||||
pri_hangup(tech_pvt->spri->pri, tech_pvt->hangup_event.hangup.call ? tech_pvt->hangup_event.hangup.call : tech_pvt->ring_event.ring.call, tech_pvt->cause);
|
||||
pri_destroycall(tech_pvt->spri->pri, tech_pvt->hangup_event.hangup.call ? tech_pvt->hangup_event.hangup.call : tech_pvt->ring_event.ring.call);
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "WANCHAN HANGUP\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_on_loopback(switch_core_session *session)
|
||||
{
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "WANCHAN LOOPBACK\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_on_transmit(switch_core_session *session)
|
||||
{
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "WANCHAN TRANSMIT\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile, switch_core_session **new_session)
|
||||
{
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "NOT IMPLEMENTED\n");
|
||||
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
static switch_status wanchan_answer_channel(switch_core_session *session)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
pri_answer(tech_pvt->spri->pri, tech_pvt->ring_event.ring.call, 0, 1);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static switch_status wanchan_read_frame(switch_core_session *session, switch_frame **frame, int timeout, switch_io_flag flags)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
void *bp;
|
||||
int bytes = 0, res = 0;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
bp = tech_pvt->databuf;
|
||||
|
||||
*frame = NULL;
|
||||
memset(tech_pvt->databuf, 0, sizeof(tech_pvt->databuf));
|
||||
while (bytes < globals.bytes_per_frame) {
|
||||
if ((res = switch_socket_waitfor(tech_pvt->socket, timeout, POLLIN|POLLERR)) < 0) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
} else if (res == 0) {
|
||||
tech_pvt->frame.datalen = 0;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if ((res = sangoma_readmsg_socket(
|
||||
tech_pvt->socket,
|
||||
&tech_pvt->hdrframe,
|
||||
sizeof(tech_pvt->hdrframe),
|
||||
bp,
|
||||
sizeof(tech_pvt->databuf) - bytes, 0)) < 0) {
|
||||
if (errno == EBUSY) {
|
||||
continue;
|
||||
} else {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
}
|
||||
bytes += res;
|
||||
bp += bytes;
|
||||
}
|
||||
tech_pvt->frame.datalen = bytes;
|
||||
|
||||
*frame = &tech_pvt->frame;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status wanchan_write_frame(switch_core_session *session, switch_frame *frame, int timeout, switch_io_flag flags)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
int res = 0;
|
||||
int bytes = frame->datalen;
|
||||
void *bp = frame->data;
|
||||
switch_status status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
while (bytes > 0) {
|
||||
switch_socket_waitfor(tech_pvt->socket, -1, POLLOUT | POLLERR | POLLHUP);
|
||||
res = sangoma_sendmsg_socket(
|
||||
tech_pvt->socket,
|
||||
&tech_pvt->hdrframe,
|
||||
sizeof(tech_pvt->hdrframe),
|
||||
bp,
|
||||
PACKET_LEN, 0);
|
||||
if (res < 0) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Write frame len %d write %d bytes returned %d errno %d!\n", frame->datalen, PACKET_LEN, res, errno);
|
||||
if (errno == EBUSY) {
|
||||
continue;
|
||||
}
|
||||
status = SWITCH_STATUS_GENERR;
|
||||
break;
|
||||
} else {
|
||||
bytes -= res;
|
||||
bp += res;
|
||||
res = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static const switch_io_routines wanchan_io_routines*/ {
|
||||
/*.outgoing_channel*/ wanchan_outgoing_channel,
|
||||
/*.answer_channel*/ wanchan_answer_channel,
|
||||
/*.read_frame*/ wanchan_read_frame,
|
||||
/*.write_frame*/ wanchan_write_frame
|
||||
};
|
||||
|
||||
static const switch_event_handler_table wanchan_event_handlers = {
|
||||
/*.on_init*/ wanchan_on_init,
|
||||
/*.on_ring*/ wanchan_on_ring,
|
||||
/*.on_execute*/ NULL,
|
||||
/*.on_hangup*/ wanchan_on_hangup,
|
||||
/*.on_loopback*/ wanchan_on_loopback,
|
||||
/*.on_transmit*/ wanchan_on_transmit
|
||||
};
|
||||
|
||||
static const switch_endpoint_interface wanchan_endpoint_interface = {
|
||||
/*.interface_name*/ "wanchan",
|
||||
/*.io_routines*/ &wanchan_io_routines,
|
||||
/*.event_handlers*/ &wanchan_event_handlers,
|
||||
/*.private*/ NULL,
|
||||
/*.next*/ NULL
|
||||
};
|
||||
|
||||
static const switch_loadable_module_interface wanchan_module_interface = {
|
||||
/*.module_name*/ modname,
|
||||
/*.endpoint_interface*/ &wanchan_endpoint_interface,
|
||||
/*.timer_interface*/ NULL,
|
||||
/*.dialplan_interface*/ NULL,
|
||||
/*.codec_interface*/ NULL,
|
||||
/*.application_interface*/ NULL
|
||||
};
|
||||
|
||||
Public switch_status switch_module_load(const switch_loadable_module_interface **interface) {
|
||||
|
||||
|
||||
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "OH OH no pool\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*interface = &wanchan_module_interface;
|
||||
|
||||
/* indicate that the module should continue to be loaded */
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Event Handlers */
|
||||
|
||||
static int on_info(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
|
||||
{
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "number is: %s\n", event->ring.callednum);
|
||||
if (strlen(event->ring.callednum) > 3) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "final number is: %s\n", event->ring.callednum);
|
||||
pri_answer(spri->pri, event->ring.call, 0, 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int on_hangup(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
|
||||
{
|
||||
struct channel_map *chanmap;
|
||||
switch_core_session *session;
|
||||
struct private_object *tech_pvt;
|
||||
|
||||
chanmap = spri->private;
|
||||
if ((session = chanmap->map[event->hangup.channel])) {
|
||||
switch_channel *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
tech_pvt->cause = event->hangup.cause;
|
||||
memcpy(&tech_pvt->hangup_event, event, sizeof(*event));
|
||||
|
||||
switch_channel_set_state(channel, CS_HANGUP);
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"-- Hanging up channel %d\n", event->hangup.channel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
|
||||
{
|
||||
char name[128];
|
||||
switch_core_session *session;
|
||||
switch_channel *channel;
|
||||
struct channel_map *chanmap;
|
||||
|
||||
|
||||
|
||||
chanmap = spri->private;
|
||||
if (chanmap->map[event->ring.channel]) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"--Duplicate Ring on channel %d (ignored)\n", event->ring.channel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"-- Ring on channel %d (from %s to %s)\n", event->ring.channel, event->ring.callingnum, event->ring.callednum);
|
||||
|
||||
sprintf(name, "w%dg%d", globals.span, event->ring.channel);
|
||||
if ((session = switch_core_session_request(&wanchan_endpoint_interface, NULL))) {
|
||||
struct private_object *tech_pvt;
|
||||
int fd;
|
||||
char ani2str[4] = "";
|
||||
//wanpipe_tdm_api_t tdm_api;
|
||||
|
||||
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object)))) {
|
||||
memset(tech_pvt, 0, sizeof(*tech_pvt));
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_core_session_set_private(session, tech_pvt);
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Hey where is my memory pool?\n");
|
||||
switch_core_session_destroy(&session);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (event->ring.ani2 >= 0) {
|
||||
snprintf(ani2str, 5, "%.2d", event->ring.ani2);
|
||||
}
|
||||
|
||||
if ((tech_pvt->caller_profile = switch_caller_profile_new(session,
|
||||
globals.dialplan,
|
||||
"wanchan fixme",
|
||||
event->ring.callingnum,
|
||||
event->ring.callingani,
|
||||
switch_strlen_zero(ani2str) ? NULL : ani2str,
|
||||
event->ring.callednum))) {
|
||||
switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
|
||||
}
|
||||
|
||||
switch_set_flag(tech_pvt, TFLAG_INBOUND);
|
||||
tech_pvt->spri = spri;
|
||||
tech_pvt->cause = -1;
|
||||
|
||||
memcpy(&tech_pvt->ring_event, event, sizeof(*event));
|
||||
|
||||
tech_pvt->callno = event->ring.channel;
|
||||
|
||||
if ((fd = sangoma_create_socket_intr(spri->span, event->ring.channel)) < 0) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n");
|
||||
}
|
||||
|
||||
//sangoma_tdm_set_hw_period(fd, &tdm_api, 480);
|
||||
|
||||
tech_pvt->socket = fd;
|
||||
chanmap->map[event->ring.channel] = session;
|
||||
|
||||
switch_channel_set_state(channel, CS_INIT);
|
||||
switch_core_session_thread_launch(session);
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Cannot Create new Inbound Channel!\n");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int check_flags(struct sangoma_pri *spri)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
|
||||
{
|
||||
int fd;
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"-- Restarting channel %d\n", event->restart.channel);
|
||||
|
||||
if ((fd = sangoma_create_socket_intr(spri->span, event->restart.channel)) < 0) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"Can't open fd!\n");
|
||||
} else {
|
||||
close(fd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int on_anything(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
|
||||
{
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,"Caught Event %d (%s)\n", event_type, sangoma_pri_event_str(event_type));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void *pri_thread_run(switch_thread *thread, void *obj)
|
||||
{
|
||||
struct sangoma_pri *spri = obj;
|
||||
struct channel_map chanmap;
|
||||
|
||||
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_ANY, on_anything);
|
||||
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RING, on_ring);
|
||||
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_HANGUP_REQ, on_hangup);
|
||||
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_INFO_RECEIVED, on_info);
|
||||
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RESTART, on_restart);
|
||||
|
||||
spri->on_loop = check_flags;
|
||||
spri->private = &chanmap;
|
||||
sangoma_run_pri(spri);
|
||||
|
||||
free(spri);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static int config_wanpipe(int reload)
|
||||
{
|
||||
switch_config cfg;
|
||||
char *var, *val;
|
||||
int count = 0;
|
||||
struct sangoma_pri *spri;
|
||||
char *cf = "wanchan.conf";
|
||||
|
||||
globals.bytes_per_frame = DEFAULT_BYTES_PER_FRAME;
|
||||
|
||||
if (!switch_config_open_file(&cfg, cf)) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "open of %s failed\n", cf);
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
||||
while (switch_config_next_pair(&cfg, &var, &val)) {
|
||||
if (!strcasecmp(cfg.category, "settings")) {
|
||||
if (!strcmp(var, "debug")) {
|
||||
globals.debug = atoi(val);
|
||||
} else if (!strcmp(var, "span")) {
|
||||
globals.span = atoi(val);
|
||||
} else if (!strcmp(var, "dchan")) {
|
||||
globals.dchan = atoi(val);
|
||||
} else if (!strcmp(var, "node")) {
|
||||
globals.node = str2node(val);
|
||||
} else if (!strcmp(var, "switch")) {
|
||||
globals.pswitch = str2switch(val);
|
||||
} else if (!strcmp(var, "bpf")) {
|
||||
globals.bytes_per_frame = atoi(val);
|
||||
} else if (!strcmp(var, "dialplan")) {
|
||||
set_global_dialplan(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch_config_close_file(&cfg);
|
||||
|
||||
if (!globals.dialplan) {
|
||||
set_global_dialplan("default");
|
||||
}
|
||||
|
||||
if ((spri=switch_core_alloc(module_pool, sizeof(*spri)))) {
|
||||
memset(spri, 0, sizeof(*spri));
|
||||
sangoma_init_pri(spri,
|
||||
globals.span,
|
||||
globals.dchan,
|
||||
23,
|
||||
globals.pswitch,
|
||||
globals.node,
|
||||
globals.debug);
|
||||
|
||||
pri_thread_run(NULL, spri);
|
||||
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "error!\n");
|
||||
}
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Public switch_status switch_module_runtime(void)
|
||||
{
|
||||
config_wanpipe(0);
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch.c -- Main
|
||||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
char *err = NULL;
|
||||
|
||||
if (switch_core_init() != SWITCH_STATUS_SUCCESS) {
|
||||
err = "Cannot Initilize\n";
|
||||
}
|
||||
|
||||
if (!err) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bringing up environment.\n");
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Loading Modules.\n");
|
||||
if (switch_loadable_module_init() != SWITCH_STATUS_SUCCESS) {
|
||||
err = "Cannot load modules";
|
||||
}
|
||||
}
|
||||
|
||||
if(err) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Error: %s", err);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "freeswitch Version %s Started\n\n", SWITCH_GLOBAL_VERSION);
|
||||
|
||||
/* wait for console input */
|
||||
switch_console_loop();
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Clean up modules.\n");
|
||||
loadable_module_shutdown();
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Tearing down environment.\n");
|
||||
switch_core_destroy();
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Exiting Now.\n");
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_buffer.c -- Data Buffering Code
|
||||
*
|
||||
*/
|
||||
#include <switch_buffer.h>
|
||||
|
||||
struct switch_buffer {
|
||||
unsigned char *data;
|
||||
size_t used;
|
||||
size_t datalen;
|
||||
};
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool *pool, switch_buffer **buffer, size_t max_len)
|
||||
{
|
||||
switch_buffer *new_buffer;
|
||||
|
||||
if ((new_buffer = switch_core_alloc(pool, sizeof(switch_buffer))) && (new_buffer->data = switch_core_alloc(pool, max_len))) {
|
||||
new_buffer->datalen = max_len;
|
||||
*buffer = new_buffer;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_len(switch_buffer *buffer)
|
||||
{
|
||||
|
||||
assert(buffer != NULL);
|
||||
|
||||
return (int)buffer->datalen;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_freespace(switch_buffer *buffer)
|
||||
{
|
||||
assert(buffer != NULL);
|
||||
|
||||
return (int)(buffer->datalen - buffer->used);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_inuse(switch_buffer *buffer)
|
||||
{
|
||||
assert(buffer != NULL);
|
||||
|
||||
return (int)buffer->used;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_toss(switch_buffer *buffer, size_t datalen)
|
||||
{
|
||||
size_t reading = 0;
|
||||
|
||||
assert(buffer != NULL);
|
||||
|
||||
if (buffer->used < 1) {
|
||||
buffer->used = 0;
|
||||
return 0;
|
||||
} else if (buffer->used >= datalen) {
|
||||
reading = datalen;
|
||||
} else {
|
||||
reading = buffer->used;
|
||||
}
|
||||
|
||||
memmove(buffer->data, buffer->data + reading, buffer->datalen - reading);
|
||||
buffer->used -= datalen;
|
||||
|
||||
return (int)buffer->datalen;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_read(switch_buffer *buffer, void *data, size_t datalen)
|
||||
{
|
||||
size_t reading = 0;
|
||||
|
||||
assert(buffer != NULL);
|
||||
assert(data != NULL);
|
||||
|
||||
|
||||
if (buffer->used < 1) {
|
||||
return 0;
|
||||
} else if (buffer->used >= datalen) {
|
||||
reading = datalen;
|
||||
} else {
|
||||
reading = buffer->used;
|
||||
}
|
||||
|
||||
memcpy(data, buffer->data, reading);
|
||||
memmove(buffer->data, buffer->data + reading, buffer->datalen - reading);
|
||||
buffer->used -= datalen;
|
||||
//printf("o %d = %d\n", reading, buffer->used);
|
||||
return (int)reading;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_buffer_write(switch_buffer *buffer, void *data, size_t datalen)
|
||||
{
|
||||
size_t freespace;
|
||||
|
||||
assert(buffer != NULL);
|
||||
assert(data != NULL);
|
||||
assert(buffer->data != NULL);
|
||||
|
||||
freespace = buffer->datalen - buffer->used;
|
||||
|
||||
if (freespace < datalen) {
|
||||
return 0;
|
||||
} else {
|
||||
memcpy(buffer->data + buffer->used, data, datalen);
|
||||
buffer->used += datalen;
|
||||
}
|
||||
//printf("i %d = %d\n", datalen, buffer->used);
|
||||
return (int)buffer->used;
|
||||
}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_caller.c -- Caller Identification
|
||||
*
|
||||
*/
|
||||
#include <switch_caller.h>
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_new(switch_core_session *session,
|
||||
char *dialplan,
|
||||
char *caller_id_name,
|
||||
char *caller_id_number,
|
||||
char *ani,
|
||||
char *ani2,
|
||||
char *destination_number)
|
||||
{
|
||||
|
||||
|
||||
switch_caller_profile *profile = NULL;
|
||||
|
||||
if ((profile = switch_core_session_alloc(session, sizeof(switch_caller_profile)))) {
|
||||
profile->dialplan = switch_core_session_strdup(session, dialplan);
|
||||
profile->caller_id_name = switch_core_session_strdup(session, caller_id_name);
|
||||
profile->caller_id_number = switch_core_session_strdup(session, caller_id_number);
|
||||
profile->ani = switch_core_session_strdup(session, ani);
|
||||
profile->ani2 = switch_core_session_strdup(session, ani2);
|
||||
profile->destination_number = switch_core_session_strdup(session, destination_number);
|
||||
}
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_clone(switch_core_session *session,
|
||||
switch_caller_profile *tocopy)
|
||||
{
|
||||
switch_caller_profile *profile = NULL;
|
||||
if ((profile = switch_core_session_alloc(session, sizeof(switch_caller_profile)))) {
|
||||
profile->dialplan = switch_core_session_strdup(session, tocopy->dialplan);
|
||||
profile->caller_id_name = switch_core_session_strdup(session, tocopy->caller_id_name);
|
||||
profile->ani = switch_core_session_strdup(session, tocopy->ani);
|
||||
profile->ani2 = switch_core_session_strdup(session, tocopy->ani2);
|
||||
profile->caller_id_number = switch_core_session_strdup(session, tocopy->caller_id_number);
|
||||
profile->destination_number = switch_core_session_strdup(session, tocopy->destination_number);
|
||||
}
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_caller_extension_new(switch_core_session *session,
|
||||
char *extension_name,
|
||||
char *extension_number
|
||||
)
|
||||
{
|
||||
switch_caller_extension *caller_extension = NULL;
|
||||
|
||||
if ((caller_extension = switch_core_session_alloc(session, sizeof(switch_caller_extension)))) {
|
||||
caller_extension->extension_name = switch_core_session_strdup(session, extension_name);
|
||||
caller_extension->extension_number = switch_core_session_strdup(session, extension_number);
|
||||
caller_extension->current_application = caller_extension->last_application = caller_extension->applications;
|
||||
}
|
||||
|
||||
return caller_extension;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session *session,
|
||||
switch_caller_extension *caller_extension,
|
||||
char *application_name,
|
||||
char *application_data)
|
||||
{
|
||||
switch_caller_application *caller_application = NULL;
|
||||
|
||||
assert(session != NULL);
|
||||
|
||||
if ((caller_application = switch_core_session_alloc(session, sizeof(switch_caller_application)))) {
|
||||
caller_application->application_name = switch_core_session_strdup(session, application_name);
|
||||
caller_application->application_data = switch_core_session_strdup(session, application_data);
|
||||
if (!caller_extension->applications) {
|
||||
caller_extension->applications = caller_application;
|
||||
} else if(caller_extension->last_application) {
|
||||
caller_extension->last_application->next = caller_application;
|
||||
}
|
||||
|
||||
caller_extension->last_application = caller_application;
|
||||
caller_extension->current_application = caller_extension->applications;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,438 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_channel.c -- Media Channel Interface
|
||||
*
|
||||
*/
|
||||
#include <switch_channel.h>
|
||||
|
||||
struct switch_channel {
|
||||
time_t initiated;
|
||||
char *name;
|
||||
switch_buffer *dtmf_buffer;
|
||||
switch_core_session *session;
|
||||
switch_channel_state state;
|
||||
switch_channel_flag flags;
|
||||
switch_caller_profile *caller_profile;
|
||||
switch_caller_profile *originator_caller_profile;
|
||||
switch_caller_extension *caller_extension;
|
||||
const struct switch_event_handler_table *event_handlers;
|
||||
switch_hash *variables;
|
||||
void *private;
|
||||
int freq;
|
||||
int bits;
|
||||
int channels;
|
||||
int ms;
|
||||
int kbps;
|
||||
};
|
||||
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel **channel, switch_memory_pool *pool)
|
||||
{
|
||||
assert(pool != NULL);
|
||||
|
||||
if (!((*channel) = switch_core_alloc(pool, sizeof(switch_channel)))) {
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
switch_core_hash_init(&(*channel)->variables, pool);
|
||||
switch_buffer_create(pool, &(*channel)->dtmf_buffer, 128);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode (switch_channel *channel, int freq, int bits, int channels, int ms, int kbps)
|
||||
{
|
||||
|
||||
assert(channel != NULL);
|
||||
|
||||
channel->freq = freq;
|
||||
channel->bits = bits;
|
||||
channel->channels = channels;
|
||||
channel->ms = ms;
|
||||
channel->kbps = kbps;
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode (switch_channel *channel, int *freq, int *bits, int *channels, int *ms, int *kbps)
|
||||
{
|
||||
if (freq) {
|
||||
*freq = channel->freq;
|
||||
}
|
||||
if (bits) {
|
||||
*bits = channel->bits;
|
||||
}
|
||||
if (channels) {
|
||||
*channels = channel->channels;
|
||||
}
|
||||
if (ms) {
|
||||
*ms = channel->ms;
|
||||
}
|
||||
if (kbps) {
|
||||
*kbps = channel->kbps;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_channel_has_dtmf(switch_channel *channel)
|
||||
{
|
||||
|
||||
assert(channel != NULL);
|
||||
return switch_buffer_inuse(channel->dtmf_buffer);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel, char *dtmf)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
|
||||
if (switch_buffer_inuse(channel->dtmf_buffer) + strlen(dtmf) > (size_t)switch_buffer_len(channel->dtmf_buffer)) {
|
||||
switch_buffer_toss(channel->dtmf_buffer, strlen(dtmf));
|
||||
}
|
||||
return switch_buffer_write(channel->dtmf_buffer, dtmf, strlen(dtmf));
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, size_t len)
|
||||
{
|
||||
int bytes;
|
||||
|
||||
assert(channel != NULL);
|
||||
if ((bytes = switch_buffer_read(channel->dtmf_buffer, dtmf, len)) > 0) {
|
||||
*(dtmf + bytes) = '\0';
|
||||
}
|
||||
return bytes;
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel *channel,
|
||||
switch_core_session *session,
|
||||
switch_channel_state state,
|
||||
switch_channel_flag flags)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->state = state;
|
||||
channel->flags = flags;
|
||||
channel->session = session;
|
||||
switch_channel_set_raw_mode(channel, 8000, 16, 1, 20, 8);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel *channel, char *varname)
|
||||
{
|
||||
return switch_core_hash_find(channel->variables, varname);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->private = private;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->private;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel *channel, char *name)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->name = NULL;
|
||||
if (name) {
|
||||
channel->name = switch_core_session_strdup(channel->session, name);
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->name;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel *channel, char *varname, char *value)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
switch_core_hash_delete(channel->variables, varname);
|
||||
|
||||
if (value) {
|
||||
switch_core_hash_insert(channel->variables, varname, switch_core_session_strdup(channel->session, value));
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_test_flag(switch_channel *channel, int flags)
|
||||
{
|
||||
return switch_test_flag(channel, flags);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_flag(switch_channel *channel, int flags)
|
||||
{
|
||||
switch_set_flag(channel, flags);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_clear_flag(switch_channel *channel, int flags)
|
||||
{
|
||||
switch_set_flag(channel, flags);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->state;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_set_state(switch_channel *channel, switch_channel_state state)
|
||||
{
|
||||
switch_channel_state last_state;
|
||||
int ok = 0;
|
||||
const char *state_names[] = {
|
||||
"CS_NEW",
|
||||
"CS_INIT",
|
||||
"CS_RING",
|
||||
"CS_TRANSMIT",
|
||||
"CS_EXECUTE",
|
||||
"CS_LOOPBACK",
|
||||
"CS_HANGUP",
|
||||
"CS_DONE"
|
||||
};
|
||||
|
||||
assert(channel != NULL);
|
||||
last_state = channel->state;
|
||||
|
||||
if (last_state == state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
/* STUB for more dev
|
||||
case CS_INIT:
|
||||
switch(state) {
|
||||
|
||||
case CS_NEW:
|
||||
case CS_INIT:
|
||||
case CS_LOOPBACK:
|
||||
case CS_TRANSMIT:
|
||||
case CS_RING:
|
||||
case CS_EXECUTE:
|
||||
case CS_HANGUP:
|
||||
case CS_DONE:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
*/
|
||||
|
||||
switch(last_state) {
|
||||
case CS_NEW:
|
||||
switch(state) {
|
||||
default:
|
||||
ok++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_INIT:
|
||||
switch(state) {
|
||||
case CS_LOOPBACK:
|
||||
case CS_TRANSMIT:
|
||||
case CS_RING:
|
||||
case CS_EXECUTE:
|
||||
case CS_HANGUP:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_LOOPBACK:
|
||||
switch(state) {
|
||||
case CS_TRANSMIT:
|
||||
case CS_RING:
|
||||
case CS_EXECUTE:
|
||||
case CS_HANGUP:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_TRANSMIT:
|
||||
switch(state) {
|
||||
case CS_LOOPBACK:
|
||||
case CS_RING:
|
||||
case CS_EXECUTE:
|
||||
case CS_HANGUP:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_RING:
|
||||
switch(state) {
|
||||
case CS_LOOPBACK:
|
||||
case CS_EXECUTE:
|
||||
case CS_HANGUP:
|
||||
case CS_TRANSMIT:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_EXECUTE:
|
||||
switch(state) {
|
||||
case CS_LOOPBACK:
|
||||
case CS_TRANSMIT:
|
||||
case CS_RING:
|
||||
case CS_HANGUP:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CS_HANGUP:
|
||||
switch(state) {
|
||||
case CS_DONE:
|
||||
ok++;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (ok) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s State Change %s -> %s\n", channel->name, state_names[last_state], state_names[state]);
|
||||
channel->state = state;
|
||||
pbx_core_session_signal_state_change(channel->session);
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s Invalid State Change %s -> %s\n", channel->name, state_names[last_state], state_names[state]);
|
||||
|
||||
//we won't tolerate an invalid state change so we can make sure we are as robust as a nice cup of dark coffee!
|
||||
if (channel->state < CS_HANGUP) {
|
||||
// not cool lets crash this bad boy and figure out wtf is going on
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
return channel->state;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->caller_profile = caller_profile;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_caller_profile(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->caller_profile;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->originator_caller_profile = caller_profile;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originator_caller_profile(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->originator_caller_profile;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_event_handlers(switch_channel *channel, const struct switch_event_handler_table *event_handlers)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->event_handlers = event_handlers;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const struct switch_event_handler_table *) switch_channel_get_event_handlers(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
return channel->event_handlers;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel *channel, switch_caller_extension *caller_extension)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
channel->caller_extension = caller_extension;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(switch_channel *channel)
|
||||
{
|
||||
|
||||
assert(channel != NULL);
|
||||
return channel->caller_extension;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
if (channel->state < CS_HANGUP) {
|
||||
channel->state = CS_HANGUP;
|
||||
pbx_core_session_signal_state_change(channel->session);
|
||||
}
|
||||
return channel->state;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_answer(switch_channel *channel)
|
||||
{
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
if (switch_core_session_answer_channel(channel->session) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_set_flag(channel, CF_ANSWERED);
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Answer!\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_config.c -- Configuration File Parser
|
||||
*
|
||||
*/
|
||||
#include <switch_config.h>
|
||||
|
||||
#ifndef SWITCH_CONF_DIR
|
||||
#ifdef WIN32
|
||||
#define SWITCH_CONF_DIR ".\\conf"
|
||||
#else
|
||||
#define SWITCH_CONF_DIR "/usr/local/freeswitch/conf"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config *cfg, char *file_path)
|
||||
{
|
||||
FILE *f;
|
||||
char *path = NULL;
|
||||
char path_buf[1024];
|
||||
|
||||
if (file_path[0] == '/') {
|
||||
path = file_path;
|
||||
} else {
|
||||
snprintf(path_buf, sizeof(path_buf), "%s/%s", SWITCH_CONF_DIR, file_path);
|
||||
path = path_buf;
|
||||
}
|
||||
|
||||
if (!path || !(f = fopen(path, "r"))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
memset(cfg, 0, sizeof(*cfg));
|
||||
cfg->file = f;
|
||||
cfg->path = path;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config *cfg)
|
||||
{
|
||||
|
||||
if (cfg->file) {
|
||||
fclose(cfg->file);
|
||||
}
|
||||
|
||||
memset(cfg, 0, sizeof(*cfg));
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config *cfg, char **var, char **val)
|
||||
{
|
||||
int ret = 0;
|
||||
char *p, *end;
|
||||
|
||||
*var = *val = NULL;
|
||||
|
||||
for(;;) {
|
||||
cfg->lineno++;
|
||||
|
||||
if (!fgets(cfg->buf, sizeof(cfg->buf), cfg->file)) {
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
*var = cfg->buf;
|
||||
|
||||
if (**var == '[' && (end = strchr(*var, ']'))) {
|
||||
*end = '\0';
|
||||
(*var)++;
|
||||
switch_copy_string(cfg->category, *var, sizeof(cfg->category));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (**var == '#' || **var == '\n' || **var == '\r') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((end = strchr(*var, '#'))) {
|
||||
*end = '\0';
|
||||
end--;
|
||||
} else if ((end = strchr(*var, '\n'))) {
|
||||
if (*end - 1 == '\r') {
|
||||
end--;
|
||||
}
|
||||
*end = '\0';
|
||||
}
|
||||
|
||||
p = *var;
|
||||
while ((*p == ' ' || *p == '\t') && p != end) {
|
||||
*p = '\0';
|
||||
p++;
|
||||
}
|
||||
*var = p;
|
||||
|
||||
if (!(*val = strchr(*var, '='))) {
|
||||
ret = -1;
|
||||
//log_printf(0, server.log, "Invalid syntax on %s: line %d\n", cfg->path, cfg->lineno);
|
||||
continue;
|
||||
} else {
|
||||
p = *val - 1;
|
||||
*(*val) = '\0';
|
||||
(*val)++;
|
||||
if (*(*val) == '>') {
|
||||
*(*val) = '\0';
|
||||
(*val)++;
|
||||
}
|
||||
|
||||
while ((*p == ' ' || *p == '\t') && p != *var) {
|
||||
*p = '\0';
|
||||
p--;
|
||||
}
|
||||
|
||||
p = *val;
|
||||
while ((*p == ' ' || *p == '\t') && p != end) {
|
||||
*p = '\0';
|
||||
p++;
|
||||
}
|
||||
*val = p;
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_console.c -- Simple Console
|
||||
*
|
||||
*/
|
||||
#include <switch_console.h>
|
||||
|
||||
static int switch_console_process(char *cmd)
|
||||
{
|
||||
#ifdef EMBED_PERL
|
||||
const char *perlhelp = "perl - execute some perl. (print to STDERR if you want to see it.)\n";
|
||||
#else
|
||||
const char *perlhelp = "";
|
||||
#endif
|
||||
if (!strcmp(cmd, "shutdown") || !strcmp(cmd, "...")) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bye!\n");
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(cmd, "help")) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,
|
||||
"\n"
|
||||
"Valid Commands:\n\n"
|
||||
"help - umm yeah..\n"
|
||||
"%sshutdown - stop the program\n\n",
|
||||
perlhelp
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef EMBED_PERL
|
||||
if (!strncmp(cmd, "perl ", 5)) {
|
||||
cmd += 5;
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Executing perl code [%s]\n", cmd);
|
||||
switch_core_do_perl(cmd);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Unknown Command: %s\n", cmd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line, char *fmt, ...)
|
||||
{
|
||||
char *data;
|
||||
int ret = 0;
|
||||
va_list ap;
|
||||
FILE *handle;
|
||||
char *filep = file, *p;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
handle = switch_core_data_channel(channel);
|
||||
|
||||
while((p = strchr(filep, '/'))) {
|
||||
filep = p + 1;
|
||||
}
|
||||
while((p = strchr(filep, '\\'))) {
|
||||
filep = p + 1;
|
||||
}
|
||||
|
||||
#ifdef vasprintf
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
data = (char *) malloc(2048);
|
||||
vsnprintf(data, 2048, fmt, ap);
|
||||
#endif
|
||||
va_end(ap);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "Memory Error\n");
|
||||
} else {
|
||||
char date[80] = "";
|
||||
|
||||
if (channel == SWITCH_CHANNEL_ID_CONSOLE_CLEAN) {
|
||||
fprintf(handle, "%s", data);
|
||||
} else {
|
||||
size_t retsize;
|
||||
switch_time_exp_t tm;
|
||||
switch_time_exp_lt(&tm, switch_time_now());
|
||||
switch_strftime(date, &retsize, sizeof(date), "%Y-%m-%d %T", &tm);
|
||||
fprintf(handle, "[%d] %s %s:%d %s() %s", (int)getpid(), date, filep, line, func, data);
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
fflush(handle);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_console_loop(void)
|
||||
{
|
||||
char hostname[256];
|
||||
char cmd[2048];
|
||||
int running = 1, x = 0, activity = 1;
|
||||
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
|
||||
|
||||
while (running) {
|
||||
if (activity) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "\nfreeswitch@%s> ", hostname);
|
||||
}
|
||||
//activity = switch_socket_waitfor(fileno(stdin), 100, POLLIN | POLLERR);
|
||||
|
||||
if (activity == 0) {
|
||||
fflush(stdout);
|
||||
switch_sleep(100);
|
||||
continue;
|
||||
}
|
||||
|
||||
memset(&cmd, 0, sizeof(cmd));
|
||||
for (x=0; sizeof(cmd) ;x++) {
|
||||
cmd[x] = getchar();
|
||||
if (cmd[x] == '\n') {
|
||||
cmd[x] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(cmd[0]) {
|
||||
running = switch_console_process(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,369 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_loadable_module.c -- Loadable Modules
|
||||
*
|
||||
*/
|
||||
#include <switch_console.h>
|
||||
|
||||
#ifndef SWITCH_MOD_DIR
|
||||
#ifdef WIN32
|
||||
#define SWITCH_MOD_DIR ".\\mod"
|
||||
#else
|
||||
#define SWITCH_MOD_DIR "/usr/local/freeswitch/mod"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct switch_loadable_module {
|
||||
char *filename;
|
||||
const switch_loadable_module_interface *interface;
|
||||
void *lib;
|
||||
switch_status (*switch_module_load) (switch_loadable_module_interface **);
|
||||
switch_status (*switch_module_reload) (void);
|
||||
switch_status (*switch_module_pause) (void);
|
||||
switch_status (*switch_module_resume) (void);
|
||||
switch_status (*switch_module_status) (void);
|
||||
switch_status (*switch_module_runtime) (void);
|
||||
switch_status (*switch_module_shutdown) (void);
|
||||
|
||||
};
|
||||
|
||||
struct switch_loadable_module_container {
|
||||
switch_hash *module_hash;
|
||||
switch_hash *endpoint_hash;
|
||||
switch_hash *codec_hash;
|
||||
switch_hash *dialplan_hash;
|
||||
switch_hash *timer_hash;
|
||||
switch_hash *application_hash;
|
||||
switch_memory_pool *pool;
|
||||
};
|
||||
|
||||
static struct switch_loadable_module_container loadable_modules;
|
||||
|
||||
|
||||
static void *switch_loadable_module_exec(switch_thread *thread, void *obj)
|
||||
{
|
||||
switch_status status = SWITCH_STATUS_SUCCESS;
|
||||
switch_loadable_module *module = obj;
|
||||
int restarts;
|
||||
|
||||
assert(module != NULL);
|
||||
|
||||
for (restarts = 0; status != SWITCH_STATUS_TERM; restarts++) {
|
||||
status = module->switch_module_runtime();
|
||||
}
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Thread ended for %s\n", module->interface->module_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static switch_status switch_loadable_module_load_file(char *filename, switch_memory_pool *pool, switch_loadable_module **new_module)
|
||||
{
|
||||
switch_loadable_module *module = NULL;
|
||||
apr_dso_handle_t *dso = NULL;
|
||||
apr_status_t status;
|
||||
apr_dso_handle_sym_t function_handle = NULL;
|
||||
switch_status (*load_func_ptr) (switch_loadable_module_interface **) = NULL;
|
||||
int loading = 1;
|
||||
const char *err = NULL;
|
||||
switch_loadable_module_interface *interface = NULL;
|
||||
char derr[512];
|
||||
|
||||
assert(filename != NULL);
|
||||
|
||||
*new_module = NULL;
|
||||
status = apr_dso_load(&dso, filename, pool);
|
||||
|
||||
while (loading) {
|
||||
if (status != APR_SUCCESS) {
|
||||
apr_dso_error(dso, derr, sizeof(derr));
|
||||
err = derr;
|
||||
break;
|
||||
}
|
||||
|
||||
status = apr_dso_sym(&function_handle, dso, "switch_module_load");
|
||||
load_func_ptr = function_handle;
|
||||
|
||||
if (load_func_ptr == NULL) {
|
||||
err = "Cannot Load";
|
||||
break;
|
||||
}
|
||||
|
||||
if (load_func_ptr(&interface) != SWITCH_STATUS_SUCCESS) {
|
||||
err = "Module load routine returned an error";
|
||||
interface = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (! (module = switch_core_permenant_alloc( sizeof(switch_loadable_module) ))) {
|
||||
err = "Could not allocate memory\n";
|
||||
break;
|
||||
}
|
||||
|
||||
loading = 0;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Error Loading module %s\n**%s**\n", filename, err);
|
||||
apr_dso_unload(dso);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
module->filename = switch_core_permenant_strdup(filename);
|
||||
module->interface = interface;
|
||||
module->switch_module_load = load_func_ptr;
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_reload")) == APR_SUCCESS) {
|
||||
module->switch_module_reload = function_handle;
|
||||
}
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_pause")) == APR_SUCCESS) {
|
||||
module->switch_module_pause = function_handle;
|
||||
}
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_resume")) == APR_SUCCESS) {
|
||||
module->switch_module_resume = function_handle;
|
||||
}
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_status")) == APR_SUCCESS) {
|
||||
module->switch_module_status = function_handle;
|
||||
}
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_shutdown")) == APR_SUCCESS) {
|
||||
module->switch_module_shutdown = function_handle;
|
||||
}
|
||||
|
||||
if ((status = apr_dso_sym(&function_handle, dso, "switch_module_runtime")) == APR_SUCCESS) {
|
||||
module->switch_module_runtime = function_handle;
|
||||
}
|
||||
|
||||
module->lib = dso;
|
||||
|
||||
if (module->switch_module_runtime) {
|
||||
switch_core_launch_module_thread(switch_loadable_module_exec, module);
|
||||
}
|
||||
|
||||
*new_module = module;
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Successfully Loaded [%s]\n", interface->module_name);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_loadable_module_init()
|
||||
{
|
||||
|
||||
char *file;
|
||||
size_t len;
|
||||
char *ptr;
|
||||
apr_finfo_t finfo;
|
||||
apr_dir_t *module_dir_handle;
|
||||
apr_int32_t finfo_flags = APR_FINFO_DIRENT|APR_FINFO_TYPE|APR_FINFO_NAME;
|
||||
switch_loadable_module *new_module;
|
||||
#ifdef WIN32
|
||||
const char *ext = ".dll";
|
||||
const char *EXT = ".DLL";
|
||||
#else
|
||||
const char *ext = ".so";
|
||||
const char *EXT = ".SO";
|
||||
#endif
|
||||
|
||||
memset(&loadable_modules, 0, sizeof(loadable_modules));
|
||||
switch_core_new_memory_pool(&loadable_modules.pool);
|
||||
|
||||
if (apr_dir_open(&module_dir_handle, SWITCH_MOD_DIR, loadable_modules.pool) != APR_SUCCESS) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open directory: %s\n", SWITCH_MOD_DIR);
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
switch_core_hash_init(&loadable_modules.module_hash, loadable_modules.pool);
|
||||
switch_core_hash_init(&loadable_modules.endpoint_hash, loadable_modules.pool);
|
||||
switch_core_hash_init(&loadable_modules.codec_hash, loadable_modules.pool);
|
||||
switch_core_hash_init(&loadable_modules.timer_hash, loadable_modules.pool);
|
||||
switch_core_hash_init(&loadable_modules.application_hash, loadable_modules.pool);
|
||||
switch_core_hash_init(&loadable_modules.dialplan_hash, loadable_modules.pool);
|
||||
|
||||
while (apr_dir_read(&finfo, finfo_flags, module_dir_handle) == APR_SUCCESS) {
|
||||
const char *fname = finfo.fname;
|
||||
|
||||
if (finfo.filetype != APR_REG) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!fname) {
|
||||
fname = finfo.name;
|
||||
}
|
||||
|
||||
if (!(ptr = (char *) fname)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strstr(fname, ext) && !strstr(fname, EXT)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
len = strlen(SWITCH_MOD_DIR) + strlen(fname) + 3;
|
||||
file = (char *) switch_core_alloc(loadable_modules.pool, len);
|
||||
snprintf(file, len, "%s/%s", SWITCH_MOD_DIR, fname);
|
||||
|
||||
if (switch_loadable_module_load_file(file, loadable_modules.pool, &new_module) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_core_hash_insert(loadable_modules.module_hash, (char *) fname, new_module);
|
||||
|
||||
if (new_module->interface->endpoint_interface) {
|
||||
const switch_endpoint_interface *ptr;
|
||||
for (ptr = new_module->interface->endpoint_interface; ptr; ptr = ptr->next) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding Endpoint '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.endpoint_hash,
|
||||
(char *) ptr->interface_name,
|
||||
(void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->codec_interface) {
|
||||
const switch_codec_implementation *impl;
|
||||
const switch_codec_interface *ptr;
|
||||
|
||||
for(ptr = new_module->interface->codec_interface; ptr; ptr = ptr->next) {
|
||||
for(impl = ptr->implementations; impl ; impl = impl->next) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE,
|
||||
"Adding Codec '%s' (%s) %dkhz %dms\n",
|
||||
ptr->iananame,
|
||||
ptr->interface_name,
|
||||
impl->samples_per_second,
|
||||
impl->microseconds_per_frame / 1000);
|
||||
}
|
||||
|
||||
switch_core_hash_insert(loadable_modules.codec_hash,
|
||||
(char *) ptr->iananame,
|
||||
(void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->dialplan_interface) {
|
||||
const switch_dialplan_interface *ptr;
|
||||
|
||||
for(ptr = new_module->interface->dialplan_interface; ptr; ptr = ptr->next) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding Dialplan '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.dialplan_hash,
|
||||
(char *) ptr->interface_name,
|
||||
(void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->timer_interface) {
|
||||
const switch_timer_interface *ptr;
|
||||
|
||||
for(ptr = new_module->interface->timer_interface; ptr; ptr = ptr->next) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding Timer '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.timer_hash,
|
||||
(char *) ptr->interface_name,
|
||||
(void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_module->interface->application_interface) {
|
||||
const switch_application_interface *ptr;
|
||||
|
||||
for(ptr = new_module->interface->application_interface; ptr; ptr = ptr->next) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Adding Application '%s'\n", ptr->interface_name);
|
||||
switch_core_hash_insert(loadable_modules.application_hash,
|
||||
(char *) ptr->interface_name,
|
||||
(void *) ptr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
apr_dir_close(module_dir_handle);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) loadable_module_shutdown(void)
|
||||
{
|
||||
apr_hash_index_t* hi;
|
||||
void *val;
|
||||
switch_loadable_module *module;
|
||||
|
||||
for (hi = apr_hash_first(loadable_modules.pool, loadable_modules.module_hash); hi; hi = apr_hash_next(hi)) {
|
||||
apr_hash_this(hi, NULL, NULL, &val);
|
||||
module = (switch_loadable_module *) val;
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Checking %s\t", module->interface->module_name);
|
||||
if (module->switch_module_shutdown) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "(yes)\n", module->interface->module_name);
|
||||
module->switch_module_shutdown();
|
||||
} else {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE_CLEAN, "(no)\n", module->interface->module_name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_endpoint_interface *) loadable_module_get_endpoint_interface(char *name)
|
||||
{
|
||||
return switch_core_hash_find(loadable_modules.endpoint_hash, name);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_codec_interface *) loadable_module_get_codec_interface(char *name)
|
||||
{
|
||||
return switch_core_hash_find(loadable_modules.codec_hash, name);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_dialplan_interface *) loadable_module_get_dialplan_interface(char *name)
|
||||
{
|
||||
return switch_core_hash_find(loadable_modules.dialplan_hash, name);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_timer_interface *) loadable_module_get_timer_interface(char *name)
|
||||
{
|
||||
return switch_core_hash_find(loadable_modules.timer_hash, name);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_application_interface *) loadable_module_get_application_interface(char *name)
|
||||
{
|
||||
return switch_core_hash_find(loadable_modules.application_hash, name);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) loadable_module_get_codecs(switch_memory_pool *pool, switch_codec_interface **array, int arraylen)
|
||||
{
|
||||
apr_hash_index_t* hi;
|
||||
void *val;
|
||||
int i = 0;
|
||||
|
||||
for (hi = apr_hash_first(pool, loadable_modules.codec_hash); hi; hi = apr_hash_next(hi)) {
|
||||
apr_hash_this(hi, NULL, NULL, &val);
|
||||
array[i++] = val;
|
||||
if (i > arraylen) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_mutex.c -- Mutex Locking
|
||||
*
|
||||
*/
|
||||
#include <switch_mutex.h>
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
|
||||
switch_lock_flag flags,
|
||||
switch_memory_pool *pool)
|
||||
{
|
||||
|
||||
return (apr_thread_mutex_create(lock, flags, pool) == APR_SUCCESS) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_destroy(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_destroy(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_lock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_lock(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_unlock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_unlock(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_mutex_trylock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_trylock(lock);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
*
|
||||
* switch_utils.c -- Compatability and Helper Code
|
||||
*
|
||||
*/
|
||||
#include <switch_utils.h>
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock, unsigned int flags, switch_memory_pool *pool)
|
||||
{
|
||||
switch_pollset_t *pollset;
|
||||
switch_status status;
|
||||
|
||||
|
||||
if ((status = switch_pollset_create(&pollset, 1, pool, flags)) != SWITCH_STATUS_SUCCESS) {
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
poll->desc_type = SWITCH_POLL_SOCKET;
|
||||
poll->reqevents = flags;
|
||||
poll->desc.s = sock;
|
||||
poll->client_data = sock;
|
||||
|
||||
return switch_pollset_add(pollset, poll);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms)
|
||||
{
|
||||
switch_status status;
|
||||
int nsds = 0;
|
||||
|
||||
if ((status = switch_poll(poll, 1, &nsds, ms)) != SWITCH_STATUS_SUCCESS) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return nsds;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_TIMEVAL_STRUCT
|
||||
#define ONE_MILLION 1000000
|
||||
/*
|
||||
* put timeval in a valid range. usec is 0..999999
|
||||
* negative values are not allowed and truncated.
|
||||
*/
|
||||
static struct timeval tvfix(struct timeval a)
|
||||
{
|
||||
if (a.tv_usec >= ONE_MILLION) {
|
||||
a.tv_sec += a.tv_usec % ONE_MILLION;
|
||||
a.tv_usec %= ONE_MILLION;
|
||||
} else if (a.tv_usec < 0) {
|
||||
a.tv_usec = 0;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
struct timeval switch_tvadd(struct timeval a, struct timeval b)
|
||||
{
|
||||
/* consistency checks to guarantee usec in 0..999999 */
|
||||
a = tvfix(a);
|
||||
b = tvfix(b);
|
||||
a.tv_sec += b.tv_sec;
|
||||
a.tv_usec += b.tv_usec;
|
||||
if (a.tv_usec >= ONE_MILLION) {
|
||||
a.tv_sec++;
|
||||
a.tv_usec -= ONE_MILLION;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
struct timeval switch_tvsub(struct timeval a, struct timeval b)
|
||||
{
|
||||
/* consistency checks to guarantee usec in 0..999999 */
|
||||
a = tvfix(a);
|
||||
b = tvfix(b);
|
||||
a.tv_sec -= b.tv_sec;
|
||||
a.tv_usec -= b.tv_usec;
|
||||
if (a.tv_usec < 0) {
|
||||
a.tv_sec-- ;
|
||||
a.tv_usec += ONE_MILLION;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
#undef ONE_MILLION
|
||||
#endif
|
Loading…
Reference in New Issue