SipDeveloperGuide

Version 74 (Adrian Georgescu, 01/01/2010 11:30 pm)

1 61 Adrian Georgescu
= Developer Guide =
2 1 Adrian Georgescu
3 1 Adrian Georgescu
[[TOC(WikiStart, Sip*, depth=2)]]
4 1 Adrian Georgescu
5 73 Adrian Georgescu
The goal of SIP SIMPLE client SDK is to provide a simple to use API to create Real Time Communications Applications for Internet end-points based on SIP and related protocols.
6 1 Adrian Georgescu
7 73 Adrian Georgescu
By using this API you can add Audio, Instant Messaging, File Transfer capabilities to and existing product or create a new product from scratch.
8 73 Adrian Georgescu
9 41 Adrian Georgescu
== Prerequisites ==
10 41 Adrian Georgescu
11 72 Adrian Georgescu
To use SIP SIMPLE client SDK and the concepts described below you must be familiar with Python programming language and basic 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.
12 1 Adrian Georgescu
13 66 Adrian Georgescu
Detailed instructions for installing the library are found [wiki:SipInstallation here].
14 11 Adrian Georgescu
15 1 Adrian Georgescu
== Middleware ==
16 1 Adrian Georgescu
17 73 Adrian Georgescu
To develop your SIP Application you should use the event-driven non-blocking Middleware API that hides the complexity and the interactions of the lower level SIP, SDP, RTP, ICE, MSRP, XCAP and related protocols.  With a minimal amount of coding you can create a rich client SIP Application for setting up Audio, Instant Messaging, File Transfer and Desktop Sharing sessions.
18 1 Adrian Georgescu
19 67 Adrian Georgescu
 * [wiki:SipMiddlewareApi Middleware API] - middleware for developing of SIP Client Applications
20 1 Adrian Georgescu
 * [wiki:SipConfigurationAPI Configuration API] - used for managing the settings used by the Middleware
21 1 Adrian Georgescu
22 72 Adrian Georgescu
The middleware is used by the [wiki:SipTesting Command Line Tools], they provide detailed practical examples for how to use all functions available in the SDK. 
23 72 Adrian Georgescu
24 64 Adrian Georgescu
=== Sample Code ===
25 38 Adrian Georgescu
26 74 Adrian Georgescu
 * ''Command Line Tools'' are the best example for how to use the SIP SIMPLE client SDK.
27 74 Adrian Georgescu
 * [http://icanblink.com Blink], a fully featured and easy to use SIP client.
28 74 Adrian Georgescu
29 1 Adrian Georgescu
30 50 Adrian Georgescu
=== Components ===
31 1 Adrian Georgescu
32 67 Adrian Georgescu
If you wish to develop your own middleware or applications while having full control over the underlying protocol layers yourself, you can use the following APIs that provide granular control over their respective components:
33 1 Adrian Georgescu
34 65 Adrian Georgescu
 * [wiki:SipPresenceApi Presence API]  - The API for payloads carried within SIP signaling used for publication, subscription and notifications of SIP events
35 70 Adrian Georgescu
 * [wiki:SipCoreApiDocumentation SIP Core API] - The API for the SIP, RTP, ICE and Audio Engine including cross platform audio-device abstraction, codecs and jitter buffer
36 70 Adrian Georgescu
 * [wiki:SipMSRPApi MSRP API]  - The API for Message Session Relay Protocol (MSRP) and its Relay Extension
37 70 Adrian Georgescu
 * [wiki:SipXCAPApi XCAP API]  - The API for presence policy documents on XCAP servers
38 69 Adrian Georgescu
39 1 Adrian Georgescu
You may use for example the above components API to create SIP Server Applications, something the high level middleware was not designed for.
40 43 Adrian Georgescu
41 65 Adrian Georgescu
== Network ==
42 1 Adrian Georgescu
43 72 Adrian Georgescu
To use a SIP Application you need access to the Internet. The following ports are being used:
44 43 Adrian Georgescu
45 43 Adrian Georgescu
|| '''Local port''' || '''Direction''' || '''Remote port''' || '''Protocol''' || '''Description''' || '''Allocation''' || '''Setting''' ||
46 64 Adrian Georgescu
|| 1xport >1024 || In/Out || Typically 5060 set in DNS|| UDP || [wiki:SipCoreApiDocumentation#Engine SIP over UDP] || At start || Global.sip.udp_port ||
47 64 Adrian Georgescu
|| 1xport >1024 || In/Out || Typically 5060 set in DNS ||TCP || [wiki:SipCoreApiDocumentation#Engine SIP over TCP] || At start ||Global.sip.tcp_port ||
48 64 Adrian Georgescu
|| 1xport >1024 || In/Out || Typically 5061  set in DNS ||TCP|| [wiki:SipCoreApiDocumentation#Engine SIP over TLS] || At start || Global.sip.tls_port ||
49 54 Adrian Georgescu
|| 2xport >1024 || In/Out || Random negotiated in SDP || UDP || [wiki:SipCoreApiDocumentation#RTPTransport RTP/RTCP stream] || Per session || Global.rtp.port_range ||
50 54 Adrian Georgescu
|| 1xport >1024 || In/Out || Typically 2855 negotiated in SDP || TCP || [wiki:SipMSRPApi#transport.MSRPTransport MSRP stream] || Per session || Global.msrp.local_port ||
51 57 Adrian Georgescu
|| 1xport >1024 || Out || Typically 443, configured || TCP || [wiki:SipXCAPApi XCAP requests] || Per request|| ||