|
|||||||||||
| 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.ISDNCallSpec
An ISDNCallSpec object stores the ISDN call specifications :
- the addresses, i.e. the calling and the called address - the Circuit Identifier Code (CIC) used by the call - the Destination Point Code (DPC) of the call - the II Digits in ANSI mode - the Original Called Number when a call is redirected - the Call Reference - the incoming and outgoing ISUP messages, including IAM, ACM, ANM/CON, and REL
In the following samples, the ISDNCallSpec is used in order to set the ISDN IIDigits of an outgoing call or to get the CIC, DPC and IIDigits used to deliver a call.
Outgoing call sample:
isdnOutSpec = new ISDNCallSpec(toAddress, fromAddress);
isdnOutSpec.setIIDigits(ISDNCallSpec.IIDigits.TELCO_OPERATOR);
...
public void trunkLegStateChange(int aNewState) {
...
switch (aNewState) {
case TrunkLeg.CONNECTED:
// Checks that the required information is available and retrieves it
if (isdnOutSpec.isCICPresent()) {
System.out.println("isdnOutSpec: CIC = "+isdnOutSpec.getCIC());
}
if (isdnOutSpec.isDPCPresent()) {
System.out.println("isdnOutSpec: DPC = "+isdnOutSpec.getDPC());
}
break;
...
}
Incoming call sample:
CallSpec inSpec = aCP.getTrunkLeg().getCallSpec();
// Checks that the call is an ISDN call
if (inSpec.getCallSpecType() == CallSpecType.ISDN_CALLSPEC) {
// Cast can be done
ISDNCallSpec isdnInSpec = (ISDNCallSpec) inSpec;
// Checks that the required information is available and retrieves it
if (isdnInSpec.isCICPresent()) {
System.out.println("isdnInSpec: CIC = "+isdnInSpec.getCIC());
}
if (isdnInSpec.isDPCPresent()) {
System.out.println("isdnInSpec: DPC = "+isdnInSpec.getDPC());
}
if (isdnInSpec.isIIDigitsPresent()) {
System.out.println("isdnInSpec: IIDigits ="+isdnInSpec.getIIDigits());
}
if (isdnInSpec.isOriginalCalledNumberPresent()) {
System.out.println("isdnInSpec: OriginalCalledNumber
="+isdnInSpec.getOriginalCalledNumber());
}
if (isdnInSpec.isCallReferencePresent()) {
System.out.println("isdnInSpec: CallReference
="+isdnInSpec.getCallReference());
}
}
if (isdnInSpec.isCalledPartyNumberBytesPresent()) {
System.out.println("isdnInSpec: CalledPartyNumberBytes
="+isdnInSpec.getCalledPartyNumberBytes());
}
}
The ISDNCallSpec also allows the user to retrieve incoming ISUP messages, and set the outgoing ISUP messages. Supported messages are IAM, ACM, CON, ANM, and REL. The user can also set the DPC on which to carry the call. This is useful for Local Number Portability, where the DPC associated with a called number can change. The messages are the actual objects described in HP Opencall ISUP Application Developers Guide, but accessed via JNI in Java.
The following example shows how to set and get the ISUP messages, and how to set the DPC for an outgoing call.
Outgoing call sample:
isdnOutSpec = new ISDNCallSpec(toAddress, fromAddress);
// Create IAM message and set the required parameters
IsupIam iamMsg = new IsupIam((short) 0); // Need to import
com.hp.opencall.isup.message.*;
ParmValue parmValue = new ParmValue(); // Need to import
com.hp.opencall.isup.common.ParmValue;
parmValue.assign("80x90xa2x", 3); // Fill in all the required IAM
parameters
isupIam.userServiceInformation(parmValue);
parmValue.assign("22x00x", 2);
isupIam.forwardCallIndicators(parmValue);
parmValue.assign("00x", 1);
isupIam.natureOfCnxIndicators(parmValue);
parmValue.assign("81x10x88x77x66xf5x", 6);
isupIam.calledPartyNumber(parmValue); // Called number is 8877665
parmValue.assign("0ax", 1);
isupIam.callingPartysCategory(parmValue);
// Store this IAM to be used in ISUP call control
IsupInfo isupInfo = new IsupInfo();
isupInfo.putOutgoingIsupMsg(IsupIam.class, iamMsg);
// Set the DPC to which to send the call
isdnOutSpec.setDPC(20); // set DPC to 20
...
Incoming call sample:
CallSpec inSpec = aCP.getTrunkLeg().getCallSpec();
// Checks that the call is an ISDN call
if (inSpec.getCallSpecType() == CallSpecType.ISDN_CALLSPEC) {
// Cast can be done
ISDNCallSpec isdnInSpec = (ISDNCallSpec) inSpec;
// Checks that the required information is available and retrieves it
if (isdnInSpec.isIsupInfoPresent()) {
IsupInfo isupInfo = isdnInSpec.getIsupInfo();
IsupIam iamMsg = (IsupIam) isupInfo.getIncomingIsupMsg(IsupIam.class);
System.out.println("IAM.calledPartyNumber = " + iamMsg.calledPartyNumber());
}
}
| Nested Class Summary | |
class |
ISDNCallSpec.IIDigits
II Digits values The IIDigits class supplies the current IIDigits values used in ANSI mode |
| Nested classes inherited from class hp.opencall.media.ccapi.CallSpec |
CallSpec.CallSpecType |
| Field Summary |
| Fields inherited from class hp.opencall.media.platform.connection.InternalCallSpec |
defaultConnectionType |
| Constructor Summary | |
ISDNCallSpec(Address to)
Deprecated. use ISDNCallSpec(ISDNSignallingParty to) instead |
|
ISDNCallSpec(Address to,
Address from)
Deprecated. use ISDNCallSpec(ISDNSignallingParty to,
ISDNSignallingParty from) instead |
|
ISDNCallSpec(CallSpec userSpec)
|
|
ISDNCallSpec(ISDNSignallingParty to)
Creates a CallSpec with the specified ISDN called (DNIS) party. |
|
ISDNCallSpec(ISDNSignallingParty to,
ISDNSignallingParty from)
Creates a CallSpec with the specified ISDN called (DNIS) and calling (ANI) parties. |
|
| Method Summary | |
void |
addISDNRedirectElement(ISDNRedirectElement anElement)
Add an ISDN call redirection path. |
void |
addRedirectElement(RedirectElement anElement)
Add call redirection path. |
void |
freeIsupInfoMsg()
Deprecated. IsupMsg memory is handled by the JVM |
byte[] |
getCalledPartyNumberBytes()
Gets CalledPartyNumberBytes. |
byte[] |
getCallReference()
Gets the Call Reference. |
int |
getCallSpecType()
Returns the CallSpec Type |
int |
getCIC()
Gets the Circuit Identifier Code (CIC). |
long |
getDPC()
Gets the Destination Point Code (DPC). |
int |
getIIDigits()
Gets the II Digits. |
ISDNSignallingParty |
getISDNCalledParty()
ISDN Called party accessor (DNIS) |
ISDNSignallingParty |
getISDNCallingParty()
ISDN Calling party accessor (ANI) OR null if the calling address is not specified in the call associated to this CallSpec |
ISDNRedirectElement[] |
getISDNRedirectElements()
Gives access to the redirection paths. |
IsupInfo |
getIsupInfo()
Gets the IsupInfo. |
E164Address |
getOriginalCalledNumber()
Deprecated. use CallSpec.getRedirectElements()[0] instead |
String |
getProtocolName()
return the procole name. |
String |
getProtocolVersion()
return the procole version. |
Q850Cause |
getQ850Cause()
Get the last received Q850 cause |
char |
getServiceType()
|
boolean |
isCalledPartyNumberBytesPresent()
Checks if CalledPartyNumberBytes is known. |
boolean |
isCallReferencePresent()
Checks if the Call Reference is known. |
boolean |
isCICPresent()
Checks if the Circuit Identifier Code is known. |
boolean |
isDPCPresent()
Checks if the Destination Point Code is known. |
boolean |
isIIDigitsPresent()
Checks if the II Digits are knowns. |
boolean |
isIncoming()
(non-Javadoc) |
boolean |
isIsupInfoPresent()
Checks if IsupInfo is available. |
boolean |
isOriginalCalledNumberPresent()
Checks if the Original Called Number is known. |
void |
setCalledPartyNumberBytes(byte[] someCalledPartyNumberBytes)
Sets CalledPartyNumberBytes. |
void |
setCallReference(byte[] aCallReference)
Sets the Call Reference. |
void |
setDPC(long adpc)
Sets the Destination Point Code (DPC) for an outgoing call. |
void |
setIIDigits(int aIIDigits)
Sets the II Digits. |
void |
setIsupInfo(IsupInfo aIsupInfo)
Sets the IsupInfo. |
void |
setOriginalCalledNumber(E164Address aOriginalCalledNumber)
Deprecated. use addRedirectElement(hp.opencall.media.ccapi.RedirectElement)when CallSpec.getRedirectElements().isEmpty == true instead |
void |
setQ850Cause(Q850Cause aCause)
Set the Q850 cause to use for the next ISDN message |
void |
setServiceType(char stype)
|
String |
toString()
|
| Methods inherited from class hp.opencall.media.ccapi.CallSpec |
getCalledAddress, getCalledParty, getCallingAddress, getCallingParty, getOwnerServiceName, getRedirectElements, getRoutingInfo, setRoutingInfo, setUsedProvider |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface hp.opencall.media.ccapi.CallSpecInterface |
getCalledAddress, getCalledParty, getCallingAddress, getCallingParty, getRedirectElements, setUsedProvider |
| Constructor Detail |
public ISDNCallSpec(ISDNSignallingParty to,
ISDNSignallingParty from)
to - ISDN called party (DNIS)from - ISDN calling party (ANI)public ISDNCallSpec(ISDNSignallingParty to)
to - ISDN called party (DNIS)public ISDNCallSpec(CallSpec userSpec)
userSpec -
public ISDNCallSpec(Address to,
Address from)
ISDNCallSpec(ISDNSignallingParty to,
ISDNSignallingParty from) instead
to - from - public ISDNCallSpec(Address to)
ISDNCallSpec(ISDNSignallingParty to) instead
to - | Method Detail |
public String getProtocolName()
CallSpecInterface
getProtocolName in interface CallSpecInterfacegetProtocolName in class CallSpecpublic String getProtocolVersion()
CallSpecInterface
getProtocolVersion in interface CallSpecInterfacegetProtocolVersion in class CallSpecpublic boolean isCICPresent()
isCICPresent in interface ISDNCallSpecInterfacepublic int getCIC()
getCIC in interface ISDNCallSpecInterfacepublic boolean isDPCPresent()
isDPCPresent in interface ISDNCallSpecInterfacepublic long getDPC()
getDPC in interface ISDNCallSpecInterfacepublic void setDPC(long adpc)
setDPC in interface ISDNCallSpecInterfaceadpc - public boolean isIIDigitsPresent()
isIIDigitsPresent in interface ISDNCallSpecInterfacepublic int getIIDigits()
getIIDigits in interface ISDNCallSpecInterfacepublic void setIIDigits(int aIIDigits)
setIIDigits in interface ISDNCallSpecInterfaceaIIDigits - the II Digits.public int getCallSpecType()
getCallSpecType in interface CallSpecInterfacegetCallSpecType in class CallSpecpublic boolean isOriginalCalledNumberPresent()
isOriginalCalledNumberPresent in interface ISDNCallSpecInterfacepublic E164Address getOriginalCalledNumber()
CallSpec.getRedirectElements()[0] instead
getOriginalCalledNumber in interface ISDNCallSpecInterfacepublic void setOriginalCalledNumber(E164Address aOriginalCalledNumber)
addRedirectElement(hp.opencall.media.ccapi.RedirectElement)when CallSpec.getRedirectElements().isEmpty == true instead
setOriginalCalledNumber in interface ISDNCallSpecInterfaceaOriginalCalledNumber - the Original Called Number to indicate that the
call is redirected.public boolean isCallReferencePresent()
isCallReferencePresent in interface ISDNCallSpecInterfacepublic byte[] getCallReference()
getCallReference in interface ISDNCallSpecInterfacepublic void setCallReference(byte[] aCallReference)
setCallReference in interface ISDNCallSpecInterfaceaCallReference - the Call Reference.public boolean isIsupInfoPresent()
isIsupInfoPresent in interface ISDNCallSpecInterfacepublic void freeIsupInfoMsg()
freeIsupInfoMsg in interface ISDNCallSpecInterfacepublic boolean isCalledPartyNumberBytesPresent()
isCalledPartyNumberBytesPresent in interface ISDNCallSpecInterfacepublic byte[] getCalledPartyNumberBytes()
getCalledPartyNumberBytes in interface ISDNCallSpecInterfacepublic void setCalledPartyNumberBytes(byte[] someCalledPartyNumberBytes)
setCalledPartyNumberBytes in interface ISDNCallSpecInterfacesomeCalledPartyNumberBytes - the CalledPartyNumberBytes.public final boolean isIncoming()
isIncoming in interface CallSpecInterfaceisIncoming in class CallSpecCallSpecInterface.isIncoming()public IsupInfo getIsupInfo()
getIsupInfo in interface ISDNCallSpecInterfacepublic void setIsupInfo(IsupInfo aIsupInfo)
setIsupInfo in interface ISDNCallSpecInterfaceaIsupInfo - the IsupInfopublic ISDNSignallingParty getISDNCalledParty()
ISDNCallSpecInterface
getISDNCalledParty in interface ISDNCallSpecInterfacepublic ISDNRedirectElement[] getISDNRedirectElements()
getISDNRedirectElements in interface ISDNCallSpecInterfacepublic void addRedirectElement(RedirectElement anElement)
addRedirectElement in interface CallSpecInterfaceaddRedirectElement in class CallSpecanElement - public void addISDNRedirectElement(ISDNRedirectElement anElement)
addISDNRedirectElement in interface ISDNCallSpecInterfaceanElement - public ISDNSignallingParty getISDNCallingParty()
getISDNCallingParty in interface ISDNCallSpecInterfacepublic Q850Cause getQ850Cause()
getQ850Cause in interface ISDNCallSpecInterfacepublic char getServiceType()
public void setQ850Cause(Q850Cause aCause)
setQ850Cause in interface ISDNCallSpecInterfaceaCause - public void setServiceType(char stype)
public String toString()
toString in class CallSpec
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||