Multiple Sessions for Bidirectional Connections

Some use cases require to establish more than one connection at a time.

DICOM communication is a good example for a situation that needs two seperate connections in different directions: One to a distant server and another from that server back to your device.

It would look like this in radiology:
For querying and retrieving images from a PACS server, two different connections are used: The physician searches and requests the desired study or series of images using a DICOM viewer over a first connection initiated by the viewer. As a result, the PACS server sends the relevant data back to the viewer using a second connection that is triggered by the server.

In order to simplify this constellation for teleradiology or in a radiological setting with remote locations, it is possible to automatically launch ButConnect several times with different configurations.

To achieve this, at the end of one configuration section in the .ini file, the next can be invoked as a kind of follow-up connection.

For example:

mode = getaccess
server = <ssh_server>
port = <ssh_port>
user = <ssh_user>
ident = <ssh_key>
rhost = # The PACS server is listening on '', ...
rport = 104 #
lhost = # ... but we pretend to talk to ''.
lport = 1040 #
; start = ButConnect.exe
param = "-cn=_PACS_REVERSE_"

mode = letaccess
server = <ssh_server>
port = <ssh_port>
user = <ssh_user>
ident = <ssh_key>
rhost = # <-- internal IP address of <ssh_server>
rport = 1024 # <-- port <ssh_server> will listen on
lhost = # The remote server needs to talk to '' ...
lport = 11112 # ... in order to reach our viewer at ''.
start = <dicom_viewer> [-aet <application entity title>] [[$LHOST:]$LPORT]

# To be able to establish such a reverse ("letaccess") connection,
# it would be necessary to allow SSH port forwarding from remote hosts.
# To do that, you could include and uncomment
#GatewayPorts yes
# or
#GatewayPorts clientspecified
# in the SSH server's '/etc/ssh/sshd_config' file.
# (Please refer to the SSH documentation first.)

To invoke another ButConnect session, the start parameter can be omitted. If only the param entry is present, ButConnect launches the next session within the current console window. Otherwise, a new instance is created.

All sections whose names start and end with an underscore (such as ‘_PACS_REVERSE_’) are interpreted as auxiliary sections and are therefore not offered as a connection entry when cycling through the list of available connections but are still used to establish multiple sessions.