|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-768CCC6E-16D2-50E8-8EED-EB2C2AF0E9BE" xml:lang="en"><title>Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
13 <p>The SIP Client Resolver defines the architecture used to resolve or identify |
|
14 the target client when SIP requests are received from the default port. The |
|
15 Symbian SIP stack is implemented as a Symbian server and uses the default |
|
16 UDP and TCP port 5060 to send and receive SIP messages. Many applications |
|
17 or target clients receive SIP messages that use the default port, and the |
|
18 correct target client must be determined. </p> |
|
19 <p>The SIP Client Resolver determines the target client based on the SIP request |
|
20 and the XML-description provided by every SIP Client Resolver API implementation. |
|
21 It requests the resolved ECOM plug-in to connect to the SIP or another server |
|
22 which uses SIP. </p> |
|
23 <section><title>Architectural relationships</title> <p>The Client Resolver |
|
24 API requires the SIP Codec API and the SIP Codec API. </p> <p>The target clients |
|
25 that receive SIP requests must implement the API Client Resolver API. The |
|
26 following are the two methods in which a target client can receive SIP requests: </p> <ul> |
|
27 <li id="GUID-F3BEAD9E-744E-5154-91EC-E0B66034A8F4"><p> <b>Implement the CSIPResolvedClient |
|
28 interface and provide an XML description with their capabilities</b> </p> <p>The |
|
29 XML description describes the supported content-types and media formats that |
|
30 use SIP headers and SDP m-lines in the ECOM resource file. Client Resolver |
|
31 framework determines the target client by comparing the incoming SIP request |
|
32 to the XML descriptions provided by the <xref href="GUID-F0E4FA44-A41C-3C6F-993E-39CED042A879.dita"><apiname>CSIPResolvedClient</apiname></xref> implementation. </p> </li> |
|
33 <li id="GUID-07B5DFE5-D376-57F7-8ACB-50BB1EF8351B"><p>Implement the <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita"><apiname>CSIPResolvedClient2</apiname></xref> interface |
|
34 and add Request-URIs user-part, plug-ins UID, and the client UID to the SIP |
|
35 Client Resolver mapping table in the Central Repository </p> <p>The table |
|
36 maps the user-part of the incoming SIP request’s Request-URI to the related <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita"><apiname>CSIPResolvedClient2</apiname></xref> implementation’s |
|
37 UID. SIP Client Resolver framework gives the SIP request to only the plug-ins |
|
38 for which a mapping entry is found in the Central Repository. </p> </li> |
|
39 </ul> <p>This implies that every target client must provide an ECOM plug-in |
|
40 that is used by the Client Resolver Framework. The Client Resolver Framework |
|
41 uses the information in the SIP request and matches it with the XML description |
|
42 or the mapping table entry provided by the target clients. It then decides |
|
43 which target client plug-in to load. </p> </section> |
|
44 <section><title>Class structure</title> <p>SIP Client Resolver must create |
|
45 a class derived from <xref href="GUID-F0E4FA44-A41C-3C6F-993E-39CED042A879.dita"><apiname>CSIPResolvedClient</apiname></xref> or <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita"><apiname>CSIPResolvedClient2</apiname></xref> to |
|
46 receive requests outside the SIP dialogs. If the target client is not running, |
|
47 it must be started to enable it to receive SIP requests. </p> <fig id="GUID-B8A796EA-6850-5695-A516-E92629BE7971"> |
|
48 <image href="GUID-E77E2E2A-2F2D-549E-ABD6-175E68A406CB_d0e317911_href.png" placement="inline"/> |
|
49 </fig> <p><b>CSIPResolvedClient</b> </p> <p>The target clients must implement |
|
50 the <xref href="GUID-F0E4FA44-A41C-3C6F-993E-39CED042A879.dita"><apiname>CSIPResolvedClient</apiname></xref> interface to receive SIP requests |
|
51 outside SIP dialogs and enable the client resolution mechanism. </p> <p>SIP |
|
52 uses the data provided in the ECOM resource file or, as requested by the implementation |
|
53 to decide which target client is used. </p> <p><b>CSIPResolvedClient2</b> </p> <p>The |
|
54 target clients must implement the <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita"><apiname>CSIPResolvedClient2</apiname></xref> interface |
|
55 to receive SIP requests outside SIP dialogs and enable the client resolution |
|
56 mechanism. </p> <p>The SIP stack uses the plug-ins that implement this interface |
|
57 as follows: </p> <ol id="GUID-E3325143-0AA4-5A60-885C-875F388EF0E3"> |
|
58 <li id="GUID-816770B7-3A85-5894-9868-64BEE12FD50C"><p>If the SIP request does |
|
59 not contain the Accept-Contact-header, go to step 2. If it does, the SIP stack |
|
60 calls the <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita#GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E/GUID-2C145D8C-DB4C-33C9-9CCE-193433909937"><apiname>CSIPResolvedClient2::MatchAcceptContactsL()</apiname></xref> method |
|
61 on all the plug-ins and applies the following logic: </p> <ul> |
|
62 <li id="GUID-5457D39D-DE84-5A3F-8E8B-7E79C863E118"><p>If none of the clients |
|
63 match, go to step 2. </p> </li> |
|
64 <li id="GUID-BE1A9D22-BD88-519E-AC4A-242FC6D3B098"><p>If one of the clients |
|
65 match, send the SIP request to the matching client. </p> </li> |
|
66 <li id="GUID-3A027E2A-C805-595D-B43C-28B19BC07609"><p>If more than one of |
|
67 the clients match, go to step 2. </p> </li> |
|
68 </ul> </li> |
|
69 <li id="GUID-7F822965-0220-52A8-8CAF-EACA4D87E75D"><p>If the SIP request does |
|
70 not contain the Event-header, go to step 3. If it does, SIP stack calls the <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita#GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E/GUID-9DB2CFFE-09ED-367D-9C14-6917F8E3DCF4"><apiname>CSIPResolvedClient2::MatchEventL()</apiname></xref> method |
|
71 on all the plug-ins and applies the following logic: </p> <ul> |
|
72 <li id="GUID-8E85F9F9-D645-53D7-A4D8-6717951B0D1C"><p>If none of the clients |
|
73 match, go to step 3. </p> </li> |
|
74 <li id="GUID-B713BE42-D8AF-51D6-8832-D0B221CFF4D8"><p>If one of the clients |
|
75 match, send the SIP request to the matching client. </p> </li> |
|
76 <li id="GUID-93037264-2B67-5DD4-990B-9D3EEEDE6C4D"><p>If more than one of |
|
77 the clients match, go to step 3. </p> </li> |
|
78 </ul> </li> |
|
79 <li id="GUID-BFCEF7B8-4068-58E6-B960-27035A5A52D6"><p>The SIP stack calls |
|
80 the <xref href="GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E.dita#GUID-30BC7BC4-0FBE-3C60-A2E4-2E5AE206C61E/GUID-9C9E49C8-602B-3C1C-B036-A176FF323A54"><apiname>CSIPResolvedClient2::MatchRequestL()</apiname></xref> method on all |
|
81 the plug-ins and applies the following logic: </p> <ul> |
|
82 <li id="GUID-86228E63-7E10-571E-B465-EB4D14E8855D"><p>If none of the clients |
|
83 match, an error response is generated. </p> </li> |
|
84 <li id="GUID-6F578483-34E7-5CFB-A565-2209FFF82D28"><p>If one of the clients |
|
85 matches, send the SIP request to the matching client. </p> </li> |
|
86 <li id="GUID-C1BD2E18-CFEB-558F-9F10-60EF6B9539E7"><p>If more than one of |
|
87 the clients match, one of the client is randomly selected and the SIP request |
|
88 is sent to it. Normally, the ROM-based clients are preferred. </p> </li> |
|
89 </ul> </li> |
|
90 </ol><p>The channel UIDs must be unique across all SIP clients. The clients |
|
91 may use UIDs assigned for the binaries. </p> </section> |
|
92 </conbody><related-links> |
|
93 <link href="GUID-5C215C64-5D3D-5B65-A11F-BE6F8C306CF4.dita"><linktext>How |
|
94 the target client is resolved using CSIPResolvedClient</linktext> |
|
95 </link> |
|
96 <link href="GUID-AFE7F3DA-6D61-5A4C-A08F-C998C8805A06.dita"><linktext>How |
|
97 the target client is resolved using CSIPResolvedClient2</linktext> |
|
98 </link> |
|
99 </related-links></concept> |