Exemplo n.º 1
0
 def __init__(self):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self,
                          SCCPMessageType.RegisterAvailableLinesMessage)
     self.nboflines = 1
Exemplo n.º 2
0
 def __init__(self, event, line=0, callId=0):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self, SCCPMessageType.SoftKeyEventMessage)
     self.event = event
     self.line = line
     self.callId = callId
Exemplo n.º 3
0
 def __init__(self,event,line=0,callId=0):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self, SCCPMessageType.SoftKeyEventMessage)
     self.event=event
     self.line=line
     self.callId=callId
Exemplo n.º 4
0
 def __init__(self):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self, SCCPMessageType.CapabilitiesResMessage)
     self.capCount=3
     self.payLoads="\x19\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
     self.payLoads=self.payLoads+"\x04\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
     self.payLoads=self.payLoads+"\x02\x00\x00\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
Exemplo n.º 5
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.DefineTimeDate)
     self.year=0
     self.month=0
     self.dayOfWeek=0
     self.day=0
     self.hour=99
     self.minute=99
     self.seconds=99
     self.milliseconds=99
     self.timestamp=0
Exemplo n.º 6
0
 def __init__(self, deviceName, ipAddress):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self, SCCPMessageType.RegisterMessage)
     self.deviceName = deviceName
     self.ipAddress = IpAddress(ipAddress)
     self.stationUserId = self.STATION_USERID
     self.stationInstance = self.STATION_INSTANCE
     self.deviceType = self.TelecasterBus
     self.maxStreams = self.MAXSTREAMS
Exemplo n.º 7
0
 def __init__(self, deviceName, ipAddress):
     """
     Constructor
     """
     SCCPMessage.__init__(self, SCCPMessageType.RegisterMessage)
     self.deviceName = deviceName
     self.ipAddress = IpAddress(ipAddress)
     self.stationUserId = self.STATION_USERID
     self.stationInstance = self.STATION_INSTANCE
     self.deviceType = self.TelecasterBus
     self.maxStreams = self.MAXSTREAMS
Exemplo n.º 8
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.DefineTimeDate)
     self.year = 0
     self.month = 0
     self.dayOfWeek = 0
     self.day = 0
     self.hour = 99
     self.minute = 99
     self.seconds = 99
     self.milliseconds = 99
     self.timestamp = 0
Exemplo n.º 9
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("I",self.channelStatus)
     strPack = strPack + self.ipAddress.pack()
     strPack = strPack + pack("I",self.portNumber)
     strPack = strPack + pack("I",self.passThruPartyId)
     return strPack
Exemplo n.º 10
0
    def testOnKeepAliveTimer(self):
        networkClient = Mock()
        self.sccpPhone.client = networkClient
        keepaliveMessage = SCCPMessage(SCCPMessageType.KeepAliveMessage)

        self.sccpPhone.onKeepAliveTimer()
        networkClient.sendSccpMessage.assert_called_with(keepaliveMessage)
Exemplo n.º 11
0
 def pack(self):
     strPack = SCCPMessage.pack(self) + self.deviceName + "\x00"
     strPack = strPack + pack("II", self.stationUserId, self.stationInstance)
     strPack = strPack + self.ipAddress.pack()
     strPack = strPack + pack("III", self.deviceType, self.maxStreams, 0)
     strPack = strPack + "\x0B" + "\x00" + "\x60" + "\x85"
     strPack = strPack + pack("IIII", 0, 0, 0, 0)
     return strPack
Exemplo n.º 12
0
 def __eq__(self,other):
     if (self.event != other.event):
         return False
     if (self.line != other.line):
         return False
     if (self.callId != other.callId):
         return False
     return SCCPMessage.__eq__(self, other)
Exemplo n.º 13
0
 def __eq__(self, other):
     if (self.event != other.event):
         return False
     if (self.line != other.line):
         return False
     if (self.callId != other.callId):
         return False
     return SCCPMessage.__eq__(self, other)
Exemplo n.º 14
0
 def pack(self):
     strPack = SCCPMessage.pack(self) + self.deviceName + "\x00"
     strPack = strPack + pack("II", self.stationUserId,
                              self.stationInstance)
     strPack = strPack + self.ipAddress.pack()
     strPack = strPack + pack("III", self.deviceType, self.maxStreams, 0)
     strPack = strPack + '\x0B' + '\x00' + '\x60' + '\x85'
     strPack = strPack + pack('IIII', 0, 0, 0, 0)
     return strPack
 def testHandleUnknownMessage(self):
     message = SCCPMessage(0xFFFF)
     self.clientFactory.handleUnknownMessage(self.handleUnknown)
     self.clientFactory.handleMessage(message)
     self.assertTrue(self.unkown)
     self.assertEquals(0xFFFF, self.lastMessageTypeReceived)
Exemplo n.º 16
0
 def __init__(self,line):
     SCCPMessage.__init__(self, SCCPMessageType.LineStatReqMessage)
     self.line = line
Exemplo n.º 17
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("L",self.capCount)
     strPack = strPack + self.payLoads
     return strPack
Exemplo n.º 18
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.LineStatMessage)
     self.line=0
     self.dirNumber = ""
Exemplo n.º 19
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.SelectSoftKeysMessage)
Exemplo n.º 20
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.StartToneMessage)
Exemplo n.º 21
0
 def __init__(self, channelStatus, ipAddress, portNumber, passThruPartyId):
     SCCPMessage.__init__(self, SCCPMessageType.OpenReceiveChannelAck)
     self.channelStatus = channelStatus
     self.ipAddress = IpAddress(ipAddress)
     self.portNumber = portNumber
     self.passThruPartyId = passThruPartyId
Exemplo n.º 22
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.ActivateCallPlaneMessage)
Exemplo n.º 23
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.OpenReceiveChannel)
     self.echoCancelType = 0
     self.bitRate = 0
Exemplo n.º 24
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.DisplayPromptStatusMessage)
Exemplo n.º 25
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.TimeDateReqMessage)
Exemplo n.º 26
0
 def testSendSccpMessage(self):
     message = SCCPMessage(SCCPMessageType.ButtonTemplateReqMessage)
     networkClient = Mock()
     self.clientFactory.client=networkClient
     self.clientFactory.sendSccpMessage(message)
     networkClient.sendString.assert_called_with(message.pack())
Exemplo n.º 27
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.ButtonTemplateReqMessage)
Exemplo n.º 28
0
 def __eq__(self,other):
     return SCCPMessage.__eq__(self, other) and self.button == other.button 
Exemplo n.º 29
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.KeepAliveAckMessage)
Exemplo n.º 30
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.CallStateMessage)
     self.line = 0
     self.callState = self.SCCP_CHANNELSTATE_DOWN
     self.callId = 0
Exemplo n.º 31
0
 def __init__(self):
     '''
     Constructor
     '''
     SCCPMessage.__init__(self, SCCPMessageType.RegisterAvailableLinesMessage)
     self.nboflines=1
Exemplo n.º 32
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("I", self.event)
     strPack = strPack + pack("I", self.line)
     strPack = strPack + pack("I", self.callId)
     return strPack
Exemplo n.º 33
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.LineStatMessage)
     self.line = 0
     self.dirNumber = ""
Exemplo n.º 34
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.TimeDateReqMessage)
Exemplo n.º 35
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("I",self.event)
     strPack = strPack + pack("I",self.line)
     strPack = strPack + pack("I",self.callId)
     return strPack
Exemplo n.º 36
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.CallStateMessage)
     self.line = 0
     self.callState = self.SCCP_CHANNELSTATE_DOWN
     self.callId = 0
Exemplo n.º 37
0
 def onKeepAliveTimer(self):
     self.log('on keep alive')
     message = SCCPMessage(SCCPMessageType.KeepAliveMessage)
     self.client.sendSccpMessage(message)
Exemplo n.º 38
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.RegisterAckMessage)
     self.keepAliveInterval = 50
     self.dateTemplate = ""
     self.secondaryKeepAliveInterval=32
Exemplo n.º 39
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("L", self.button)
     return strPack
Exemplo n.º 40
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("L",self.line)
     return strPack
Exemplo n.º 41
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.RegisterAckMessage)
     self.keepAliveInterval = 50
     self.dateTemplate = ""
     self.secondaryKeepAliveInterval = 32
 def testSendSccpMessage(self):
     message = SCCPMessage(SCCPMessageType.ButtonTemplateReqMessage)
     networkClient = Mock()
     self.clientFactory.client = networkClient
     self.clientFactory.sendSccpMessage(message)
     networkClient.sendString.assert_called_with(message.pack())
Exemplo n.º 43
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.KeepAliveAckMessage)
Exemplo n.º 44
0
 def __init__(self,button):
     SCCPMessage.__init__(self, SCCPMessageType.KeypadButtonMessage)
     self.button = button
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.CapabilitiesReqMessage)
Exemplo n.º 46
0
 def pack(self):
     strPack = SCCPMessage.pack(self)
     strPack = strPack + pack("L",self.button)
     return strPack
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.ButtonTemplateReqMessage)
Exemplo n.º 48
0
 def __init__(self, button):
     SCCPMessage.__init__(self, SCCPMessageType.KeypadButtonMessage)
     self.button = button
Exemplo n.º 49
0
 def __init__(self):
     SCCPMessage.__init__(self, SCCPMessageType.SetSpeakerModeMessage)
     self.mode = 0
Exemplo n.º 50
0
 def testPack(self):
     message = SCCPMessage(SCCPMessageType.RegisterMessage)
     self.assertEquals("\x00\x00\x00\x00\x01\x00\x00\x00",message.pack())
     pass
Exemplo n.º 51
0
 def __eq__(self, other):
     return SCCPMessage.__eq__(self, other) and self.button == other.button