SIP

Inside UCWA


The Unified Communications Web API (UCWA) is a REST-like API to enable real-time communications over the web on Server-Side based works for Microsoft Lync on-primes. See the UCWA previous post

Technology Boundaries

  • Only users homed on a Lync Server 2013 pool can take advantage of UCWA capabilities.
  • Supported only for The On Prime Lync Server.
  • Server-to-server authentication between an on-premises server and an Office 365 component is not supported.
  • HD Photos, Voicemail and meetings are dependent on the version of Exchange Server 2013.
  • Supported only for The On Prime Exchange Server.
  • Exchange 2010 On prime and Online are not supported.
  • Compatible with Internet Explorer versions 9 and 10 are both supported, as are the latest versions of Chrome, Safari, and Firefox.
  • The developers needs to know HTTP: POST and GET and PUT and DELETE and HTTP headers, REST SERVICE and indeed JavaScript and JQuery.

What We Can Do With The Technology

  1. Contacts and Groups
    • Access, search, federated organizations, monitor on contact list, subscribing to the presence, Presence, Location, and Note can publish and view her presence and note, View own photos or the photos of their contacts.
  2. Two-party and Multi-party IM
    • Supports instant messaging between two parties in a peer-to-peer fashion as well as multi-party IM sessions that are hosted by the server.
    • Add Participant for a Multi-Party IM.
    • Escalate the conversation to conference.
  3. Working with Online Meetings
    • Schedule an online meeting that can be joined by via this API or there Lync services.
    • Joining of online meetings with messaging and phone audio modalities (for future use).
    • A roster of meeting attendees is provided; this information includes participant name, contact information, and modalities. And can update Meeting.
    • Exchange APIs can be used to place meeting information on the user’s calendar you will only see meetings created by UCWA.

Technology Barriers (What we can’t do)

  • No Audio, Video or other Real Time Media (at this time). According to the Channel 9 video, UCWA is on the Roadmap to get voice/video/screen sharing capability over IP after Lync 2013 goes RTM.
  • Only allow you connect at a user level i.e. can’t do action on behalf of others.
  • No Office 365 support.
  • No User Impersonation.
  • No custom presence Support.
  • Can’t start group IM conversations.

Development Ability

  1. People
    • Search.
    • Presence Subscription and Presence Subscription Membership.
    • Get contact and contact information i.e. Location, Note, Photo, Presence, Privacy Relationship and Supported Modalities.
    • Get group, Group Contacts, Default Group, Distribution Group, Expand Distribution Group.
    • Start/Refresh/Stop Subscription to Contacts and Groups.
    • Subscribed Contacts.
    • Subscribe To Group Presence.
    • Get contacts forward call information i.e. Immediate Forward Settings, Immediate Forward to Contact, Immediate Forward to Delegates and Immediate Forward to Voicemail.
  2. Me
    • Call Forwarding Settings.
    • Change Phone Number.
    • Change Visibility: Changes the visibility of a phone number to other contacts.
    • Change location.
    • Presence: get a representation of the user’s availability and activity.
    • Note, Photo and Report My Activity: Indicates that the user is actively using this application.
    • Call settings i.e. Reset Unanswered Call Settings, Simultaneous Ring Settings, Simultaneous Ring to Contact, Simultaneous Ring to Delegates, Simultaneous Ring to Team, Unanswered Call Settings, Unanswered Call to Contact and Unanswered Call to Voicemail.
  3. Online Meetings
    • Dial in Region: get a representation of the access information for phone users who wish to join an online Meeting.
    • Group.
    • My Assigned Online Meetings.
    • My Online Meetings.
    • Online Meeting Default Values: get a representation of the values of my Online Meeting properties if not specified at scheduling time.
    • Online Meeting Eligible Values: get a representation of the eligible values that the application can choose from when scheduling an Online Meeting.
    • Online Meeting Extensions: get a representation of the data that is needed by a custom meeting extension, stored as a collection of key-value pair properties.
    • Online Meeting Invitation.
    • Online Meeting Invitation Customization.
    • Online Meeting Policies.
    • Meeting Organizer.
    • Phone Dial in Information.
  4. Communications and Modalities
    • Accept/decline incoming conversation.
    • Send invitation to contact/Participant and knows the Acceptance state.
    • Add Messaging.
    • Add Participant.
    • Attendees.
    • Cancel/Reject.
    • Conversations: get a representation of the user’s ongoing conversations.
    • Data Collaboration to return the current modality.
    • Demote: user can demote the participant from leader to attendee in the online Meeting.
    • Derived Conversation.
    • Derived Messaging.
    • Disable/Disable Audience Messaging and Disable/Disable Audience Mute Lock.
    • Failed Delivery Participant.
    • Forwarded By.
    • From: get a representation of the participant that sent an invitation.
    • Hold Phone Audio.
    • Join Online Meeting.
    • Leaders.
    • Lobby.
    • Local Participant.
    • Messaging and Messaging Invitation.
    • Mute Audio/Video.
    • Participant.
    • Participant Application Sharing : track when a participant joins or leaves this modality.
    • Participant Audio : track when a participant joins or leaves this modality.
    • Participant Data Collaboration: track when a participant joins or leaves this modality.
    • Participant Invitation.
    • Participant Messaging.
    • Participant Panoramic Video.
    • Participant Video.
    • Phone Audio Invitation.
    • Promote.
    • Reject.
    • Resume Phone Audio.
    • Send Message.
    • Set Is Typing.
    • Start Messaging.
    • Start Online Meeting.
    • Start Phone Audio.
    • Stop Messaging.
    • Transferred By.
    • Typing Participants.
    • Video Locked On Participant.
Advertisements

Microsoft Lync 2013 SDK


Microsoft introduced the new Lync API release for Microsoft Lync 2013. Microsoft Lync 2013 SDK is the client-side API set that enables the integration and extension of Lync experiences.

With the Lync SDK, you can quickly add Lync 2013 features to an existing business application, extend the Lync client itself or, if you have the need, build a custom UI built atop the Lync client platform.

The Microsoft Lync 2013 SDK includes the Lync 2013 API, a managed-code (.NET) API that developers use to build applications that leverage the Microsoft Lync 2013 collaboration features. In addition to the Lync 2013 API, the Lync SDK includes a set of UI controls that can be used to add Lync features to a Microsoft Windows Presentation Foundation (WPF), or Microsoft Silverlight 4.0 application. The Lync 2013 SDK also ships with a set of working code samples and documentation to help you become a productive Lync developer as quickly as possible.

It is important to note the Lync SDK’s development model does require the Lync client to be installed on the user’s machine and the API is called from outside the Lync process, manipulating the same object model on which the Lync client is built.

Microsoft Lync Server 2013 SDK

The Microsoft Lync Server 2013 SDK includes the Microsoft Lync Server 2013 SIP Application API documentation, library (ServerAgent.DLL), application development tools, and sample applications.

The Lync Server 2013 SDK includes three Lync Server 2013 SIP Application API references that can be used to create Session Initiation Protocol (SIP) server applications that customize and extend the functionality of Microsoft Lync Server 2013:

  • SIP application manifest
  • Microsoft SIP Processing Language (MSPL)
  • Microsoft.Rtc.Sip namespace

This SDK is Intended for the Following Audiences

  • Developers who want to use application manifests and MSPL scripts to implement simple custom SIP message filtering and routing on computers in a Lync Server 2013 deployment.
  • Experienced SIP developers who want to create SIP-based managed code server applications that implement real-time content delivery or instant messaging infrastructure. This includes applications that work directly with SIP transaction objects or support multithreaded transactions.

What’s New

More than 70 new topics have been added to the SDK. These topics explain new features of Lync SDK as well as giving you a more in-depth look at features introduced in a previous release of the SDK.

New SDK Features

Lync SDK give you three new features will let you provide your custom application users with a complete collaboration experience. The three areas that we have enhanced the Lync SDK include:

  • Resource sharing. This feature allows a client to share a running process, desktop, or any one of the displays attached to a computer.
  • Persistent chat support. You can build a persistent chat client as well as a persistent chat add-in application that is attached to a persistent chat room.
  • On Line meeting content management. You can manage the contents of an on line meeting content bin, meeting content sharing stage, and meeting video display sources.

Most Solved Issues

Microsoft solved the problem of viewing the video in the UI Suppression Mode with the Lync 2013 SDK (preview) and now it is working fine but you need to install the latest release of the Microsoft Lync client (15.0.4454.1506) version

Related Information

Lync 2013 SDK training videos for developers
Lync 2013 Developer documentation
Download Microsoft Lync 2013 SDK

Difference Between TCP and UDP


Before we talking about the most used protocols in the Transport Layer we should talk first about the Transport Layer, It uses a two-octet port number from the application layer to deliver the datagram or segment to the correct application layer protocol at the destination IP address.

There are two commonly used transport layer protocols: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). In addition, there are two uncommon transport protocols: Stream Control Transmission Protocol (SCTP) and Datagram Congestion Control Protocol (DCCP), which are beginning to be used on the Internet. There is also Transport Layer Security (TLS) which provides security on top of TCP.

Transmission Control Protocol (TCP)

It provides reliable, connection-oriented transport over IP. A TCP connection between two hosts over an IP network is sometimes known as a socket.

TCP is a client/server protocol. Servers “listen” on a specific port for an incoming request to open a socket. A client sends a request to open a new socket to the server on the well-known port.

The combination of the source IP address, source port, destination IP address, and destination port identifies the socket connection. So it is possible for 2 hosts to have multiple TCP connections open between them.

TCP uses sequence numbers and positive acknowledgments to ensure that each block of data, called a segment, has been received. Lost segments are retransmitted until they are successfully received.

TCP sends data in units called segments. The maximum segment size (MSS) is negotiated between the hosts during the handshake, and is usually based on the maximum transmission unit (MTU) of the local network. A typical MTU value for the Internet is 1,500 octets.

TCP also has built in flow control. Flow control is used by a receiver to slow down the rate of transmission to allow the receiver to properly process or buffer incoming segments.

TCP uses a sliding window for end-to-end control. Senders can only send the number of octets in the window before waiting for an ACK. A receiver can reduce the size of the window in ACK messages, even setting it to 0 to cause the sender to stop sending. Once the receiver has caught up, another ACK can be sent to increase the window size and resume the flow of segments.

TCP adds a 20-octet header field to each packet, and is a stream-oriented transport. An application using TCP to send messages must provide its own framing or separation between messages. Error segments are detected by a checksum covering both the TCP header and payload.

Transport Port Numbers

Ports numbers are used by the transport layer to multiplex and de-multiplex multiple connections on a single host. Otherwise a pair of hosts could only have a single connection between them. Also, messages for different protocols can be separated by using different port numbers.

Port numbers are associated with a specific protocol. Others are registered to a particular protocol. Ports are a 16 bit integer.

Ports in the range 0 to 1024 are called well-known ports. For example, Web servers use the well-known port of 80

Ports in the range of 1024 through 49151 are known as registered ports. For example, SIP uses the registered ports of 5060 and 5061

Ports in the range of 49152 through 65535 are known as dynamic, private, or ephemeral ports. For example, RTP usually uses a dynamic port.

User Datagram Protocol (UDP)

It provides unreliable transport across the Internet. It is a best-effort delivery service, since there is no acknowledgment of sent datagrams. Most of the complexity of TCP is not present, including sequence numbers, acknowledgments, and window sizes.

UDP does detect datagrams with errors with a checksum. It is up to higher layer protocols to detect this datagram loss and initiate a retransmission if desired.

UDP is best suited for short, single packet exchanges such as DNS or routing queries. It is also good for real-time, low latency transports protocols such as SIP and RTP.

UDP adds an 8-octet header field to datagrams. Applications and protocols that use UDP must do their own framing—they must break up information into individual UDP packets. For a message oriented protocol, this typically means one message or request per UDP datagram.

Transmission Layer Security (TLS)

It is based on the Secure Sockets Layer (SSL) protocol first used in Web browsers. TLS uses TCP for transport although it has recently been extended to also run over UDP. TLS is commonly used today on the Internet for secure Web sites using the secure HTTP (https) URI scheme.

The TLS protocol has two layers: the TLS Transport Protocol and the TLS Handshake Protocol.

The TLS Transport Protocol is used to provide a reliable and private transport mechanism. Data sent using the TLS Transport Protocol is encrypted so that a third party cannot intercept the data. A third party also cannot modify the transported data without one of the parties discovering this.

The TLS Handshake Protocol is used to establish the connection, negotiate the encryption keys used by the TLS Transport Protocol, and provide authentication.

However, TLS transport has clear security advantages over UDP or TCP. TLS is widely supported due to its use in secure Web browsers and servers.

Microsoft Lync Server


Microsoft Lync Server (previously Microsoft Office Communications Server OCS and Microsoft Live Communication Server LCS) is an enterprise real-time communications server, providing the infrastructure for enterprise instant messaging, presence, file transfer, peer-to-peer and multiparty voice and video calling , ad-hoc and structured conferences (audio, video and web) and, through a 3rd party gateway or SIP trunk, PSTN connectivity. These features are available within an organization, between organizations, and with external users on the public internet or standard phones, on the PSTN as well as SIP trunking.

Versions History

  • 2013 – Microsoft Lync Server 2013
  • 2010 – Microsoft Lync Server 2010
  • 2009 – Office Communications Server 2007 R2
  • 2007 – Office Communications Server 2007
  • 2006 – Live Communications Server 2005 with SP1
  • 2005 – Live Communications Server 2005, codenamed Vienna
  • 2003 – Live Communications Server 2003

Client software and devices

Microsoft Lync is the primary client application released with Lync Server. This client is used for IM, presence, voice and video calls, desktop sharing, file transfer and ad hoc conferences. Microsoft also ships the Microsoft Attendant Console. This is a version of the Lync more oriented towards receptionists or delegates / secretaries or others who get a large volume of inbound calls.

Other client software and devices include:

  • Lync Communicator Mobile is a Mobile edition of the Lync Server 2010 client and designed to offer similar functionality including voice calls, instant messaging, presence and single number reachability. Clients for all major platforms including the IPhone are being developed
  • Lync Communicator Web Access is a web instant messaging and presence client. This version works as well on IE, Firefox and Opera browsers.
  • Microsoft RoundTable is an audio and video conferencing device that provides a 360-degree view of the conference room and tracks the various speakers. This device is now produced and sold via Polycom under the product name CX5000.
  • LG-Nortel and Polycom also make IP phones in a traditional phone form factor that operate an embedded edition of Office Communicator 2007. The physical plastic phones as referred by Microsoft are also named Tanjay Phones.

Features

One basic use of Lync Server is instant messaging and presence within a single organization. This includes support for rich presence information, file transfer, instant messaging as well as voice and video communication. (These latter features are often not possible even within a single organization using public IM clients, due to the effects of negotiating the corporate firewall and network address translation). Lync uses Interactive Connectivity Establishment for NAT traversal and TLS encryption to enable secure voice and video both inside and outside the corporate network.

Lync Server also supports remote users, both corporate users on the internet (e.g. mobile or home workers) as well as users in partner companies. Lync supports “federation” – enabling interoperability with other corporate IM networks. Federation can be configured either manually (where each partner manually configures the relevant edge servers in the other organization) or automatically (using the appropriate SRV records in the DNS).

Microsoft Lync Server uses Session Initiation Protocol (SIP) for signaling along with the SIMPLE extensions to SIP for IM and presence. Media is transferred using RTP/SRTP. The Live Meeting client uses PSOM to download meeting content. The Communicator client also uses HTTPS to connect with the web components server to download address books, expand distribution lists, etc. By default, Office Communications Server encrypts all signaling and media traffic using SIP over TLSand SRTP. There is one exception to this – traffic between the Mediation Server and a basic media gateway is carried as SIP over TCP and RTP. However, if a hybrid gateway is leveraged, such as one from Microsoft’s Open Interoperability Site, then in fact everything is encrypted from all points if (SSL certificates are configured on the gateway and TLS elected as the transmission type).

IM is only one portion of the Lync suite. The other major components are VOIP telephony and video conferencing through the desktop communicator client. Remote access is possible using mobile and web clients.

Several third parties have incorporated Lync functionality on existing platforms. HP has implemented OCS on their Halo video conferencing platform.

Microsoft released Microsoft Office Communications Server 2007 R2 in February 2009. The R2 release added the following features

  • Dial-in audio conferencing
  • Desktop sharing
  • Persistent Group Chat
  • Attendant console and delegation
  • Session Initiation Protocol trunking
  • Mobility and single-number reach