提交 36f1cd49 authored 作者: Giovanni Maruzzelli's avatar Giovanni Maruzzelli

skypiax: finishing off renaming to mod_skypopen

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16991 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 df18a0d4
......@@ -3,7 +3,7 @@ Skypopen, Skype Endpoint and Trunk
All documentation on compiling, using, configuring,
tricks and tweaks, possible problems at:
http://wiki.freeswitch.org/wiki/Skypiax_Skype_Endpoint_and_Trunk
http://wiki.freeswitch.org/wiki/Mod_skypopen_Skype_Endpoint_and_Trunk
< gmaruzz at gmail dot com >
#start the fake X server on a given port
/usr/bin/Xvfb :121 -ac &
sleep 3
# start a Skype client instance that will connect to the X server above, and will login to the Skype network using the 'username password' you send to it on stdin. Here xxxx would be the password and skypiax2 the username
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:121 /usr/bin/skype --dbpath=/root/multi/skypiax121 --pipelogin &"
sleep 7
/usr/bin/Xvfb :122 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:122 /usr/bin/skype --dbpath=/root/multi/skypiax122 --pipelogin &"
sleep 7
#################################################################
# Following X server Skype client instances are commented out
#################################################################
/usr/bin/Xvfb :123 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:123 /usr/bin/skype --dbpath=/root/multi/skypiax123 --pipelogin &"
sleep 7
/usr/bin/Xvfb :124 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:124 /usr/bin/skype --dbpath=/root/multi/skypiax124 --pipelogin &"
sleep 7
/usr/bin/Xvfb :125 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:125 /usr/bin/skype --dbpath=/root/multi/skypiax125 --pipelogin &"
sleep 7
/usr/bin/Xvfb :126 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:126 /usr/bin/skype --dbpath=/root/multi/skypiax126 --pipelogin &"
sleep 7
/usr/bin/Xvfb :127 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:127 /usr/bin/skype --dbpath=/root/multi/skypiax127 --pipelogin &"
sleep 7
/usr/bin/Xvfb :128 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:128 /usr/bin/skype --dbpath=/root/multi/skypiax128 --pipelogin &"
sleep 7
/usr/bin/Xvfb :129 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:129 /usr/bin/skype --dbpath=/root/multi/skypiax129 --pipelogin &"
sleep 7
/usr/bin/Xvfb :130 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:130 /usr/bin/skype --dbpath=/root/multi/skypiax130 --pipelogin &"
sleep 7
exit 0
/usr/bin/Xvfb :131 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:131 /usr/bin/skype --dbpath=/root/multi/skypiax131 --pipelogin &"
sleep 7
/usr/bin/Xvfb :132 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:132 /usr/bin/skype --dbpath=/root/multi/skypiax132 --pipelogin &"
sleep 7
/usr/bin/Xvfb :133 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:133 /usr/bin/skype --dbpath=/root/multi/skypiax133 --pipelogin &"
sleep 7
/usr/bin/Xvfb :134 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:134 /usr/bin/skype --dbpath=/root/multi/skypiax134 --pipelogin &"
sleep 7
/usr/bin/Xvfb :135 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:135 /usr/bin/skype --dbpath=/root/multi/skypiax135 --pipelogin &"
sleep 7
/usr/bin/Xvfb :136 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:136 /usr/bin/skype --dbpath=/root/multi/skypiax136 --pipelogin &"
sleep 7
/usr/bin/Xvfb :137 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:137 /usr/bin/skype --dbpath=/root/multi/skypiax137 --pipelogin &"
sleep 7
/usr/bin/Xvfb :138 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:138 /usr/bin/skype --dbpath=/root/multi/skypiax138 --pipelogin &"
sleep 7
/usr/bin/Xvfb :139 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:139 /usr/bin/skype --dbpath=/root/multi/skypiax139 --pipelogin &"
sleep 7
/usr/bin/Xvfb :140 -ac &
sleep 3
su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:140 /usr/bin/skype --dbpath=/root/multi/skypiax140 --pipelogin &"
sleep 7
#using linux-2.6.24.7.tar.bz2 from kernel.org
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.7.tar.bz2
tar xjf linux-2.6.24.7.tar.bz2
cd linux-2.6.24.7
make mrproper
cp ../config-linux-2.6.24.7-skypiax08D01 .config
cp ../dummy.c.skypiax sound/drivers/dummy.c #optional step, halves the load
make
make install
make modules_install
make install
#enjoy
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_skypopen
mod_LTLIBRARIES = mod_skypopen.la
mod_skypopen_la_SOURCES = mod_skypopen.c skypopen_protocol.c
mod_skypopen_la_CFLAGS = $(AM_CFLAGS) -DSKYPOPEN_SVN_VERSION=\"`cat $(switch_builddir)/.version`\" -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
mod_skypopen_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_skypopen_la_LDFLAGS = -L../../../../libs/spandsp/src -avoid-version -module -no-undefined -shared -lX11 -lspandsp
Skypopen, Skype Endpoint and Trunk
All documentation on compiling, using, configuring,
tricks and tweaks, possible problems at:
http://wiki.freeswitch.org/wiki/Skypiax_Skype_Endpoint_and_Trunk
< gmaruzz at gmail dot com >
#
# Asterisk -- A telephony toolkit for Linux.
#
# Makefile for channel drivers
#
# Copyright (C) 1999-2005, Mark Spencer
#
# Mark Spencer <markster@digium.com>
#
# Edited By Belgarath <> Aug 28 2004
# Added bare bones ultrasparc-linux support.
#
# This program is free software, distributed under the terms of
# the GNU General Public License
#
#ASTERISK INCLUDE FILES
#The directory that contains the Asterisk include files (eg: /usr/include or /usr/include/asterisk or /usr/src/asterisk/include or ...)
#AST_INCLUDE_DIR=/usr/src/asterisk/include
#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_trunk/include
#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_160/include
#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_12/include
#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_14/include
#AST_INCLUDE_DIR=/home/maruzz/devel/svn_celliax_trunk/asterisk-1.2.rev137401/include
AST_INCLUDE_DIR=/home/user/devel/asterisk-1.4.23.1/include
#ASTERISK
CFLAGS+=-DASTERISK
#ASTERISK VERSION
#Uncomment one of the following lines to match your Asterisk series
CFLAGS+=-DASTERISK_VERSION_1_4
#CFLAGS+=-DASTERISK_VERSION_1_6
#CFLAGS+=-DASTERISK_VERSION_1_2
#LINUX SKYPE SUPPORT (Celliax for Cygwin always supports Skype)
SKYPE_LIB=-L/usr/X11R6/lib -lX11
CFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
CFLAGS+=-g3
CFLAGS+=-I$(AST_INCLUDE_DIR) -I.
CFLAGS+=-D_REENTRANT -D_GNU_SOURCE
#CFLAGS+=-O6
CFLAGS+=-march=i686
CFLAGS+=-fomit-frame-pointer
ifeq ($(shell uname -m),x86_64)
CFLAGS+=-fPIC
endif
SVNDEF := -D'SKYPIAX_SVN_VERSION="$(shell svnversion -n ..)"'
CFLAGS += $(SVNDEF)
SOLINK=-shared -Xlinker -x
CHANNEL_LIBS=chan_skypiax.so
CC=gcc
OSARCH=$(shell uname -s)
ifeq ($(findstring CYGWIN,$(OSARCH)),CYGWIN)
# definition of pthread_kill as a printf (or as a noop) is required for Asterisk (and skypiax) to run on Cygwin
# without it, each time (often) pthread_kill is called (by any thread, with any signal, URG included), bad things happen
CC=gcc -D pthread_kill=cyg_no_pthreadkill
AST_DLL_DIR=/home/maruzz/devel/svn_asterisk_branches_12
CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols cyg_no_pthread_kill.o
CYGSOLIB=-L/usr/lib/w32api -lrpcrt4 -L/lib/mingw -lwinmm -L$(AST_DLL_DIR) -lasterisk.dll -L$(AST_DLL_DIR)/res -lres_features.so
SKYPE_LIB=
CHANNEL_LIBS=cyg_no_pthread_kill.o chan_skypiax.so
endif
all: $(CHANNEL_LIBS)
clean:
rm -f *.so *.o *.so.a
#chan_skypiax section begins
#to debug threads and lock on 1.4 uncomment the following
#CFLAGS+=-include /usr/src/asterisk/include/asterisk/autoconfig.h
cyg_no_pthread_kill.o: cyg_no_pthread_kill.c
$(CC) $(CFLAGS) -c -o cyg_no_pthread_kill.o cyg_no_pthread_kill.c
chan_skypiax.o: chan_skypiax.c
$(CC) $(CFLAGS) -c -o chan_skypiax.o chan_skypiax.c
chan_skypiax.so: chan_skypiax.o skypiax_protocol.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_skypiax.o skypiax_protocol.o -lm -ldl $(SKYPE_LIB) ${CYGSOLIB}
#chan_skypiax section ends
#include <stdio.h>
#define PRINTMSGCYG
extern int option_debug;
int cyg_no_pthreadkill(int thread, int sig);
int cyg_no_pthreadkill(int thread, int sig)
{
#ifdef PRINTMSGCYG
if (option_debug) {
printf
("\n\nHere there would have been a pthread_kill() on thread [%-7lx], with sig=%d, but it has been substituted by this printf in file cyg_no_pthread_kill.c because CYGWIN does not support sending a signal to a one only thread :-(\n\n",
(unsigned long int) thread, sig);
}
#endif // PRINTMSGCYG
return 0;
}
;;;;;;;;
;;;;;;;;
;;;;;;; Skypiax Asterisk Driver
;;;;;;;
;;;;;;; Configuration file
;;;;;;; lines beginning with semicolon (" are ignored (commented out)
;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;
;;;;;;; The first interface (named skypeclient)
;;;;;;[skypeclient]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; general settings, valid on all platforms
;;;;;;;
;;;;;;;
;;;;;;; Default language
;;;;;;;
;;;;;;language=en
;;;;;;;
;;;;;;; Default context (in extensions.conf, can be overridden with @context syntax)
;;;;;;;
;;;;;;context=default
;;;;;;;
;;;;;;; Default extension (in extensions.conf) where incoming calls land
;;;;;;;
;;;;;;extension=s
;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Debugging settings, valid globally for all interfaces on all platforms
;;;;;;;
;;;;;;; the debug values are global for all the interfaces.
;;;;;;;
;;;;;;; default is no skypiax debugging output, you **have** to activate debugging here to obtain debugging from skypiax
;;;;;;;
;;;;;;; To see the debugging output you have to "set debug 100" from the Asterisk CLI or launch
;;;;;;; Asterisk with -ddddddddddd option, and have the logger.conf file activating debug info for console and messages
;;;;;;;
;;;;;;; You can activate each of the following separately, but you can't disactivate. Eg: debug_at=no does not subtract debug_at from debug_all
;;;;;;; debug_all activate all possible debugging info
;;;;;;;
;;;;;;;debug_all=yes
;;;;;;debug_skype=yes
;;;;;;debug_pbx=yes
;;;;;;;debug_sound=yes
;;;;;;;debug_locks=yes
;;;;;;;debug_monitorlocks=yes
;;;;;;
;;;;;;skype=yes ; legacy setting, leave it to yes
;;;;;;X11_display=:101
;;;;;;tcp_cli_port=11234
;;;;;;tcp_srv_port=11235
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; audio boost settings, valid for all platforms, to compensate for different input/output audio signal levels
;;;;;;; tweak it if you get horrible (or not hearable) sound
;;;;;;;
;;;;;;;boost can be positive or negative (-40 to +40) in db
;;;;;;;experiment to find which values are best for your computer
;;;;;;playback_boost=0 ;
;;;;;;capture_boost=0 ;
;;;;;;
;;; [skypiax1]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:101
;;; tcp_cli_port=15576
;;; tcp_srv_port=15577
;;; skype_user=skypiax1
;;;
;;; [skypiax2]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:102
;;; tcp_cli_port=15578
;;; tcp_srv_port=15579
;;; skype_user=skypiax2
;;;
;;; [skypiax3]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:103
;;; tcp_cli_port=15580
;;; tcp_srv_port=15581
;;; skype_user=skypiax3
;;;
[skypiax4]
language=en
context=default
extension=s
debug_skype=yes
debug_pbx=yes
skype=yes ; legacy setting, leave it to yes
playback_boost=0 ;
capture_boost=0 ;
X11_display=:104
tcp_cli_port=15582
tcp_srv_port=15583
skype_user=skypiax4
[skypiax5]
language=en
context=default
extension=s
debug_skype=yes
debug_pbx=yes
skype=yes ; legacy setting, leave it to yes
playback_boost=0 ;
capture_boost=0 ;
X11_display=:105
tcp_cli_port=15584
tcp_srv_port=15585
skype_user=skypiax5
[skypiax6]
language=en
context=default
extension=s
debug_skype=yes
debug_pbx=yes
skype=yes ; legacy setting, leave it to yes
playback_boost=0 ;
capture_boost=0 ;
X11_display=:106
tcp_cli_port=15586
tcp_srv_port=16586
skype_user=skypiax6
;;; [skypiax17]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:117
;;; tcp_cli_port=15587
;;; tcp_srv_port=15588
;;; skype_user=skypiax17
;;;
;;; [skypiax18]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:118
;;; tcp_cli_port=15589
;;; tcp_srv_port=15590
;;; skype_user=skypiax18
;;;
;;; [skypiax19]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:119
;;; tcp_cli_port=15591
;;; tcp_srv_port=15592
;;; skype_user=skypiax19
;;;
;;; [skypiax20]
;;; language=en
;;; context=default
;;; extension=s
;;; debug_skype=yes
;;; debug_pbx=yes
;;; skype=yes ; legacy setting, leave it to yes
;;; playback_boost=0 ;
;;; capture_boost=0 ;
;;; X11_display=:120
;;; tcp_cli_port=15593
;;; tcp_srv_port=15594
;;; skype_user=skypiax20
;;;
;;;
;;;
REM would you believe there is no sleep() in standard windows batchfiles?
@ping 127.0.0.1 -n 2 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论