SipDeveloperGuide

Version 80 (Adrian Georgescu, 03/14/2010 01:06 pm) → Version 81/215 (Adrian Georgescu, 03/14/2010 01:06 pm)

= Developer Guide =

[[TOC(WikiStart, Sip*, depth=2)]]

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.

By using this API you can add Audio, Instant Messaging, File Transfer capabilities to and existing product or create a new product from scratch.

== Prerequisites ==

To use SIP SIMPLE client SDK and the concepts described below you must be familiar with Python programming language and have basic [http://www.tech-invite.com/Ti-sip-ex3261.html SIP knowledge]. Understanding of TCP/IP networking in general and real time application development in particular are strongly recommended.

Detailed instructions for installing the SDK are found [wiki:SipInstallation here].

== Middleware ==

To develop your SIP client Application you should use the Middleware API that hides the complexity and the interactions of the low level SIP, SDP, RTP, ICE, MSRP, XCAP protocols. With a minimal amount of coding you can create a rich client for setting up Audio, Instant Messaging, File Transfer and Desktop Sharing sessions.

* [wiki:SipMiddlewareApi Middleware API] - middleware for developing of SIP Client Applications
* [wiki:SipConfigurationAPI Configuration API] - used for managing the settings used by the Middleware

=== Sample Code ===

* [wiki:SipTesting Command Line Tools] provide detailed practical examples for how to use all functions available in the SDK
* SIP SIMPLE client SDK is used by [http://icanblink.com Blink], a fully featured and easy to use SIP client or MacOSX

=== Components ===

If you wish to develop your own middleware or application while having full control over the underlying protocol layers yourself, you can use the following APIs that provide granular control over their respective components:

* [wiki:SipCoreApiDocumentation SIP Core API] - SIP, RTP, ICE and Audio Engine including cross platform audio-device abstraction, codecs and jitter buffer
* [wiki:SipMSRPApi MSRP API] - Message Session Relay Protocol (MSRP) and its Relay Extension
* [wiki:SipPresenceApi Presence API] - Payloads carried within SIP signaling used for publication, subscription and notifications of SIP events
* [wiki:SipXCAPApi XCAP API] - Manage presence policy documents on XCAP servers

You may use for example the above components API to create SIP Server Applications, something the high level middleware was not designed for.



== Network ==

To use a SIP Application you need access to the Internet and a SIP server. The following ports are being used:

|| '''Local port''' || '''Direction''' || '''Remote port''' || '''Protocol''' || '''Description''' || '''Allocation''' || '''Setting''' ||
|| 1xport >1024 || In/Out || Typically 5060 set in DNS|| UDP || [wiki:SipCoreApiDocumentation#Engine SIP over UDP] || At start || Global.sip.udp_port ||
|| 1xport >1024 || In/Out || Typically 5060 set in DNS ||TCP || [wiki:SipCoreApiDocumentation#Engine SIP over TCP] || At start ||Global.sip.tcp_port ||
|| 1xport >1024 || In/Out || Typically 5061 set in DNS ||TCP|| [wiki:SipCoreApiDocumentation#Engine SIP over TLS] || At start || Global.sip.tls_port ||
|| 2xport >1024 || In/Out || Random negotiated in SDP || UDP || [wiki:SipCoreApiDocumentation#RTPTransport RTP/RTCP stream] || Per session || Global.rtp.port_range ||
|| 1xport >1024 || In/Out || Typically 2855 negotiated in SDP || TCP || [wiki:SipMSRPApi#transport.MSRPTransport MSRP stream] || Per session || Global.msrp.local_port ||
|| 1xport >1024 || Out || Typically 443, configured || TCP || [wiki:SipXCAPApi XCAP requests] || Per request|| ||

To use ICE, the SIP service need to provide STUN and TURN servers.