JBoss.orgCommunity Documentation
To obtain the example's complete source code please refer to Section 2.2, “JBoss Communications JAIN SLEE Call Controller2 Example Source Code”.
Chapter
Chapter 3, Design Overview
explains top level view of example. This chapter explains how
components perform their tasks. For more
detailed explanation of
JSLEE
related source code
and xml descriptors,
please refer to
simpler
examples, like
sip-wakeup
Each components of Call Controller2 runs as independent service. Each service is defined as follows(in order of priority):
Call blocking service
<service-xml>
<service>
<description/>
<service-name>CallBlockingService</service-name>
<service-vendor>org.mobicents</service-vendor>
<service-version>0.1</service-version>
<root-sbb>
<description/>
<sbb-name>CallBlockingSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
</root-sbb>
<default-priority>100</default-priority>
</service>
</service-xml>
Call forwarding
<service-xml>
<service>
<description/>
<service-name>CallForwardingService</service-name>
<service-vendor>org.mobicents</service-vendor>
<service-version>0.1</service-version>
<root-sbb>
<description/>
<sbb-name>CallForwardingSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
</root-sbb>
<default-priority>0</default-priority>
</service>
</service-xml>
Voice mail
<service-xml>
<service>
<description/>
<service-name>VoiceMailService</service-name>
<service-vendor>org.mobicents</service-vendor>
<service-version>0.1</service-version>
<root-sbb>
<description/>
<sbb-name>VoiceMailSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
</root-sbb>
<default-priority>-50</default-priority>
</service>
</service-xml>
Call Controller2 SBBs access JSLEE facilities in the same way. Code to perform this tasks is generic and gathered in super class for all Call Controller2 SBB classes.
It does following:
retrieve JSLEE facilities and SIP RA interfaces
public void setSbbContext(SbbContext context) {
this.sbbContext = context;
try {
//"If NamingException is thrown check jmx-console -> JNDIView ->
// list or sbb-jar (check entity-bindning) for proper JNDI path!!!!"
Context myEnv = (Context) new InitialContext().lookup("java:comp/env");
// Getting JAIN SIP Resource Adaptor interfaces
fp = (SleeSipProvider) myEnv.lookup("slee/resources/jainsip/1.2/provider");
// To create Address objects from a particular implementation of JAIN SIP
addressFactory = fp.getAddressFactory();
// To create Request and Response messages from a particular implementation of JAIN SIP
messageFactory = fp.getMessageFactory();
// To allow SBB entities to interrogate the profile database to find
// profiles that match a selection criteria
profileFacility = (ProfileFacility) myEnv.lookup("slee/facilities/profile");
} catch (NamingException ne){
log.error("COULD NOT LOCATE RESOURCE IN JNDI: Check JNDI TREE or entity-binding for proper path!!!", ne);
}
}
provide accessors to facilities with simple getters
provide profile CMP interface lookup
protected CallControlProfileCMP lookup(javax.slee.Address address) {
String profileTableName = new String();
//ProfileID profileID = null;
CallControlProfileCMP profile = null;
try {
profileTableName = "CallControl";
ProfileTable table = getProfileFacility().getProfileTable(profileTableName);
ProfileLocalObject plo=table.findProfileByAttribute("userAddress", address);
profile = (CallControlProfileCMP) plo;
}catch (NullPointerException e) {
log.error("Exception using the getProfileByIndexedAttribute method", e);
}catch (UnrecognizedProfileTableNameException e) {
log.error("Exception in getting the Profile Specification in getControllerProfileCMP(profileID):" +
"The ProfileID object does not identify a Profile Table created from the Profile Specification", e);
}catch (TransactionRolledbackLocalException e) {
log.error(e.getMessage(), e);
}catch (FacilityException e) {
log.error(e.getMessage(), e);
}
return profile;
}
Common code provides all SBBs with initial event selector call back method. This method is called by JSLEE for each event declared as initial. It assigns unique name to service instance handling call. For descriptor declaration please refer to SBB event handler description.
public InitialEventSelector callIDSelect(InitialEventSelector ies) {
Object event = ies.getEvent();
String callID = null;
if (event instanceof RequestEvent) {
// If request event, the convergence name to callId
Request request = ((RequestEvent) event).getRequest();
callID = ((CallIdHeader) request.getHeader(CallIdHeader.NAME)).getCallId();
}
ies.setCustomName(callID);
return ies;
}
Call Controller2 profile specification is not complicated. It is designed only as simple service data container. It does not perform any other tasks.
Profile specification descriptor for Call Controller2 declares following values:
Profile ID - that is name,vendor and version.
profile CMP interface
profile abstract class
Descriptor look as follows:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE profile-spec-jar PUBLIC "-//Sun Microsystems, Inc.//DTD JAIN SLEE Profile Specification 1.1//EN" "http://java.sun.com/dtd/slee-profile-spec-jar_1_1.dtd">
<profile-spec-jar>
<profile-spec>
<description />
<profile-spec-name>CallControlProfileCMP</profile-spec-name>
<profile-spec-vendor>org.mobicents</profile-spec-vendor>
<profile-spec-version>0.1</profile-spec-version>
<profile-classes>
<profile-cmp-interface>
<profile-cmp-interface-name>
org.mobicents.slee.examples.callcontrol.profile.CallControlProfileCMP
</profile-cmp-interface-name>
<!-- <profile-index unique="True">userAddress</profile-index> -->
<cmp-field>
<cmp-field-name>userAddress</cmp-field-name>
<index-hint query-operator="equals"/>
</cmp-field>
</profile-cmp-interface>
<profile-abstract-class>
<profile-abstract-class-name>
org.mobicents.slee.examples.callcontrol.profile.CallControlProfileManagementImpl
</profile-abstract-class-name>
</profile-abstract-class>
</profile-classes>
</profile-spec>
</profile-spec-jar>
Profile data can be accessed and modified with profile CMP interface. It is interface exposed to JSLEE components. It is defined as follows:
package org.mobicents.slee.examples.callcontrol.profile;
import javax.slee.Address;
public interface CallControlProfileCMP {
// 'userAddress' CMP field setter
public abstract void setUserAddress(Address value);
// 'userAddress' CMP field getter
public abstract Address getUserAddress();
// 'blockedAddresses' CMP field setter
public abstract void setBlockedAddresses(Address[] value);
// 'blockedAddresses' CMP field getter
public abstract Address[] getBlockedAddresses();
// 'backupAddress' CMP field setter
public abstract void setBackupAddress(Address value);
// 'backupAddress' CMP field getter
public abstract Address getBackupAddress();
// 'voicemailState' CMP field setter
public abstract void setVoicemailState(boolean value);
// 'voicemailState' CMP field getter
public abstract boolean getVoicemailState();
}
Profile abstract class implements custom logic to handle profile data and JSLEE callback methods for management operations. This class becomes part of profile object implementation. It allows to control some aspects of profile and its data.
Call Controller2 profile abstract class performs following operations:
initialize profile with defailt values
verify data constrains
It is defined as follows:
import javax.slee.Address;
import javax.slee.AddressPlan;
import javax.slee.CreateException;
import javax.slee.profile.Profile;
import javax.slee.profile.ProfileContext;
import javax.slee.profile.ProfileVerificationException;
public abstract class CallControlProfileManagementImpl implements Profile,
CallControlProfileCMP {
private ProfileContext profileCtx;
/**
* Initialize the profile with its default values.
*/
public void profileInitialize() {
setUserAddress(null);
setBlockedAddresses(null);
setBackupAddress(null);
setVoicemailState(false);
}
public void profileLoad() {
}
public void profileStore() {
}
/**
* Verify the profile's CMP field settings.
*
* @throws ProfileVerificationException
* if any CMP field contains an invalid value
*/
public void profileVerify() throws ProfileVerificationException {
// Verify Called User Address
Address address = getUserAddress();
if (address != null)
verifyAddress(address);
// Verify Blocked Addresses
Address[] blockedAddresses = getBlockedAddresses();
if (blockedAddresses != null) {
for (int i = 0; i < blockedAddresses.length; i++) {
if (blockedAddresses[i] != null)
verifyAddress(blockedAddresses[i]);
}
}
// Verify Backup Address
Address backupAddress = getBackupAddress();
if (backupAddress != null)
verifyAddress(backupAddress);
}
public void verifyAddress(Address address)
throws ProfileVerificationException {
// Check address plan
if (address.getAddressPlan() != AddressPlan.SIP)
throw new ProfileVerificationException("Address \"" + address
+ "\" is not a SIP address");
// Check URI scheme - must be sip: or sips:
String uri = address.getAddressString().toLowerCase();
if (!(uri.startsWith("sip:") || uri.startsWith("sips:")))
throw new ProfileVerificationException("Address \"" + address
+ "\" is not a SIP address");
}
public void profileActivate() {
}
public void profilePassivate() {
}
public void profilePostCreate() throws CreateException {
}
public void profileRemove() {
}
public void setProfileContext(ProfileContext ctx) {
this.profileCtx = ctx;
}
public void unsetProfileContext() {
this.profileCtx = null;
}
}
Blocking service is simplest of services in Call Controller2
It processes incoming
SIP
INVITE
request and based on callee and caller denies or allows call to
happen.
Root class of this service is org.mobicents.slee.examples.callcontrol.blocking.CallBlockingSbb
Call blocking service receives only one event: SIP INVITE request. Its responsibility is:
extract callee AOR
determine list of blocked users for callees AOR
terminate call if caller AOR is blocked and set ACI variable to indicate that call has been handled
It is defined as follows:
public void onInvite(javax.sip.RequestEvent event,
CallBlockingSbbActivityContextInterface localAci) {
Request request = event.getRequest();
try {
localAci.detach(this.getSbbLocalObject());
FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
// From URI
URI fromURI = fromHeader.getAddress().getURI();
// To URI
URI toURI = toHeader.getAddress().getURI();
// In the Profile Table the port is not used
((SipURI)fromURI).removePort();
((SipURI)toURI).removePort();
ArrayList targets = getBlockedArrayList(toURI.toString());
if (targets != null) {
// Cheking whether the caller is blocked by the called user
for (int i = 0; i < targets.size(); i++) {
if ((targets.get(i).toString()).equalsIgnoreCase(fromURI.toString())) {
log.info("########## BLOCKING ADDRESS: " + targets.get(i));
log.info("########## BLOCKING FOR URI: " + toURI);
localAci.setFilteredByMe(true);
// Notifiying the client that the INVITE has been blocked
ServerTransaction stBlocking = (ServerTransaction) localAci.getActivity();
Response blockingResponse = getMessageFactory().createResponse(
Response.FORBIDDEN, request);
stBlocking.sendResponse(blockingResponse);
}
}
}
} catch (TransactionRequiredLocalException e) {
log.error(e.getMessage(), e);
} catch (SLEEException e) {
log.error(e.getMessage(), e);
} catch (ParseException e) {
log.error(e.getMessage(), e);
} catch (SipException e) {
log.error(e.getMessage(), e);
} catch (InvalidArgumentException e) {
log.error(e.getMessage(), e);
}
}
Call Blocking SBB accesses examples profile in order to determine if callee has defined caller as blocked.
Profile is accessed in following way:
public abstract class CallBlockingSbb extends
SubscriptionProfileSbb implements javax.slee.Sbb
{
...
/**
* Attempt to find a list of Blocked Addresses (SIP URIs), but the method
* returns null if the called user (sipAddress) does not block to any user.
*/
private ArrayList getBlockedArrayList(String sipAddress) {
//sipAddress is AOR: sip:newbie@mobicents.org
ArrayList uris = null;
CallControlProfileCMP profile = super.lookup(new Address(AddressPlan.SIP,
sipAddress));
if (profile != null) {
Address[] addresses = profile.getBlockedAddresses();
if (addresses != null) {
uris = new ArrayList(addresses.length);
for (int i = 0; i < addresses.length; i++) {
String address = addresses[i].getAddressString();
try {
SipURI uri = (SipURI) getAddressFactory().createURI(address);
uris.add(uri);
} catch (ParseException e) {
log.error(e.getMessage(), e);
}
}
}
}
return uris;
}
}
Descriptor contains following definitions:
sbb ID
profile reference by profile ID
sbb abstract class
custom ACI
ACI variable alias
event handler with initial event selector
resource adaptor binding
<sbb>
<description />
<sbb-name>CallBlockingSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
<profile-spec-ref>
<profile-spec-name>CallControlProfileCMP</profile-spec-name>
<profile-spec-vendor>org.mobicents</profile-spec-vendor>
<profile-spec-version>0.1</profile-spec-version>
<profile-spec-alias>CallControlProfile</profile-spec-alias>
</profile-spec-ref>
<sbb-classes>
<sbb-abstract-class>
<sbb-abstract-class-name>
org.mobicents.slee.examples.callcontrol.blocking.CallBlockingSbb
</sbb-abstract-class-name>
</sbb-abstract-class>
<sbb-activity-context-interface>
<sbb-activity-context-interface-name>
org.mobicents.slee.examples.callcontrol.blocking.CallBlockingSbbActivityContextInterface
</sbb-activity-context-interface-name>
</sbb-activity-context-interface>
</sbb-classes>
<event event-direction="Receive" initial-event="True">
<event-name>Invite</event-name>
<event-type-ref>
<event-type-name>javax.sip.message.Request.INVITE</event-type-name>
<event-type-vendor>net.java.slee</event-type-vendor>
<event-type-version>1.2</event-type-version>
</event-type-ref>
<initial-event-selector-method-name>callIDSelect</initial-event-selector-method-name>
</event>
<activity-context-attribute-alias>
<attribute-alias-name>inviteFilteredByCallBlocking</attribute-alias-name>
<sbb-activity-context-attribute-name>filteredByMe</sbb-activity-context-attribute-name>
</activity-context-attribute-alias>
<resource-adaptor-type-binding>
<resource-adaptor-type-ref>
<resource-adaptor-type-name>JAIN SIP</resource-adaptor-type-name>
<resource-adaptor-type-vendor>javax.sip</resource-adaptor-type-vendor>
<resource-adaptor-type-version>1.2</resource-adaptor-type-version>
</resource-adaptor-type-ref>
<activity-context-interface-factory-name>slee/resources/jainsip/1.2/acifactory</activity-context-interface-factory-name>
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>slee/resources/jainsip/1.2/provider</resource-adaptor-object-name>
<resource-adaptor-entity-link>SipRA</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
</sbb>
Forwarding service is simple illustration of call forwarding logic.
It processes incoming
SIP
INVITE
request and based on callee availability permits call to proceed or redirects to backup address if it exists.
Its a bit more complicated than Section 4.4, “Blocking Service Source” service as it:
uses location service to determine availability of user
uses proxy service to rely messages to proper target
Root class of this service is org.mobicents.slee.examples.callcontrol.forwarding.CallForwardingSbb
CallForwardingSbb
performs all its tasks in INVITE
event handler. That is:
check if message has been already processed and possibly mark it as processed for services lower in chain
extract user AOR and determine if user is online, if so use proxy service to deliver request
if user is not online, attempt forward
Event handler code look as follows:
public void onInvite(javax.sip.RequestEvent event
, CallForwardingSbbActivityContextInterface localAci) {
Request request;
try {
localAci.detach(this.getSbbLocalObject());
if (localAci.getFilteredByAncestor()) {
log.info("########## CALL FORWARDING SBB: FILTERED BY ANCESTOR ##########");
// Next in chain has to know that someone is looking after
// message
localAci.setFilteredByMe(true);
// If it was not set, every change in the chain of services will
// extort source change in service lower in chain...
return;
}
request = event.getRequest();
// ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
// URI toURI = toHeader.getAddress().getURI();
URI toURI = event.getRequest().getRequestURI();
URI contactURI = isUserAvailable(toURI);
if (contactURI != null) {
// USER IS AVAILABLE
localAci.setFilteredByMe(true);
log.info("########## User " + toURI + " is available with contact " + contactURI);
// Create proxy child SBB
ChildRelation ProxyRelation = getJainSipProxySbb();
SbbLocalObject ProxyChild = ProxyRelation.create();
// Attach ProxyChild to the activity
// Event router will pass this event to child SBB,
// which in this case is the Proxy SBB. It will in turn proxy
// the request to the callee.
localAci.attach(ProxyChild);
return;
} else {
log.info("########## User " + toURI + " is not available, not forwarding");
}
} catch (SipSendErrorResponseException e) {
log.error(e.getMessage(), e);
} catch (CreateException e) {
log.error(e.getMessage(), e);
}
// IF WE GOT HERE IT MEANS THAT USER IS NOT AVAILABLE AND SBB HIGHER IN
// CHAIN DID NOT FILTER INVITE.
// WE HAVE TO FIND NEW ADDRESS... OR LEAVE INVITE TO BE PROCESSED BY
// NEXT SBB IN CHAIN.
Address add = forwardCall(event, localAci);
if (add != null) {
// INVITE WAS FORWARDED
// let the next service in the chain know that the event was
// processed here.
localAci.setFilteredByMe(true);
}
// LET NEXT CHAINED SBB TAKE CARE OF INVITE.
return;
}
CallForwardingSbb
depends on location service to check if user is online. Example checks entries in registrar
for callees AOR.
Registrar stores bindinings in form of mapping: AOR - {ContactAddress-BindingData,...}
Registrar entries are inspected in following way:
private URI isUserAvailable(URI uri) throws SipSendErrorResponseException {
String addressOfRecord = uri.toString();
URI target = null;
Map bindings = null;
try {
bindings = getLocationSbb().getBindings(addressOfRecord);
} catch (LocationServiceException e) {
log.error(e.getMessage(), e);
} catch (TransactionRequiredLocalException e) {
log.error(e.getMessage(), e);
} catch (SLEEException e) {
log.error(e.getMessage(), e);
} catch (CreateException e) {
log.error(e.getMessage(), e);
}
if (bindings != null & !bindings.isEmpty()) {
Iterator it = bindings.values().iterator();
while (it.hasNext()) {
RegistrationBinding binding = (RegistrationBinding) it.next();
log.info("########## BINDINGS: " + binding);
ContactHeader header = null;
try {
header = getHeaderFactory().createContactHeader(
getAddressFactory().createAddress(binding.getContactAddress()));
} catch (ParseException e) {
log.error(e.getMessage(), e);
}
log.info("########## CONTACT HEADER: " + header);
if (header == null) { // entry expired
continue; // see if there are any more contacts...
}
Address na = header.getAddress();
log.info("isUserAvailable Address: " + na);
target = na.getURI();
break;
}
if (target == null) {
log.error("findLocalTarget: No contacts for " + addressOfRecord + " found.");
throw new SipSendErrorResponseException("User temporarily unavailable",
Response.TEMPORARILY_UNAVAILABLE);
}
}
return target;
}
Call is beeing forwarded in case user is not logged in - that is registrar
does not have binding for user AOR.
Forward operation is performed by means of SIP 3XX
response class. Example sends response with code 302 and backup address as contact.
It is done as follows:
protected Address forwardCall(javax.sip.RequestEvent event, ActivityContextInterface ac) {
Address toAddress = null;
Request request = event.getRequest();
try {
// Checking if the called user has any backup address
ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
String toURI = toHeader.getAddress().getURI().toString();
Address backupAddress = getBackupAddress(toURI);
if (backupAddress != null) {
// Checking whether the called user has any backup address.
toAddress = getAddressFactory().createAddress(backupAddress.toString());
// Notifying the caller that the call has to be redirected
ServerTransaction st = (ServerTransaction) ac.getActivity();
ContactHeader contactHeader = getHeaderFactory()
.createContactHeader(toAddress);
Response response = getMessageFactory().createResponse(
Response.MOVED_TEMPORARILY, request);
response.setHeader(contactHeader);
st.sendResponse(response);
log.info("########## REQUEST FORWARDED: " + contactHeader.toString());
// The Request-URI of the new request uses the value
// of the Contact header field in the response
}
} catch (ParseException e) {
log.error(e.getMessage(), e);
} catch (TransactionRequiredLocalException e) {
log.error(e.getMessage(), e);
} catch (SLEEException e) {
log.error(e.getMessage(), e);
} catch (SipException e) {
log.error(e.getMessage(), e);
} catch (InvalidArgumentException e) {
log.error(e.getMessage(), e);
}
return toAddress;
}
Call Forwarding SBB accesses examples profile in order to determine if callee has defined backup address. Its done in following way:
private Address getBackupAddress(String sipAddress) {
Address backupAddress = null;
CallControlProfileCMP profile = this.lookup(
new javax.slee.Address(AddressPlan.SIP, sipAddress));
if (profile != null) {
javax.slee.Address address = profile.getBackupAddress();
if (address != null) {
try {
backupAddress = getAddressFactory()
.createAddress(address.getAddressString());
} catch (ParseException e) {
log.error(e.getMessage(), e);
}
}
}
return backupAddress;
}
Descriptor contains following definitions:
sbb ID
profile reference by profile ID
sbb abstract class
child relation methods definition
custom ACI
ACI variable alias
event handler with initial event selector
resource adaptor binding
<sbb>
<description />
<sbb-name>CallForwardingSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
<sbb-ref>
<sbb-name>ProxySbb</sbb-name>
<sbb-vendor>mobicents</sbb-vendor>
<sbb-version>1.1</sbb-version>
<sbb-alias>JainSipProxySbb</sbb-alias>
</sbb-ref>
<sbb-ref>
<sbb-name>LocationSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>1.2</sbb-version>
<sbb-alias>LocationSbb</sbb-alias>
</sbb-ref>
<profile-spec-ref>
<profile-spec-name>CallControlProfileCMP</profile-spec-name>
<profile-spec-vendor>org.mobicents</profile-spec-vendor>
<profile-spec-version>0.1</profile-spec-version>
<profile-spec-alias>CallControlProfile</profile-spec-alias>
</profile-spec-ref>
<sbb-classes>
<sbb-abstract-class>
<sbb-abstract-class-name>
org.mobicents.slee.examples.callcontrol.forwarding.CallForwardingSbb
</sbb-abstract-class-name>
<cmp-field>
<cmp-field-name>locationSbbCMP</cmp-field-name>
</cmp-field>
<get-child-relation-method>
<sbb-alias-ref>JainSipProxySbb</sbb-alias-ref>
<get-child-relation-method-name>
getJainSipProxySbb
</get-child-relation-method-name>
<default-priority>0</default-priority>
</get-child-relation-method>
<get-child-relation-method>
<sbb-alias-ref>LocationSbb</sbb-alias-ref>
<get-child-relation-method-name>
getLocationSbbChildRelation
</get-child-relation-method-name>
<default-priority>0</default-priority>
</get-child-relation-method>
</sbb-abstract-class>
<sbb-activity-context-interface>
<sbb-activity-context-interface-name>
org.mobicents.slee.examples.callcontrol.forwarding.CallForwardingSbbActivityContextInterface
</sbb-activity-context-interface-name>
</sbb-activity-context-interface>
</sbb-classes>
<address-profile-spec-alias-ref>
CallControlProfile
</address-profile-spec-alias-ref>
<event event-direction="Receive" initial-event="True">
<event-name>Invite</event-name>
<event-type-ref>
<event-type-name>javax.sip.message.Request.INVITE</event-type-name>
<event-type-vendor>net.java.slee</event-type-vendor>
<event-type-version>1.2</event-type-version>
</event-type-ref>
<initial-event-selector-method-name>
callIDSelect
</initial-event-selector-method-name>
</event>
<activity-context-attribute-alias>
<attribute-alias-name>
inviteFilteredByCallBlocking
</attribute-alias-name>
<sbb-activity-context-attribute-name>
filteredByAncestor
</sbb-activity-context-attribute-name>
</activity-context-attribute-alias>
<activity-context-attribute-alias>
<attribute-alias-name>
inviteFilteredByCallForwarding
</attribute-alias-name>
<sbb-activity-context-attribute-name>
filteredByMe
</sbb-activity-context-attribute-name>
</activity-context-attribute-alias>
<resource-adaptor-type-binding>
<resource-adaptor-type-ref>
<resource-adaptor-type-name>
JAIN SIP
</resource-adaptor-type-name>
<resource-adaptor-type-vendor>
javax.sip
</resource-adaptor-type-vendor>
<resource-adaptor-type-version>
1.2
</resource-adaptor-type-version>
</resource-adaptor-type-ref>
<activity-context-interface-factory-name>
slee/resources/jainsip/1.2/acifactory
</activity-context-interface-factory-name>
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>
slee/resources/jainsip/1.2/provider
</resource-adaptor-object-name>
<resource-adaptor-entity-link>
SipRA
</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
</sbb>
Voice mail service illustrates usage of
MGCP
protocol to control
Media Server
.
It is capable of following:
setting up media session
receiving event notification from media server
play audio
record audio
Root class of this service is org.mobicents.slee.examples.callcontrol.forwarding.VoiceMailSbb
SIP are more complicated as they more complicated tasks including MGCP signaling and SDP negotiation.
VoiceMailSbb
defines two handlers for SIP.
INVITE event handler performs following tasks:
check if event has already been processed
determine if messages will be recorded or played
create dialog
determine if target user has enabled voice mail(subscribed), if not, terminate call
extract SDP from message and send MGCP CRCX reques. Request is sent with SDP to PR endpoint.
Handler is defined as follows:
public void onInvite(javax.sip.RequestEvent event,
VoiceMailSbbActivityContextInterface localAci) {
Response response;
log.info("########## VOICE MAIL SBB: INVITE ##########");
// Request
Request request = event.getRequest();
// Setting Request
this.setInviteRequest(request);
// Server Transaction
ServerTransaction st = event.getServerTransaction();
try {
if (localAci.getFilteredByAncestor()) {
log
.info("########## VOICE MAIL SBB: FILTERED BY ANCESTOR ##########");
return;
}
// if we are calling to vmail this means we want to check our mail
// box
// sameUser = true
boolean sameUser = sameUser(event);
URI uri;
if (sameUser) {
// The user is the caller
FromHeader fromHeader = (FromHeader) request
.getHeader(FromHeader.NAME);
uri = fromHeader.getAddress().getURI();
} else {
// The user is the callee - we are calling someone else
ToHeader toHeader = (ToHeader) request.getHeader(ToHeader.NAME);
uri = toHeader.getAddress().getURI();
}
// In the Profile Table the port is not used
((SipURI) uri).removePort();
// Responding to the user
// To know whether the user has the Voice mail service enabled
boolean isSubscriber = isSubscriber(uri.toString());
if (isSubscriber) {
// Formalities of sip, so we dont get retrans
// Attaching to SIP Dialog activity
Dialog dial = getSipFactoryProvider().getNewDialog(
(Transaction) st);
ActivityContextInterface dialogAci = sipACIF
.getActivityContextInterface((DialogActivity) dial);
// attach this SBB object to the Dialog activity to receive
// subsequent events on this Dialog
dialogAci.attach(this.getSbbLocalObject());
// Notify caller that we're TRYING to reach voice mail. Just a
// formality, we know we can go further than TRYING at this
// point
response = getMessageFactory().createResponse(Response.TRYING,
request);
st.sendResponse(response);
// RINGING. Another formality of the SIP protocol.
response = getMessageFactory().createResponse(Response.RINGING,
request);
st.sendResponse(response);
String sdp = new String(event.getRequest().getRawContent());
CallIdentifier callID = this.mgcpProvider
.getUniqueCallIdentifier();
// this is not requiered, but to be good MGCP citizen we will
// obey mgcp call id rule.
setCallIdentifier(callID);
EndpointIdentifier endpointID = new EndpointIdentifier(
PRE_ENDPOINT_NAME, mmsBindAddress + ":"
+ MGCP_PEER_PORT);
CreateConnection createConnection = new CreateConnection(this,
callID, endpointID, ConnectionMode.SendRecv);
try {
createConnection
.setRemoteConnectionDescriptor(new ConnectionDescriptor(
sdp));
} catch (ConflictingParameterException e) {
e.printStackTrace();
}
int txID = mgcpProvider.getUniqueTransactionHandler();
createConnection.setTransactionHandle(txID);
MgcpConnectionActivity connectionActivity = null;
try {
connectionActivity = mgcpProvider.getConnectionActivity(
txID, endpointID);
ActivityContextInterface epnAci = mgcpActivityContestInterfaceFactory
.getActivityContextInterface(connectionActivity);
epnAci.attach(getSbbContext().getSbbLocalObject());
} catch (FactoryException ex) {
ex.printStackTrace();
} catch (NullPointerException ex) {
ex.printStackTrace();
} catch (UnrecognizedActivityException ex) {
ex.printStackTrace();
}
mgcpProvider
.sendMgcpEvents(new JainMgcpEvent[] { createConnection });
log
.info("########## VOICE MAIL AVAILABLE FOR USER: sent PR CRCX request ##########");
} else {
// Voice Mail service disabled
response = getMessageFactory().createResponse(
Response.TEMPORARILY_UNAVAILABLE, request);
log.info("########## NO VOICE MAIL AVAILABLE FOR USER: "
+ uri.toString());
st.sendResponse(response);
}
} catch (TransactionRequiredLocalException e) {
log.error(e.getMessage(), e);
} catch (SLEEException e) {
log.error(e.getMessage(), e);
} catch (ParseException e) {
log.error(e.getMessage(), e);
} catch (SipException e) {
log.error(e.getMessage(), e);
} catch (InvalidArgumentException e) {
log.error(e.getMessage(), e);
} catch (NullPointerException e) {
log.error(e.getMessage(), e);
}
}
This event handler is different than INVITE
. It is triggered by event fired as in-Dialog event, that is
, its different class of events - indicated by different name, please refer to SIP Resource Adaptor Guide
.
BYE
event handler performs following tasks:
tear down media path
flush media buffer
free service
Handler is defined as follows:
public void onByeEvent(RequestEvent event, ActivityContextInterface aci) {
log.info("########## VOICE MAIL SBB: BYE ##########");
try {
releaseState();
// Sending the OK Response to the BYE Request received.
byeRequestOkResponse(event);
} catch (FactoryException e) {
log.error(e.getMessage(), e);
} catch (NullPointerException e) {
log.error(e.getMessage(), e);
}
}
For details on MGCP protocol please refer to:
mgcp-demo
documentation
MGCP RA documentation
This event is received as answer to CRCX request. Voice Mail
receives this in two cases:
media server acknowledges creation of connection to PR endpoint
media server acknowledges creation of connection between PR and IVR endpoints
It performs following task:
disconnect UA in case of failure and clear state of media server.
send OK(200) response to UA with SDP of PR endpoint connection please refer to Section 3.5, “Voice Mail Service” for overview of arrangement.
create connection between PR and IVR endpoints
start greeting playback if media path is estabilished
Handler is defined as follows:
public void onCreateConnectionResponse(CreateConnectionResponse event,
ActivityContextInterface aci) {
log.info("Receive CRCX response: " + event);
ReturnCode status = event.getReturnCode();
switch (status.getValue()) {
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY:
log.info("Connection created properly.");
break;
default:
ReturnCode rc = event.getReturnCode();
log.error("CRCX failed. Value = " + rc.getValue() + " Comment = "
+ rc.getComment());
sendServerError("Failed to create connection, code: "
+ event.getReturnCode(), Response.SERVER_INTERNAL_ERROR);
return;
}
boolean startMailMedia = false;
if (event.getSecondEndpointIdentifier() == null) {
// this is response for PR creation
// we have one connection activity, lets send another crcx
// send OK with sdp
DialogActivity da = getDialogActivity();
ServerTransaction txn = getServerTransaction();
if (txn == null) {
log.error("SIP activity lost, close RTP connection");
releaseState();
return;
}
Request request = txn.getRequest();
ContentTypeHeader contentType = null;
try {
contentType = getHeaderFactory().createContentTypeHeader("application", "sdp");
} catch (ParseException ex) {
}
String localAddress = getSipFactoryProvider().getListeningPoints()[0].getIPAddress();
int localPort = getSipFactoryProvider().getListeningPoints()[0].getPort();
javax.sip.address.Address contactAddress = null;
try {
contactAddress = getAddressFactory().createAddress(
"sip:" + localAddress + ":" + localPort);
} catch (ParseException ex) {
log.error(ex.getMessage(), ex);
}
ContactHeader contact = getHeaderFactory()
.createContactHeader(contactAddress);
Response response = null;
try {
response = getMessageFactory().createResponse(
Response.OK, request, contentType,
event.getLocalConnectionDescriptor().toString().getBytes());
} catch (ParseException ex) {
}
response.setHeader(contact);
try {
txn.sendResponse(response);
} catch (InvalidArgumentException ex) {
log.error(ex.getMessage(), ex);
} catch (SipException ex) {
log.error(ex.getMessage(), ex);
}
EndpointIdentifier endpointID = new EndpointIdentifier(
IVR_ENDPOINT_NAME, mmsBindAddress + ":" + MGCP_PEER_PORT);
CreateConnection createConnection = new CreateConnection(this,
getCallIdentifier(), endpointID, ConnectionMode.SendRecv);
int txID = mgcpProvider.getUniqueTransactionHandler();
createConnection.setTransactionHandle(txID);
// now set other end
try {
createConnection.setSecondEndpointIdentifier(event
.getSpecificEndpointIdentifier());
} catch (ConflictingParameterException e) {
e.printStackTrace();
}
MgcpConnectionActivity connectionActivity = null;
try {
connectionActivity = mgcpProvider.getConnectionActivity(txID,
endpointID);
ActivityContextInterface epnAci = mgcpActivityContestInterfaceFactory
.getActivityContextInterface(connectionActivity);
epnAci.attach(getSbbContext().getSbbLocalObject());
// epnAci.attach(getParentCmp());
} catch (FactoryException ex) {
ex.printStackTrace();
} catch (NullPointerException ex) {
ex.printStackTrace();
} catch (UnrecognizedActivityException ex) {
ex.printStackTrace();
}
mgcpProvider
.sendMgcpEvents(new JainMgcpEvent[] { createConnection });
} else {
// this is last
startMailMedia = true;
}
EndpointIdentifier eid = event.getSpecificEndpointIdentifier();
log.info("Creating endpoint activity on: " + eid);
MgcpEndpointActivity eActivity = mgcpProvider.getEndpointActivity(eid);
ActivityContextInterface eAci = mgcpActivityContestInterfaceFactory
.getActivityContextInterface(eActivity);
eAci.attach(this.getSbbContext().getSbbLocalObject());
if (startMailMedia) {
startMailMedia();
}
}
This event is received as response to notification request. It indicates result of signal request sent to media server.
It disconnect UA in case of failure.
Handler is defined as follows:
public void onNotificationRequestResponse(
NotificationRequestResponse event, ActivityContextInterface aci) {
ReturnCode status = event.getReturnCode();
switch (status.getValue()) {
case ReturnCode.TRANSACTION_EXECUTED_NORMALLY:
log.info("########## VOICE MAIL SBB: RQNT executed properly. TXID: "+event.getTransactionHandle()+" ##########");
break;
default:
ReturnCode rc = event.getReturnCode();
log.info("########## VOICE MAIL SBB: RQNT failed, terminating call. TXID: "+event.getTransactionHandle()+" ##########");
sendByeRequest();
break;
}
}
This event is received as result of requested notification - Voice Mail
requests to be notified on certain conditions.
Depending on observed event type, handler performs different action.
Handler is defined as follows:
public void onNotifyRequest(Notify event, ActivityContextInterface aci) {
NotifyResponse response = new NotifyResponse(event.getSource(),
ReturnCode.Transaction_Executed_Normally);
response.setTransactionHandle(event.getTransactionHandle());
log.info("########## VOICE MAIL SBB: Sending Notify response["+response+"] to ["+event+"]["+event.getTransactionHandle()+"] ["+response.getTransactionHandle()+"]##########");
mgcpProvider.sendMgcpEvents(new JainMgcpEvent[] { response });
EventName[] observedEvents = event.getObservedEvents();
for (EventName observedEvent : observedEvents) {
switch (observedEvent.getEventIdentifier().intValue()) {
case MgcpEvent.REPORT_ON_COMPLETION:
log.info("########## VOICE MAIL SBB: Signal completed, event identifier["+observedEvent.getEventIdentifier()+"] ##########");
if(observedEvent.getEventIdentifier().toString().equals("oc"))
{
onAnnouncementComplete();
}
break;
case MgcpEvent.REPORT_FAILURE:
log.info("########## VOICE MAIL SBB: Signal failed, event identifier["+observedEvent.getEventIdentifier()+"] ##########");
//releaseState();
sendByeRequest();
break;
case MgcpEvent.DTMF_1:
this.checkDtmfDigit("1");
break;
case MgcpEvent.DTMF_7:
this.checkDtmfDigit("7");
break;
case MgcpEvent.DTMF_9:
this.checkDtmfDigit("9");
break;
default:
log.info("########## VOICE MAIL SBB: Notify on unknown event, event identifier["+observedEvent.getEventIdentifier()+"]identifier["+observedEvent.getEventIdentifier().intValue()+"] ##########");
break;
}
}
}
VoiceMailSbb
sends request to media server in order to trigger media play or record. It also requests to be notified on certain events:
announcement completed
DTMF digit has been pressed
It sends MGCP Notification Request
with signals(play or record) to be applied and events to be detected.
Notification Request is built as follows:
public void sendRQNT(String audioFileUrl, boolean record, boolean detectDtmf) {
MgcpEndpointActivity endpointActivity = getEndpointActivity("IVR");
if (endpointActivity == null) {
// bad practice
throw new RuntimeException("There is no IVR endpoint activity");
}
MgcpConnectionActivity connectionActivity = getConnectionActivity(endpointActivity
.getEndpointIdentifier());
if (connectionActivity == null) {
// bad practice
throw new RuntimeException(
"There is no IVR connection activity");
}
EndpointIdentifier endpointID = endpointActivity
.getEndpointIdentifier();
ConnectionIdentifier connectionID = new ConnectionIdentifier(
connectionActivity.getConnectionIdentifier());
NotificationRequest notificationRequest = new NotificationRequest(this,
endpointID, mgcpProvider.getUniqueRequestIdentifier());
RequestedAction[] actions = new RequestedAction[] { RequestedAction.NotifyImmediately };
if (audioFileUrl != null) {
EventName[] signalRequests = null;
if (!record) {
signalRequests = new EventName[] { new EventName(
PackageName.Announcement, MgcpEvent.ann
.withParm(audioFileUrl),connectionID) };
} else {
signalRequests = new EventName[] { new EventName(AUPackage.AU,
AUMgcpEvent.aupr.withParm(audioFileUrl), connectionID) };
}
notificationRequest.setSignalRequests(signalRequests);
//add notification, in case dtmf part is not included
RequestedEvent[] requestedEvents = {
new RequestedEvent(new EventName(PackageName.Announcement
, MgcpEvent.oc,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Announcemen
t, MgcpEvent.of,connectionID), actions),
};
notificationRequest.setRequestedEvents(requestedEvents);
}
if (detectDtmf) {
// This has to be present, since MGCP states that new RQNT erases
// previous set.
RequestedEvent[] requestedEvents = {
new RequestedEvent(new EventName(PackageName.Announcement
, MgcpEvent.oc,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Announcement
, MgcpEvent.of,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf0,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf1,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf2,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf3,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf4,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf5,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf6,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf7,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf8,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmf9,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfA,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfB,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfC,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfD,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfStar,connectionID), actions),
new RequestedEvent(new EventName(PackageName.Dtmf,
MgcpEvent.dtmfHash,connectionID), actions) };
notificationRequest.setRequestedEvents(requestedEvents);
}
notificationRequest.setTransactionHandle(mgcpProvider
.getUniqueTransactionHandler());
NotifiedEntity notifiedEntity = new NotifiedEntity(JBOSS_BIND_ADDRESS,
JBOSS_BIND_ADDRESS, MGCP_PORT);
notificationRequest.setNotifiedEntity(notifiedEntity);
// we can send empty RQNT, that is clean all req.
mgcpProvider
.sendMgcpEvents(new JainMgcpEvent[] { notificationRequest });
log.info(" NotificationRequest sent: \n" + notificationRequest);
}
Voice Mail SBB accesses examples profile in order to determine if callee has subscription to voice mail service.
Its done in following way:
private boolean isSubscriber(String sipAddress) {
boolean state = false;
CallControlProfileCMP profile = lookup(new Address(AddressPlan.SIP,
sipAddress));
if (profile != null) {
state = profile.getVoicemailState();
}
return state;
}
Descriptor contains following definitions:
sbb ID
profile reference by profile ID
sbb abstract class
cmp fields definition
custom ACI
ACI variable alias
event handler for transactional INVITE
event handler for in-Dialog BYE
event handlers for MGCP events
SBB environment entries
resource adaptor bindings
<sbb>
<description />
<sbb-name>VoiceMailSbb</sbb-name>
<sbb-vendor>org.mobicents</sbb-vendor>
<sbb-version>0.1</sbb-version>
<profile-spec-ref>
<profile-spec-name>CallControlProfileCMP</profile-spec-name>
<profile-spec-vendor>org.mobicents</profile-spec-vendor>
<profile-spec-version>0.1</profile-spec-version>
<profile-spec-alias>CallControlProfile</profile-spec-alias>
</profile-spec-ref>
<sbb-classes>
<sbb-abstract-class>
<sbb-abstract-class-name>
org.mobicents.slee.examples.callcontrol.voicemail.VoiceMailSbb
</sbb-abstract-class-name>
<cmp-field>
<cmp-field-name>inviteRequest</cmp-field-name>
</cmp-field>
<cmp-field>
<cmp-field-name>callIdentifier</cmp-field-name>
</cmp-field>
<cmp-field>
<cmp-field-name>sameUser</cmp-field-name>
</cmp-field>
</sbb-abstract-class>
<sbb-activity-context-interface>
<sbb-activity-context-interface-name>
org.mobicents.slee.examples.callcontrol.voicemail.VoiceMailSbbActivityContextInterface
</sbb-activity-context-interface-name>
</sbb-activity-context-interface>
</sbb-classes>
<event event-direction="Receive" initial-event="True">
<event-name>Invite</event-name>
<event-type-ref>
<event-type-name>javax.sip.message.Request.INVITE</event-type-name>
<event-type-vendor>net.java.slee</event-type-vendor>
<event-type-version>1.2</event-type-version>
</event-type-ref>
<initial-event-selector-method-name>
callIDSelect
</initial-event-selector-method-name>
</event>
<event event-direction="Receive" initial-event="False">
<event-name>ByeEvent</event-name>
<event-type-ref>
<event-type-name>javax.sip.Dialog.BYE</event-type-name>
<event-type-vendor>net.java.slee</event-type-vendor>
<event-type-version>1.2</event-type-version>
</event-type-ref>
</event>
<!-- MGCP events -->
<event event-direction="Receive" initial-event="False">
<event-name>NotificationRequestResponse</event-name>
<event-type-ref>
<event-type-name>
net.java.slee.resource.mgcp.NOTIFICATION_REQUEST_RESPONSE
</event-type-name>
<event-type-vendor>net.java</event-type-vendor>
<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>
<event event-direction="Receive" initial-event="False">
<event-name>NotifyRequest</event-name>
<event-type-ref>
<event-type-name>
net.java.slee.resource.mgcp.NOTIFY
</event-type-name>
<event-type-vendor>net.java</event-type-vendor>
<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>
<event event-direction="Receive" initial-event="False">
<event-name>CreateConnectionResponse</event-name>
<event-type-ref>
<event-type-name>
net.java.slee.resource.mgcp.CREATE_CONNECTION_RESPONSE
</event-type-name>
<event-type-vendor>net.java</event-type-vendor>
<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>
<event event-direction="Receive" initial-event="False">
<event-name>ActivityEndEvent</event-name>
<event-type-ref>
<event-type-name>javax.slee.ActivityEndEvent</event-type-name>
<event-type-vendor>javax.slee</event-type-vendor>
<event-type-version>1.0</event-type-version>
</event-type-ref>
</event>
<activity-context-attribute-alias>
<attribute-alias-name>
inviteFilteredByCallForwarding
</attribute-alias-name>
<sbb-activity-context-attribute-name>
filteredByAncestor
</sbb-activity-context-attribute-name>
</activity-context-attribute-alias>
<env-entry>
<description>
This is the path where the recorded files will reside.
it is part of record/announce path. Full path is comined as follows:
${MOBICENTS_SLEE_EXAMPLE_CC2_RECORDINGS_HOME}/${filesRoute}.
</description>
<env-entry-name>filesRoute</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${files.route}</env-entry-value>
</env-entry>
<env-entry>
<description>This is the IP address of media server
to which MGCP requests are sent</description>
<env-entry-name>server.address</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${server.address}</env-entry-value>
</env-entry>
<resource-adaptor-type-binding>
<resource-adaptor-type-ref>
<resource-adaptor-type-name>
JAIN SIP
</resource-adaptor-type-name>
<resource-adaptor-type-vendor>
javax.sip
</resource-adaptor-type-vendor>
<resource-adaptor-type-version>
1.2
</resource-adaptor-type-version>
</resource-adaptor-type-ref>
<activity-context-interface-factory-name>
slee/resources/jainsip/1.2/acifactory
</activity-context-interface-factory-name>
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>
slee/resources/jainsip/1.2/provider
</resource-adaptor-object-name>
<resource-adaptor-entity-link>
SipRA
</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
<resource-adaptor-type-binding>
<resource-adaptor-type-ref>
<resource-adaptor-type-name>
jain-mgcp
</resource-adaptor-type-name>
<resource-adaptor-type-vendor>
net.java
</resource-adaptor-type-vendor>
<resource-adaptor-type-version>
2.0
</resource-adaptor-type-version>
</resource-adaptor-type-ref>
<activity-context-interface-factory-name>
slee/resources/jainmgcp/2.0/acifactory
</activity-context-interface-factory-name>
<resource-adaptor-entity-binding>
<resource-adaptor-object-name>
slee/resources/jainmgcp/2.0/provider
</resource-adaptor-object-name>
<resource-adaptor-entity-link>
MGCPRA
</resource-adaptor-entity-link>
</resource-adaptor-entity-binding>
</resource-adaptor-type-binding>
</sbb>