hp.opencall.media.ccapi
Class IsupInfo

java.lang.Object
  extended byhp.opencall.media.ccapi.IsupInfo
All Implemented Interfaces:
SignallingInfo

public class IsupInfo
extends Object
implements SignallingInfo

All messages obtained thanks to the getIncomingIsupMsg method are freed automatically by the OCMP framework as soon as the call is released. try { CallSpec inSpec = origCP.getTrunkLeg().getCallSpec(); // Checks that the call is an ISDN call if (inSpec.getCallSpecType() == CallSpec.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()); } } } catch (Exception ex) { System.out.println("IAM.calledPartyNumber Exception : "+ex); }

Since:
OCMP 2.3

Constructor Summary
IsupInfo()
          =============== Constructors ==========
 
Method Summary
 void freeIncomingMsgsMemory()
          Deprecated. IsupMsg memory is handled by the JVM
 void freeMsgsMemory()
          Deprecated. IsupMsg memory is handled by the JVM
 void freeOutgoingMsgsMemory()
          Deprecated. IsupMsg memory is handled by the JVM
 IsupMsg getAndRemoveNextOutgoingMsg()
           
 IsupMsg getIncomingIsupMsg(Class isupMsgClass)
          Get an incoming ISUP message that has been stored.
 short getISUPMessageSetID(ISDNCallSpec aISDNCallSpec)
          Retrieves the messageset id from the stack
 IsupMsg getLastIncomingIsupMsg()
          Get the last received ISUP message.
 Object getLastIncomingMsg()
          Get the last received message.
 IsupMsg getOutgoingIsupMsg(Class isupMsgClass)
          Get a outgoing ISUP message that has been stored.
 boolean isUserManageMemory()
          Deprecated. IsupMsg memory is handled by the JVM
 void putIncomingIsupMsg(Class isupMsgClass, IsupMsg isupMsg)
          Store an incoming ISUP message.
 void putNextOutgoingMsg(IsupMsg aMsg)
           
 void putNextOutgoingMsg(Object aMsg)
          put the next outgoing signalling message to send through the signalling Leg.
 void putOutgoingIsupMsg(Class isupMsgClass, IsupMsg isupMsg)
          Store a outgoing ISUP message.
 void setUserManageMemory(boolean userManageMemoryFlag)
          Deprecated. IsupMsg memory is handled by the JVM
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsupInfo

public IsupInfo()
=============== Constructors ==========

Method Detail

setUserManageMemory

public void setUserManageMemory(boolean userManageMemoryFlag)
Deprecated. IsupMsg memory is handled by the JVM

=============== Methods =============== Set the message memory management type

Parameters:
userManageMemoryFlag - true if the user manage the memory (default value is false)

isUserManageMemory

public boolean isUserManageMemory()
Deprecated. IsupMsg memory is handled by the JVM

Check the message memory management type

Returns:
true if the user manage the memory

putIncomingIsupMsg

public void putIncomingIsupMsg(Class isupMsgClass,
                               IsupMsg isupMsg)
Store an incoming ISUP message. Example: putIncomingIsupMsg(IsupIam.class, isupIamMsg);

Parameters:
isupMsgClass - The ISUP message class (e.g. IsupIam.class, etc.)
isupMsg - The ISUP message instance

getIncomingIsupMsg

public IsupMsg getIncomingIsupMsg(Class isupMsgClass)
Get an incoming ISUP message that has been stored. This method remove the IsupMsg from the incoming messages table

Parameters:
isupMsgClass - The ISUP message class (e.g. IsupIam.class, etc.)
Returns:
The ISUP message instance corresponding to the specified class

putOutgoingIsupMsg

public void putOutgoingIsupMsg(Class isupMsgClass,
                               IsupMsg isupMsg)
Store a outgoing ISUP message.

Parameters:
isupMsgClass - The ISUP message class (e.g. IsupIam.class, etc.)
isupMsg - The ISUP message instance

getOutgoingIsupMsg

public IsupMsg getOutgoingIsupMsg(Class isupMsgClass)
Get a outgoing ISUP message that has been stored.

Parameters:
isupMsgClass - The ISUP message class (e.g. IsupIam.class, etc.)
Returns:
The ISUP message instance corresponding to the specified class

freeMsgsMemory

public void freeMsgsMemory()
Deprecated. IsupMsg memory is handled by the JVM

Free the messages memory by calling freeIncomingMsgsMemory() and freeOutgoingMsgsMemory(). Called by the internal framework only


freeIncomingMsgsMemory

public void freeIncomingMsgsMemory()
Deprecated. IsupMsg memory is handled by the JVM

Free the incoming messages memory if not in user manage memory mode or if the message has not been got by the user. Called by the internal framework only


freeOutgoingMsgsMemory

public void freeOutgoingMsgsMemory()
Deprecated. IsupMsg memory is handled by the JVM

Free the outgoing messages memory if not in user manage memory mode. Called by the internal framework only


getISUPMessageSetID

public short getISUPMessageSetID(ISDNCallSpec aISDNCallSpec)
                          throws AccessControlException
Retrieves the messageset id from the stack

Parameters:
aISDNCallSpec -
Returns:
short
Throws:
AccessControlException

getLastIncomingIsupMsg

public IsupMsg getLastIncomingIsupMsg()
                               throws Exception
Get the last received ISUP message. This method will return an ISUP message - either following a notification on the TrunkLegEventLitener. A-----CPG--->OCMP----->TrunkLegEventListener.onEvent() IsupCpg myCpg = (IsupCpg)IsupInfo.getLastIncommingMsg() - or the last IAM/ACM/etc that just arrived NOTE: once called, the "latest received message" slot will be emptied, so any subsequent call to this method will return null until a new message is received.

Returns:
com.hp.opencall.isup.message.IsupMsg
Throws:
Exception

getLastIncomingMsg

public Object getLastIncomingMsg()
Get the last received message. NOTE: once called, the "latest received message" slot will be emptied, so any subsequent call to this method will return null until a new message is received.

Specified by:
getLastIncomingMsg in interface SignallingInfo
Returns:
Object

putNextOutgoingMsg

public void putNextOutgoingMsg(IsupMsg aMsg)
                        throws Exception
Parameters:
aMsg - the Isup Msg to send through thew oriTrubkLeg.sendMessage() Supported message are : CPG, FAC, FAR, FAA, FRJ, INR, INF
Throws:
Exception - thrown if aMsg is not a supported msg

putNextOutgoingMsg

public void putNextOutgoingMsg(Object aMsg)
                        throws Exception
Description copied from interface: SignallingInfo
put the next outgoing signalling message to send through the signalling Leg. Object should be a valid Msg regarding the signalling type of the Leg. For ISUP, aMsg must be An IsupMsg.

Specified by:
putNextOutgoingMsg in interface SignallingInfo
Parameters:
aMsg - the Isup Msg to send through thew oriTrubkLeg.sendMessage() Supported message are : CPG, FAC, FAR, FAA, FRJ, INR, INF
Throws:
Exception - thrown if aMsg is not a supported msg

getAndRemoveNextOutgoingMsg

public IsupMsg getAndRemoveNextOutgoingMsg()
                                    throws Exception
Throws:
Exception