Esempio n. 1
0
 def writeConferenceCreateRequest(self, stream: BytesIO, pdu: GCCConferenceCreateRequestPDU):
     """
     Write a GCCConferenceCreateRequestPDU to a stream.
     :param stream: byte stream to put the ConferenceCreateRequest data in.
     :param pdu: the PDU to write.
     """
     stream.write(per.writeSelection(8))
     stream.write(per.writeNumericString(pdu.conferenceName, 1))
     stream.write(per.writeEnumeration(0))
     stream.write(per.writeNumberOfSet(1))
     stream.write(per.writeChoice(0xc0))
     stream.write(per.writeOctetStream(GCCParser.H221_CLIENT_KEY, 4))
     stream.write(per.writeOctetStream(pdu.payload))
Esempio n. 2
0
 def writeConferenceCreateRequest(self, stream, pdu):
     """
     Read a GCCConferenceCreateRequestPDU and put its raw data into stream
     :param stream: byte stream to put the ConferenceCreateRequest data in
     :type stream: BytesIO
     :type pdu: GCCConferenceCreateRequestPDU
     """
     stream.write(per.writeSelection(8))
     stream.write(per.writeNumericString(pdu.conferenceName, 1))
     stream.write(per.writeEnumeration(0))
     stream.write(per.writeNumberOfSet(1))
     stream.write(per.writeChoice(0xc0))
     stream.write(per.writeOctetStream(GCCParser.H221_CLIENT_KEY, 4))
     stream.write(per.writeOctetStream(pdu.payload))
Esempio n. 3
0
    def writeConferenceCreateResponse(self, stream: BytesIO, pdu: GCCConferenceCreateResponsePDU):
        """
        Write a GCCConferenceCreateResponsePDU to a stream.
        :param stream: byte stream to put the ConferenceCreateResponse data in.
        :param pdu: the PDU to write.
        """

        stream.write(Uint16BE.pack(GCCParser.NODE_ID - 1001))
        stream.write(per.writeInteger(1))
        stream.write(per.writeEnumeration(0))
        stream.write(per.writeNumberOfSet(1))
        stream.write(per.writeChoice(0xc0))
        stream.write(per.writeOctetStream(GCCParser.H221_SERVER_KEY, 4))
        stream.write(per.writeOctetStream(pdu.payload))
Esempio n. 4
0
    def writeConferenceCreateResponse(self, stream, pdu):
        """
        Read a GCCConferenceCreateResponsePDU and put its raw data into stream
        :param stream: byte stream to put the ConferenceCreateResponse data in
        :type stream: BytesIO
        :type pdu: GCCConferenceCreateResponsePDU
        """

        stream.write(Uint16BE.pack(GCCParser.NODE_ID - 1001))
        stream.write(per.writeInteger(1))
        stream.write(per.writeEnumeration(0))
        stream.write(per.writeNumberOfSet(1))
        stream.write(per.writeChoice(0xc0))
        stream.write(per.writeOctetStream(GCCParser.H221_SERVER_KEY, 4))
        stream.write(per.writeOctetStream(pdu.payload))