README 9.33 KB
Newer Older
1
This is SFLphone, release 0.7pre0cvs.
yanmorin's avatar
yanmorin committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Copyright (c) Savoir-faire Linux, Inc 2004-2006
  <sflphoneteam@savoirfairelinux.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 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

20 21


yanmorin's avatar
yanmorin committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
Introduction
------------

SFLPhone is a Voice-over-IP software phone. We want it to be:
- portable (it runs under GNU/Linux, Mac OS X, Win32)
- user friendly (fast, sleek, easy to learn interface)
- corporate grade (transfers, holds, perfect audio quality)
- fully compatible with Asterisk (SIP and IAX protocols)
- customizable (support for custom skins in the QT interface)

As the SIP/audio daemon and the user interface are separate processes,
it is easy to provide different user interfaces. SFLPhone comes with
a QT graphical user interface, an interactive command line interface,
and even scripts to control the daemon from the shell.

SFLPhone is actually used by the support team of Savoir-Faire Linux Inc.

More information is available on the project homepage:
  http://www.sflphone.org/


43

yanmorin's avatar
yanmorin committed
44 45 46 47 48 49 50 51 52 53 54 55 56
Getting the dependencies
------------------------

Required libraries and tools:
- ccRTP >= 1.3.4 (tested with ccrtp 1.4.1)
  and Common C++ 2 >= 1.3.20 (tested with commoncpp2 1.4.1)
    http://sourceforge.net/projects/gnutelephony/
- libeXosip2 >= 2.2.2 (tested with eXosip2 2.2.3)
  and libosip2 >= 2.2.1 (tested with libosip2-2.2.2)
    http://savannah.gnu.org/projects/exosip/
    http://savannah.gnu.org/projects/osip/
- libxml2, libxml2-devel, pkgconfig
    usually available in distribution repositories
yanmorin's avatar
yanmorin committed
57 58 59 60 61
- portaudio v19,  
    available on http://www.portaudio.com/
    http://portaudio.com/archives/pa_snapshot_v19.tar.gz
    or
    svn co https://www.portaudio.com/repos/portaudio/branches/v19-devel portaudio
yanmorin's avatar
yanmorin committed
62 63 64 65
	or 
	cd tools/ ./portaudio.sh
- autoconf

yanmorin's avatar
yanmorin committed
66 67 68 69 70
Optional libraries:
- zeroconf: (tested with mDNSResponder87)
    http://developer.apple.com/darwin/projects/bonjour/
- QT: required for the graphical user interface
    usually available in distribution repositories
71
- speex: codec for sound
yanmorin's avatar
yanmorin committed
72 73 74 75 76

Some of the required libraries may be downloaded from
  http://www.sflphone.org/#downloads
  or
  http://www.sflphone.org/dev/
77

yanmorin's avatar
yanmorin committed
78
See tools/config.sh for details
jpbl's avatar
jpbl committed
79

yanmorin's avatar
yanmorin committed
80 81
So in debian, you need:
apt-get install autoconf automake1.9 libtool libosip2-dev libexosip2-dev libccrtp-dev libcommoncpp2-dev pkg-config libqt3-mt-dev libsamplerate-dev libasound2-dev
yanmorin's avatar
yanmorin committed
82

83
For portaudio: libportaudio2 libportaudiocpp0 portaudio19-dev jackd
84 85 86 87 88

Building the dependencies
-------------------------

If you do not use either the development packages of your distribution or the source packages made by the upstream authors of dependencies, you may want to try our custom dependencies building script in tools/ directory:
89 90
Note that commoncpp, ccrtp, libosip and libexosip, samplerate are in debian and fedora.

91
1. cd tools/
92 93 94 95 96
2. ./portaudio.sh <-- compile portaudio
3. if you want to install other software, check inside the file config.sh
   edit config.sh to change the default prefix (/usr/local)
   ./download.sh
   ./install.sh
jpbl's avatar
jpbl committed
97
 
98
You can also compile each dependency, one by one:
jpbl's avatar
jpbl committed
99

yanmorin's avatar
yanmorin committed
100
1/	For commoncpp2
jpbl's avatar
jpbl committed
101 102 103 104
	./configure [option]
	make
	make install

yanmorin's avatar
yanmorin committed
105
2/	For ccrtp
jpbl's avatar
jpbl committed
106 107 108 109
	./configure [option]
	make
	make install

yanmorin's avatar
yanmorin committed
110
3/	For libosip2
jpbl's avatar
jpbl committed
111 112 113 114
	./configure [option]
	make
	make install

yanmorin's avatar
yanmorin committed
115 116 117 118 119
4/	For portaudio v19
	./configure --enable-cxx [option]
	make
	make install

120
	Note: if you install any package in /usr/local, don't forget to set pkg-config path with:
yanmorin's avatar
yanmorin committed
121
	export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
yanmorin's avatar
yanmorin committed
122

123

yanmorin's avatar
yanmorin committed
124 125 126 127 128 129 130 131 132 133
Preparing a CVS checkout of SFLPhone to be built
------------------------------------------------

Before building from a CVS checkout, the GNU autotools suite must be used
to generate the configure script and Makefiles. The current version
of SFLPhone has been tested with Automake 1.9 and Autoconf 2.59.

To do so, you may run the following script from the top directory:
  ./tools/autotoolize.sh

134 135


yanmorin's avatar
yanmorin committed
136 137
Building SFLPhone
-----------------
jpbl's avatar
jpbl committed
138

139
./configure
jpbl's avatar
jpbl committed
140 141 142 143
make
make install (as root) 


144

yanmorin's avatar
yanmorin committed
145 146
Using SFLPhone
--------------
jpbl's avatar
jpbl committed
147

148 149
If you have the sflphone 0.3 or 0.4 release, copy the file sflphonerc
to sflphonedrc:
yanmorin's avatar
yanmorin committed
150
  cp ~/.sflphone/sflphonerc ~/.sflphone/sflphonedrc
151 152
If you have an older version, remove your sflphonerc file located in
$HOME/.sflphone
jpbl's avatar
jpbl committed
153 154 155 156 157

1. Install a GUI like sflphone-qt

2. Lauch sflphone interface, a setup window appears. 

yanmorin's avatar
yanmorin committed
158 159
3. If you do have a SIP account, fill the SIP stuff where related. You can
   use STUN too.
jpbl's avatar
jpbl committed
160 161 162 163 164 165 166

4. Save your settings, restart it. You're done.

A user's guide will be available on:
http://www.sflphone.org/doc/


167

yanmorin's avatar
yanmorin committed
168
What if it does not build?
169 170
--------------------------

yanmorin's avatar
yanmorin committed
171
- Try using the same versions of the libraries as we do.
jpbl's avatar
jpbl committed
172 173
  See http://www.sflphone.org in section Downloads.

yanmorin's avatar
yanmorin committed
174 175 176 177 178 179
- Try using the same compilers as ours: gcc 4.1.0 on Fedora Linux Core 5
  is known to work.

- If you have dependencies installed in unusual directories, try setting
  the environment variable CXXFLAGS before building, for example:
  export CXXFLAGS="-I/opt/include"
jpbl's avatar
jpbl committed
180 181 182



yanmorin's avatar
yanmorin committed
183
How to enable IAX support?
184
--------------------------
yanmorin's avatar
yanmorin committed
185

186
Go inside libs directory and execute ./libiax2.sh script.
187 188
Then, run ./configure with --enable-iax2 option.

189

190 191 192 193 194 195 196
Debugging SFLPhone
------------------
You can use the --with-debug option with configure
./configure --with-debug
make
cd src
PATH=. ./gui/qt/sflphone-qt
yanmorin's avatar
yanmorin committed
197 198 199 200 201 202 203 204 205


Run-time troubleshooting
------------------------

- If errors occured when trying to load shared libraries, check that the
  value of the environment variable LD_LIBRARY_PATH include the
  directories containing the required libraries, eg:
  export LD_LIBRARY_PATH=/path/to/my/lib:${LD_LIBRARY_PATH}
206

jpbl's avatar
jpbl committed
207 208 209
- Portaudio don't detect your sound card because :
  * artsd is running
  * jackd is running 
yanmorin's avatar
yanmorin committed
210 211 212 213 214
    On 2005/11/22, jack wasn't working with these settings: 
    jackd -d alsa -r 8000
  * you use alsa with sflphone and another application, but dmixer isn't
    configurated correctly inside ~/.asoundrc or /etc/alsa/alsa.conf

jpbl's avatar
jpbl committed
215 216 217
- sflphone refuse to start because it's running
  You could have something like: "Exception: could not bind socket"
  Try to close sflphone before 
yanmorin's avatar
yanmorin committed
218
    echo "stop sflphone" | nc localhost 3999
jpbl's avatar
jpbl committed
219
  or
yanmorin's avatar
yanmorin committed
220 221 222
    killall sflphone


jpbl's avatar
jpbl committed
223
  
224
Short description of content of source tree
jpbl's avatar
jpbl committed
225 226 227 228 229
-------------------------------------------

- ringtones/ contains the different ringtones.
- stund/ is an implementation of the protocol STUN used when there is a NAT.
- utilspp/ allows to implement a singleton.
230 231 232 233
- src/ is the core of SFLphone. It contains the main.cpp, managerimpl.cpp
  files, audio and gui directories, and files about signalisation SIP. Later,
  it should be better, when IAX will be implemented, that a directory groups
  these protocols. 
jpbl's avatar
jpbl committed
234
  The ManagerImpl class is the intermediaire between all the layer in the tree.
235 236
- src/audio/ is the audio layer. It contains all about tones, dtmf,
  audiodriver, rtp layer, audio codec ulaw, alaw and gsm.
jpbl's avatar
jpbl committed
237 238
- src/audio/gsm/ contains the implementation of gsm audiocodec library.
- src/audio/pacpp/ implements PortAudioCpp, a native C++ binding of 
239
  PortAudio V19. (remove in sflphone 0.7)
240 241 242 243 244
- src/gui/ is the old directory that contains all about different user
  interface.
- src/gui/server is the directory that talk (tcp socket on port 3999) to
  sflphone client. The slfphone client can be a console program or a graphical
  interface.
jpbl's avatar
jpbl committed
245 246


yanmorin's avatar
yanmorin committed
247

jpbl's avatar
jpbl committed
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
How is structured SFLphone (>=0.5)
----------------------------------

		+------------+
		|TCPSessionIO|  
		+------------+
		       |
		+------------+
		| SessionIO  |  
		+------------+
		       |
		+------------+
		| GUI Server |  
		+------------+
  		       |		
		+---------------------------+	
		|      GUI Framework        |
		+---------------------------+
		             |
		+---------------------------+
		|        ManagerImpl        |  
		+---------------------------+
		             |
271 272 273 274
       		+---------------------------+
		|          Account          |
		+---------------------------+
                             |
jpbl's avatar
jpbl committed
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
		+---------------------------+
		|         VoIPLink          |
		+---------------------------+
		      |                |
		+-----------+       +-------+
		|    SIP    |       |  IAX  |
		|    RTP    |       +-------+
		|   STUN    |
		+-----------+

It's in ManagerImpl where we declared Call vector and VoIPLink vector.
VoIPLink vector contains all different VoIP link like SIP, IAX, ...
Call vector contains all the calls according to the kind of VoIP link.



yanmorin's avatar
yanmorin committed
291 292
About Savoir-Faire Linux
------------------------
jpbl's avatar
jpbl committed
293

yanmorin's avatar
yanmorin committed
294
Savoir-Faire Linux is a consulting company based in Montreal, Quebec.
295 296
For more information, please check out our website:
http://www.savoirfairelinux.com/
yanmorin's avatar
yanmorin committed
297 298 299 300 301 302 303 304 305 306



Contributing to SFLPhone
------------------------

Of course we love patches. And contributions. And spring rolls.

The project infrastructure (CVS, bugtracker, MLs) is maintained on: 
http://forge.novell.com/modules/xfmod/project/?sflphone
jpbl's avatar
jpbl committed
307

yanmorin's avatar
yanmorin committed
308 309
Do not hesitate to join us and post comments, suggestions, questions
and general feedback on the forge.novell mailing-list.
jpbl's avatar
jpbl committed
310

yanmorin's avatar
yanmorin committed
311
  -- The SFLPhone Team