File: getting_started.rst

package info (click to toggle)
linphone 5.3.105-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 57,048 kB
  • sloc: cpp: 166,867; ansic: 102,939; python: 8,280; java: 4,406; sh: 1,040; xml: 1,023; makefile: 777; perl: 377; objc: 190; php: 88; javascript: 38; cs: 38
file content (44 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Getting started
===============

Installing the Python module
----------------------------

You can install prebuilt packages of Linphone for Python. You will find the
releases at https://pypi.python.org/pypi/linphone. This includes only packages
for the Windows platform right now. The easiest way to install is to use pip,
eg.:

.. code-block:: none

   > pip install linphone --pre

You can also find nightly-built packages for Windows, Mac OS X and Linux at
https://www.linphone.org/snapshots/linphone-python/.

Otherwise you can compile the Python module. To do so get the build system code
using the command:

.. code-block:: none

   > git clone git://git.linphone.org/linphone-cmake-builder.git

Then follow the instructions in the *README.python* file.

Running some code
-----------------

Here is a sample source code using PyQt4 that enables you to register on a SIP
server in just a few lines of code. This is a very basic example, but it shows
how to create a linphone.Core object that is the main object of Linphone. From
there, you can use the API reference below to use more advanced feature and
perform some SIP calls, use text messaging and more...

.. literalinclude:: pyqt_linphone_example.py

In the Linphone Python module package you installed previously you will also
find some unit tests that you can run. These unit tests will be located in the
*site-packages/linphone/unittests/* directory of Python installation where you
installed the Linphone Python module package. To run these unit tests, follow
the instructions contained in the README.txt file of this *unittests/*
directory.