SIP extension

Introduction

This extension provides support for the Session Initiation Protocol, largely used for voice over IP (VoIP). It ships both client and server SIP connectors over TCP, reusing the 90% of the logic used by the new NIO/HTTP internal connector, providing excellent scalability and performance.

For now, you can get more details on the Restlet/SIP specifications page.

Features

  • SIP transport over TCP
  • All SIP headers, including “Via”, map to a Java API
  • All base SIP methods supported
  • Extension INFO, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH and REFER methods supported
  • OPTIONS method supported : useful for integration purposes as most gateways require it for redundancy

Mapping SIP headers

The complete list of SIP headers is available at the IANA site.

SIP headerRestlet property nameRestlet property classDescription
Acceptrequest.clientInfo.acceptedMediaTypesorg.restlet.data.Preference<MediaType>Identical to HTTP with the exception that if no header field is present, the server should assume a default value of “application/sdp”.
Accept-Encodingrequest.clientInfo.acceptedEncodingsIdentical to HTTP.
Accept-Languagerequest.clientInfo.acceptedLanguagesIdentical to HTTP.
Alert-Infomessage.alertInfoorg.restlet.ext.sip.data.AddressSpecifies an alternative ring tone to the UAS or alternative ringback tone to the UAC.
Allowresponse.allowedMethodsIdentical to HTTP.
Allow-Eventsmessage.allowedEventTypesorg.restlet.ext.sip.data.EventTypeIncludes a list of tokens which indicates the event packages supported. See RFC 3265.
Authentication-Inforesponse.authenticationInfoIdentical to HTTP.
Authorizationrequest.challengeResponseIdentical to HTTP.
Call-IDmessage.callIdStringUniquely identifies a particular invitation or all registrations of a particular client.
Call-Infomessage.calleeInfo or callerInfoList of org.restlet.ext.sip.data.Address
Contactmessage.contactorg.restlet.ext.sip.data.ContactInfo
Content-Dispositionentity.dispositionSimilar to HTTP with no disposition types defined.
Content-Encodingentity.encodingsIdentical to HTTP.
Content-Languageentity.languagesIdentical to HTTP.
Content-Lengthentity.sizeIdentical to HTTP.
Content-Typeentity.mediaType and entity.characterSetIdentical to HTTP.
CSeqmessage.callSequenceorg.restlet.ext.sip.data.CallSequenceServes to order transactions within a dialog, to provide a means to uniquely identify transactions, and to differentiate between new requests and request retransmissions.
Datemessage.dateSimilar to HTTP with restriction on the date format supported.
Error-Inforesponse.errorInfoorg.restlet.ext.sip.data.AddressProvides a pointer to additional information about the error status response.
Eventmessage.eventorg.restlet.ext.sip.data.EventDescribes an event notification. See RFC 3265.
Expiresentity.expirationDateSimilar to HTTP but with SIP specificities.
Fromrequest.clientInfo.fromorg.restlet.ext.sip.data.AddressSimilar to HTTP but with a more specific format.
In-Reply-Torequest.inReplyToList<org.restlet.ext.sip.data.CallId>Enumerates the Call-IDs that this call references or returns.
Max-ForwardsSupport for proxies planned for laterIdentical to HTTP.
Min-Expiresresponse.minExpiresConveys the minimum refresh interval supported for soft-state element managed by that server.
MIME-Versionmessage.mimeVersionIndicates what version of the MIME protocol was used to construct the message.
Organizationmessage.organizationConveys the name of the organization to which the SIP element issuing the request or response belongs.
Priorityrequest.priorityorg.restlet.ext.sip.data.PriorityIndicates the urgency of the request as perceived by the client.
Proxy-Authenticateresponse.proxyChallengeRequestsIdentical to HTTP.
Proxy-Authorizationrequest.proxyChallengeResponseIdentical to HTTP.
Proxy-Requiremessage.proxyRequireList<org.restlet.ext.sip.data.OptionTag>Used to indicate proxy-sensitive features that must be supported by the proxy.
RAck?Supports reliability of provisional responses. Mentionned in RFC 3262.
Record-Routemessage.recordedRoutesList<org.restlet.ext.sip.data.Address>Inserted by proxies in a request to force future requests in the dialog to be routed through the proxy.
Refer-Torequest.refertToorg.restlet.ext.sip.data.AddressProvides a URL to reference. See RFC 3515.
Reply-Tomessage.replyToorg.restlet.ext.sip.data.AddressContains a logical return URI that may be different from the From header field.
Requirerequest.requiresList<org.restlet.ext.sip.data.OptionTag>Used by UACs to tell UASs about options that the UAC expects the UAS to support in order to process the request.
Retry-Afterresponse.sipRetryAfterList<org.restlet.ext.sip.data.Availability>Identical to HTTP.
Routerequest.routesList<org.restlet.ext.sip.data.Address>Used to force routing for a request through the listed set of proxies.
RseqresponseTransmit provisional responses reliably. Mentionned in RFC 3262
Serverresponse.serverInfo.agentIdentical to HTTP.
SIP-ETagresponse.sipTagorg.restlet.data.TagSee RFC 3903
SIP-If-Matchrequest.conditions.sipIfMatchorg.restlet.data.TagSee RFC 3903
Subjectrequest.subjectProvides a summary or indicates the nature of the call, allowing call filtering without having to parse the session description.
Subscription-Staterequest.subscriptionStateorg.restlet.ext.sip.data.SubscriptionStateProvides the state of a subscription. See RFC 3265.
Supportedmessage.supportedList<org.restlet.ext.sip.data.OptionTag>Enumerates all the extensions supported by the UAC or UAS.
Timestampmessage.timestampDescribes when the UAC sent the request to the UAS.
Tomessage.toorg.restlet.ext.sip.data.AddressSpecifies the logical recipient of the request.
Unsupportedmessage.unsupportedList<org.restlet.ext.sip.data.OptionTag>Lists the features not supported by the UAS.
User-Agentrequest.clientInfo.agentIdentical to HTTP.
Viamessage.recipientsInfoIdentical to HTTP.
Warningmessage.warningsIdentical to HTTP.
WWW-Authenticateresponse.challengeRequestsIdentical to HTTP.