Project

General

Profile

SipDeveloperGuide » History » Version 58

Adrian Georgescu, 03/31/2009 07:17 PM

1 1 Adrian Georgescu
= Developer guide =
2
3
[[TOC(WikiStart, Sip*, depth=2)]]
4
5 16 Adrian Georgescu
The main goal of this library is to provide a simple to use API to create real-time communications applications between end-points based on SIP protocol. 
6
7 41 Adrian Georgescu
== Prerequisites ==
8
9 50 Adrian Georgescu
To use the library and the concepts described below you must be familiar with Python programming language and SIP call flows from [http://www.tech-invite.com/Ti-sip-CF3665.html RFC 3665]. Understanding of TCP/IP networking in general and real time application development in particular are strongly recommended.
10 1 Adrian Georgescu
11 32 Adrian Georgescu
Instructions for installing the library are found [wiki:SipInstallation here].
12 31 Adrian Georgescu
13 11 Adrian Georgescu
== Middleware ==
14 1 Adrian Georgescu
15 58 Adrian Georgescu
To develop your application you should use the middleware API that is event-driven, non-blocking and hides the complexity and the interactions of the lower level SIP, SDP, RTP, ICE, MSRP, XCAP and related protocols. 
16
With a minimal amount of coding you can create a rich client application for setting up audio, instant messaging, file transfer and desktop sharing sessions.
17 1 Adrian Georgescu
18 42 Adrian Georgescu
 * [wiki:SipMiddlewareApi Middleware API] - event driven middleware suitable for developing interactive user interfaces (e.g. GUI)
19 56 Adrian Georgescu
 * [wiki:SipSettingsAPI Configuration API] - used for managing the settings used by the middleware
20 24 Adrian Georgescu
21 38 Adrian Georgescu
=== Sample code ===
22
23 24 Adrian Georgescu
The middleware API is used by the command line tools used for [wiki:SipTesting testing the library].
24 1 Adrian Georgescu
25 11 Adrian Georgescu
== Components ==
26 1 Adrian Georgescu
27 50 Adrian Georgescu
If you wish to develop your own middleware and/or application while having control over the underlying protocol layers yourself, you can use the following APIs that provides granular control over their respective components:
28 1 Adrian Georgescu
29 36 Adrian Georgescu
 * [wiki:SipCoreApiDocumentation SIP core API] - The API for the SIP, SDP, RTP, ICE and audio engine (cross platform sound-card abstraction, codecs)
30 1 Adrian Georgescu
 * [wiki:SipMSRPApi MSRP API]  - The API for Message Session Relay Protocol (MSRP) and its relay extension used for instant messaging, file transfers and desktop sharing applications
31
 * [wiki:SipPresenceApi Presence API]  - The API for payloads carried within SIP signaling used for publication, subscription and notifications of SIP events
32 35 Adrian Georgescu
 * [wiki:SipXCAPApi XCAP API]  - The API for XCAP document manipulation used for storage of buddy lists and presence policy documents
33 42 Adrian Georgescu
34 50 Adrian Georgescu
You may use for example the above components API to create a SIP application server, something the high level middleware was not designed for.
35 43 Adrian Georgescu
36 53 Adrian Georgescu
== TCP/IP ports ==
37 43 Adrian Georgescu
38
To use a SIP application you need access to a TCP/IP network (e.g. the Internet). The library uses the following ports when active:
39
40
|| '''Local port''' || '''Direction''' || '''Remote port''' || '''Protocol''' || '''Description''' || '''Allocation''' || '''Setting''' ||
41 54 Adrian Georgescu
|| 1xport >1024 || In/Out || Typically 5060 set in DNS|| UDP || [wiki:SipCoreApiDocumentation#Engine SIP over UDP] || At start || Global.sip.local_udp_port ||
42
|| 1xport >1024 || In/Out || Typically 5060 set in DNS ||TCP || [wiki:SipCoreApiDocumentation#Engine SIP over TCP] || At start ||Global.sip.local_tcp_port ||
43
|| 1xport >1024 || In/Out || Typically 5061  set in DNS ||TCP|| [wiki:SipCoreApiDocumentation#Engine SIP over TLS] || At start || Global.sip.local_tls_port ||
44
|| 2xport >1024 || In/Out || Random negotiated in SDP || UDP || [wiki:SipCoreApiDocumentation#RTPTransport RTP/RTCP stream] || Per session || Global.rtp.port_range ||
45
|| 1xport >1024 || In/Out || Typically 2855 negotiated in SDP || TCP || [wiki:SipMSRPApi#transport.MSRPTransport MSRP stream] || Per session || Global.msrp.local_port ||
46 57 Adrian Georgescu
|| 1xport >1024 || Out || Typically 443, configured || TCP || [wiki:SipXCAPApi XCAP requests] || Per request|| ||