cnrg.itx.gtwy.pbx
Class PBXSignaling

java.lang.Object
  |
  +--cnrg.itx.gtwy.pbx.PBXSignaling

public class PBXSignaling
extends java.lang.Object

The Signaling Component that controls the PBX. This component only handles calls to the Telephone Network There is one PBXSignaling object per PBXSignalingServer object.


Field Summary
private  boolean LOG
           
private static int MAXLINES
           
private static java.lang.String ME
           
private  JtapiHandler myJtapiHandler
           
private  java.util.Vector theCallsInProgressVector
           
 
Constructor Summary
PBXSignaling(boolean log_option, java.lang.String l, java.lang.String p)
          Creates a PBXSignaling object and gets a provider
 
Method Summary
 boolean checkProvider()
          This method just checks that our provider hasn't quit on us
protected  javax.telephony.Provider getProvider()
          This method returns our Jtapi Provider, which is non-null
protected  void handleDialInvite(cnrg.itx.signal.InvitePacket sp, java.net.Socket gateSocket)
          method handles a Dial INVITE packet.
protected  void handleHangupInvite(cnrg.itx.signal.InvitePacket sp)
          This method handles a Hangup request (SigPacket.isHangup() true).
private  void hangupThisLine(int m)
          This is a utility method to stop the Dialer calling from a given gateway line.
protected  void stopDialers()
          This method is called when PBX Signaling is being shut down.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ME

private static final java.lang.String ME

LOG

private boolean LOG

myJtapiHandler

private JtapiHandler myJtapiHandler

MAXLINES

private static final int MAXLINES

theCallsInProgressVector

private java.util.Vector theCallsInProgressVector
Constructor Detail

PBXSignaling

public PBXSignaling(boolean log_option,
                    java.lang.String l,
                    java.lang.String p)
             throws PBXSignalingException
Creates a PBXSignaling object and gets a provider
Parameters:
log_option - true for logging to sysout
l - To authenticate with Tserver
p - To authenticate with Tserver
Throws:
PBXSignalingException - means we could not get a Provider
Method Detail

getProvider

protected javax.telephony.Provider getProvider()
This method returns our Jtapi Provider, which is non-null

handleDialInvite

protected void handleDialInvite(cnrg.itx.signal.InvitePacket sp,
                                java.net.Socket gateSocket)
                         throws PBXSignalingException
method handles a Dial INVITE packet. The InivtePacket contains the telephone number we are to dial, as well as the Gateway line being used to dial that.
Parameters:
sp - the InvitePacket
gateSocket - - the socket over which this invitePacket came in This is null if we are running STANDALONE
Throws:
PBXSignalingException - is thrown if Dialer can't be made or if the PBX Provider died and cannot be resuscitated

handleHangupInvite

protected void handleHangupInvite(cnrg.itx.signal.InvitePacket sp)
This method handles a Hangup request (SigPacket.isHangup() true).
Parameters:
sp - InvitePacket containing the HANGUP request

stopDialers

protected void stopDialers()
This method is called when PBX Signaling is being shut down.

hangupThisLine

private void hangupThisLine(int m)
This is a utility method to stop the Dialer calling from a given gateway line.
Parameters:
m - a Line ID

checkProvider

public boolean checkProvider()
This method just checks that our provider hasn't quit on us