Single AET, multiple IP ?

  • Hi all,


    I've some users that need access to PACS from their home, using remote VPN connection on their laptop (which are already used on site).
    They're registered in my acrnema.map with their local IP address, AET and port.
    What i'd like to do is to permit them to retrieve Dicom images, using the same AET as usual but with their IP address assigned by the VPN.
    I believed it would be possible by using wildcard but it does not work.
    I've tried several ways :


    MY_AET IP_ADDRESS PORT
    MY_AET IP_ADDRESS_2 PORT
    or
    MY_AET * PORT


    None of these works.


    Maybe someone here has already done that ?
    I've used the search function but can't find any answer, and there's no solution in the manual.


    Any help would be greatly appreciated ! :)

  • Hi,


    we use in the server (in acrnema.map)


    v* * 1234 un


    And then in the client


    AETITLE = v%ip%


    I.e., the IP adress is passed in the AE title with which the client talks to the server. This will work if you have control over some of the client software. I could add an option to read the connecting IP address from the association, this would probably allow you to dynamicslly change acrnema.map...


    Marcel

  • Marcel,
    Thank you for your answer but i'm not sure to fully understand what you mean. :?


    What i understand is that wildcard is used for 2 identical values, like :


    V* * 1234 un = "V12.34.56.78 12.34.56.78 1234 un" or "V78.56.34.12 78.56.34.12 1234 un" ?


    If it is so, wildcard is not helpful for my need.
    Indeed IP address is subject to change from one to another (only 2 in my case) but AET will remain the same.
    I want to avoid to ask my clinicians to modify their AET whenever they're home.
    A dynamic reading of IP address would be usefull i guess but is it possible ?
    it would also solve some issues concerning users that are wire-connected and automatically wifi connected by OS, which cause them to use two IP address simultaneously and prevent their software to retrieve images.
    For now, i ask them to disable wifi whenever they want to connect to Conquest server.


    Would it be possible without a lot of work ? I really don't want to bother you... and you helped me so much in the past yet !


    Many thanks.
    Emmanuel

  • In 1.4.17beta, there is a lua variable called Association.ConnectedIP. Upon the start of each association you can probably use this to update acrnema.map as follows:


    [lua]
    Association=local AE,IP,P,C= get_amap(1); if Association.Caller==AE and Association.ConnectedIP~=IP then servercommand('put_amap:'..AE..','..Association.ConnectedIP..','..P..','..C) end


    Note that this assumes that the caller is on entry 1 or the second line of acrnema.map. A more extensive script could loop over all entries of acrnema.map.

  • Hi Marcel,
    I've tried to put this line in dicom.ini but it does not work, although my caller is the first entry of acrnema.map.
    Is there a particular syntax to use for the entry in acrnema.map ?
    In order to use it for other entries, should i use this : "get_amap(1)" and replace the "1" by the entry number ?
    Or maybe there's a way to do it for every entries, which would be simpler ?
    Sorry for all these questions, i don't know anything about lua script. :oops:
    Many thanks.

  • Hi Marcel,


    As you've released the beta (thanks a lot ! :D ) i've tried the lua script you wrote me last time, but it does not operate correctly.
    When my client tries to retreive images with a different IP than the one used in acrnema.map, i have the same error as usual in log window : host did not accept the connection.


    Could you help me please ?
    Thanks.

  • Hi Marcel,


    Yes, my client is in entry one. I've tried several combinations (first entry but on line 2), second entry after loopback...) but none works.
    My acrnema.map does not seem to change at all.
    I've add the following to my dicom.ini.
    Is there any mistake ?


    Code
    [lua]
    Association=local AE,IP,P,C= get_amap(1); if Association.Caller==AE and Association.ConnectedIP~=IP then servercommand('put_amap:'..AE..','..Association.ConnectedIP..','..P..','..C) end


    Also, could you give me some leads to create a more extensive script that would allow to modify association for several entries, or all entries ?


    Thanks.

  • Hi,


    do this - there was a bug in my script ;->:>>


    [lua]
    Association=dofile('myscript.lua')


    And make a file myscript.lua

    Code
    for i=1,10 do
    AE,IP,P,C= get_amap(i)
    if AE==nil then break end
    print('testing AEs', i, AE, IP, P, C)
    if Association.Caller==AE and Association.ConnectedIP~=IP then
    print('changing AE:' i, AE, IP, P, C)
    servercommand('put_amap:'.. i..',' ..AE..','..Association.ConnectedIP..','..P..','..C)
    end
    end


    This should work if I made no typos...


    Marcel

  • Hi Marcel,


    There was an error because of a missing comma, but i found it (i think) :


    Code
    for i=1,10 do
    AE,IP,P,C= get_amap(i)
    if AE==nil then break end
    print('testing AEs', i, AE, IP, P, C)
    if Association.Caller==AE and Association.ConnectedIP~=IP then
    print('changing AE:', i, AE, IP, P, C)
    servercommand('put_amap:'..i..','..AE..','..Association.ConnectedIP..','..P..','..C)
    end
    end


    In my log i can see : testing AE, port...
    And no error, but when i try to connect from my caller with a different IP than the amap entry, i obtain the same error as usual (host did not accept connection) and i can't see the line in the log "changing..." So the IP remains the same and amap is not modified.
    Seems that the script is not able to complete.
    Any idea to solve this ?


    Many Thanks !


  • Is this what you want ?
    I'm not sure this will help, but if you need further informations, please ask.
    Thanks.

  • Hi,


    it should be comparing OSIRIX, 10.25.0.19 and 1234 to your acrnema.map.


    Can you add:


    print (Association.Caller, Association.ConnectedIP)


    to the top of the lua script to help find the error?


    Marcel

  • Hi Marcel,



    It looks like my AE is not recognized as the one in acrnema.map, it's the good name though.
    Thanks !

  • Sorry,


    replace Association.Caller in the script by Association.Calling and start at 0 [edit, start at 1 to avoid infinite loop from GUI connections]:


    Code
    for i=1,10 do
    AE,IP,P,C= get_amap(i)
    if AE==nil then break end
    print('testing AEs', i, AE, IP, P, C)
    if Association.Calling==AE and Association.ConnectedIP~=IP then
    print('changing AE to:', i, AE, Association.ConnectedIP, P, C)
    servercommand('put_amap:'..i..','..AE..','..Association.ConnectedIP..','..P..','..C)
    end
    end


    Marcel

  • OK, Marcel, now this works great ! :D


    I've tried with another caller in entry 2, and it works too.


    Does this line "for i=0,10 do" permit alternate IP address for the first ten entries ? Or do i misunderstand ?


    Many thanks Marcel, this will greatly help me !

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!