i want to display the customers IP-Adress in the Agents Backend
So I first added at the end of the CustomerTicketMessage.dtl file in OTRS path under OTRS \ Kernel \ Output \ HTML \ Standard the following code.
But i don't know if it's correct.
Now the client's IP address is listed at the source code of a new ticket with
Code: Select all
############################################
# Insert Client IP
############################################
<script type="text/javascript">
$(function() {
var ip = '$Env{"HTTP_X_FORWARDED_FOR"}' ? '$Env{"HTTP_X_FORWARDED_FOR"}' : '$Env{"REMOTE_ADDR"}';
$('.Row_DynamicField_ClientIP').hide();
$('#DynamicField_ClientIP').val(ip);
});
</script>
############################################
<script type="text/javascript">
Core.Customer.InitFocus();
</script>
<!-- dtl:js_on_document_complete -->
The name is ClientIP, The designation is IP-Adress
Next i go to sysconfig in the area Ticket :: Frontend :: Customer Ticket Message ### DynamicField and create a entry called ClientIP with the value 1 .
The field is also displayed in the Customer frontend in every new ticket. However, it is empty. But I would have it automatically filled with the value from the source code, so that automatically the client's IP address is displayed in the ticket system.
The idea behind it, is that the client's IP address is displayed as a link and it automatically starts our remote support software when i click and automatically logs in at the customers client.
This point also already works, but only if the address is entered manually in the frontend.
Who can help me?
Thanks a lot
Sorry for my bad english
Manfred