You can also use CDR(userfield) parameter and that way you can write in the column userfield of your CDR table of the DB, the hostname of the asterisk for each call. You can try something like the following in the dialplan of each machine:
<br><br>Set(CDR(userfield)=hostname_of_the_machine)<br><br>Regards,<br>Ricardo Carvalho.<br><br><br>