powered by Jive Software

Capture ip address

Is there a way to capture the ip address of the person initiating the contact with a fastpath agent?

user ip ------>webchat server ------> openfire server ------> agent (user ip)


I also need this feature.

did you find a solution?


I am going to say yes. Although you’ll need to do some work on your part and it depends on your setup. The first step would be add a Form UI Field (call it USR_IP).

Then it depends on the setup. From what I gather the flow is something like this:

“the webpage with chat link” --> jivelive.jsp --> start.jsp --> userinfo.jsp --> queue.jsp --> chatmain.jsp

If you are using the out-of-box configuration then you’d need to modify the code on userinfo.jsp so that it grabs the user’s ip address

ip = ‘<%=request.getRemoteAddr()%>’;


ip = ‘’;

and sets the USR_IP field’s value to that ip address. In our setup we rewrote the showChatButton function in jivelive.jsp so that the user is passed directly to the queue.jsp. We don’t need the users to fill out a form because the chat link is inside our Intranet, to which the user is authenticated (so we already have their contact info). So if I wanted to grab the user’s IP then I would add the necessary code to “the webpage with chat link” and modify jivelive.jsp so that the function accepts the IP address. chatmain.jsp will have the Form UI Field, USR_IP, and it will be populated with the information grabbed on “the webpage with chat link”.

But, with a default out-of-box config, it’s a two step process.

  1. Add Form UI Field (USR_IP)

  2. Modify userinfo.jsp to grab IP address and insert into USR_IP

Klinstifen thanks for the reply, where in the userinfo.jsp do i add that code?


You could put it at the bottom of the page above the tag.

Hmm… I tried to modify jivelive.jsp - and saw no results at all, it’s simply generates an old javascript file…

After I copy it to other file and try to access it via web - and get error:


No Java compiler available


I use Fedora 9, and openfire 3.6.4 provided as RPM.

we solved it like this:

var gotoURL = “http://www.chatserver.com:port/webchat/start.jsp?workgroup=” + workgroup + “&location=” + window.location.href;
gotoURL += “_______ip=” + ip;

then you see in spark at the location also the ip.


Thanks. I already partially solve this problem - I added hidden variable with user ip into userinfo.jsp, and put webchat.war on separate apache tomcat - on standart openfire’s server it won’t work (after full plugin reinstall I still saw old page)… One trouble - plugin doesn’t want to open a chat window

UPD: Trouble with chat window was solved - webchat doesn’t work with tomcat 5.5, it requires 6.0

I thought this was just me, but perhpas this is by design. I too had to put the jivelive file…well the whole fastchat plugin…on a seperate tomcat server. But after I put it on a seperate server I could manipulate the file without issue.