|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecthp.opencall.media.platform.connection.InternalCallSpec
hp.opencall.media.ccapi.CallSpec
hp.opencall.media.ccapi.SIPCallSpec
The SIPCallSpec allows the user to retrieve incoming SIP messages, and set the outgoing SIP messages.
The following example shows how to set and get the SIP messages.
Outgoing call sample:
sipOutSpec = new SIPCallSpec(toAddress, fromAddress);
// Create the SIP Message and set the required parameters.
SIPInviteIntf invite = (SIPInviteIntf)info.createSIPMsg(SIPInviteIntf.class) ;
invite.setTo("sip:conf-service@hp.com") ;
invite.setRequestURI("sip:conf-service@hp.com");
...
...
// Store this SIP Message to be used in SIP call Control
SIPInfo sipInfo = new SIPInfo();
sipInfo.putOutgoingDIPMsg(SIPInviteMsg.class, invite);
sipOutSpec.setSIPInfo(sipInfo) ;
Incoming call sample:
CallSpec inSpec = aCP.getTrunkLeg().getCallSpec();
// Checks that the call is an SIP call
if (inSpec.getCallSpecType() == CallSpec.SIP_CALLSPEC) {
// Cast can be done
SIPCallSpec sipInSpec = (SIPCallSpec) inSpec;
// Checks that the required information is available and retrieves it
if (sipInSpec.isSIPInfoPresent()) {
SIPInfo sipInfo = sipInSpec.getSIPInfo();
SIPInviteIntf invite = (SIPInviteIntf)sipInfo.getIncomingSIPMsg(SIPInviteIntf.class);
System.out.println("SIP Info method = "+invite);
}
}
| Nested Class Summary |
| Nested classes inherited from class hp.opencall.media.ccapi.CallSpec |
CallSpec.CallSpecType |
| Field Summary | |
static int |
SIP_CALLSPEC
|
| Fields inherited from class hp.opencall.media.platform.connection.InternalCallSpec |
defaultConnectionType |
| Constructor Summary | |
SIPCallSpec(Address to)
Deprecated. |
|
SIPCallSpec(Address to,
Address from)
Deprecated. |
|
SIPCallSpec(CallSpec userSpec)
|
|
SIPCallSpec(SignallingParty to)
Creates an SIPCallSpec with the specified called address. |
|
SIPCallSpec(SignallingParty to,
SignallingParty from)
Creates an SIPCallSpec with the specified called and calling addresses. |
|
| Method Summary | |
void |
cleanDummyCallSpec()
This method sets the Call Spec as a normal Call Spec |
int |
getCallSpecType()
Returns the CallSpec Type |
String |
getProtocolName()
return the procole name. |
String |
getProtocolVersion()
return the procole version. |
String |
getSANname()
Gets the SAN name (for outgoing calls routing). |
SIPInfo |
getSIPInfo()
Gets the SIPInfo. |
boolean |
isDummyCallSpec()
This method checks it's a valid call Spec or a dummy call Spec A dummy call spec can be only used in a SIP context. |
boolean |
isIncoming()
Returns the side from which call was originated |
boolean |
isSANnamePresent()
Checks if the SAN name has been set. |
boolean |
isSIPInfoPresent()
Checks if SIPInfo is available. |
void |
setDummyCallSpec()
This method sets the Call Spec as Dummy Call Spec A dummy call spec can be only used in a SIP context. |
void |
setIncoming()
|
void |
setSANname(String aSANname)
Sets the SAN name (for outgoing calls routing). |
void |
setSIPInfo(SIPInfo aSIPInfo)
Sets the SIPInfo. |
| Methods inherited from class hp.opencall.media.ccapi.CallSpec |
addRedirectElement, getCalledAddress, getCalledParty, getCallingAddress, getCallingParty, getOwnerServiceName, getRedirectElements, getRoutingInfo, setRoutingInfo, setUsedProvider, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface hp.opencall.media.ccapi.CallSpecInterface |
addRedirectElement, getCalledAddress, getCalledParty, getCallingAddress, getCallingParty, getRedirectElements, setUsedProvider |
| Field Detail |
public static final int SIP_CALLSPEC
| Constructor Detail |
public SIPCallSpec(Address to)
public SIPCallSpec(Address to,
Address from)
public SIPCallSpec(CallSpec userSpec)
userSpec - Retrofit from ISDNcallSpecpublic SIPCallSpec(SignallingParty to)
public SIPCallSpec(SignallingParty to,
SignallingParty from)
| Method Detail |
public int getCallSpecType()
getCallSpecType in interface CallSpecInterfacegetCallSpecType in class CallSpecpublic boolean isSIPInfoPresent()
isSIPInfoPresent in interface SIPCallSpecInterfacepublic SIPInfo getSIPInfo()
getSIPInfo in interface SIPCallSpecInterfacepublic void setSIPInfo(SIPInfo aSIPInfo)
setSIPInfo in interface SIPCallSpecInterfaceaSIPInfo - the SIPInfopublic void setSANname(String aSANname)
aSANname - the SAN namepublic boolean isSANnamePresent()
public String getSANname()
public boolean isDummyCallSpec()
public void cleanDummyCallSpec()
public void setDummyCallSpec()
public final boolean isIncoming()
CallSpecInterface
isIncoming in interface CallSpecInterfaceisIncoming in class CallSpecpublic void setIncoming()
public String getProtocolName()
CallSpecInterface
getProtocolName in interface CallSpecInterfacegetProtocolName in class CallSpecpublic String getProtocolVersion()
CallSpecInterface
getProtocolVersion in interface CallSpecInterfacegetProtocolVersion in class CallSpec
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||