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


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).
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, toString, wait, wait, wait
 

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.

checkProvider

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