The extended Blinkenisdn protocol is used to transmit the state and the pressed keys of ISDN lines across a network. This is done by sending UDP packtes containing a line of plain text. UDP was chosen to make the response times as small as possible.
To achieve the needed bidirectional communication, the ISDN server must know the IP and the port of the client and the client must know the IP and the port of the ISDN server.
The server and the client periodically (e.g. every 10 seconds) send heartbeat messages to show that they are still alive. A timeout occurs after no heartbeat has been received for a longer time (e.g. 60 seconds). In this case, the server hangs up the ISDN-lines until a new client connects (or the same client reconnects) by sending heartbeat messages. The client will react as if all callers hung up, if it recognizes a server timeout.
Messages sent in the UDP packets are coded as an ASCII string, divided into two, three or four fields by colons, for example:
The first field specifies the number of the ISDN line as decimal number or is 0 for messages that do not correspond to a ISDN line like heartbeat messages. The type of message is specified in the second field. The third and fourth field depend on the type of the message.
Messages from server to client:
- sent periodically (e.g. every 20s) to show the client that the server is still alive
- sent if a connection from <caller-id> for phone number <phone-no> is comeing in on ISDN line <line-no>
- sent if the connection on ISDN line <line-no> is established
- sent if the key <key> on ISDN line <line-no> was pressed
- <key> may be 0, ..., 9, *, #
- sent if the connection on ISDN line <line-no> is closed (by the caller or by the server)
Messages from client to server:
- sent once at begin to register the client with the server
- is repeated if no messages arrive from the server (e.g. after 5s)
- sent periodically (e.g. every 20s) to show the server that the client is still alive
- sent if the client wants to accept an incoming call on line <line-no>
- sent if the client requests the server to hangup the ISDN line <line-no>
- it is currently unknown what the 18 is good for...
- <line-no>:play:<filename> or <line-no>:playbackground:<filename>
- play specified file over telephone line