The code doesn't work correctly, because a2 isn't a client address but a gentity address.
You need to replace 'clientaddress_to_num' with 'gentityaddress_to_num' to get a valid client number.
Edit: the function uses a different a2 variable. So i was wrong. See: http://killtube.org/showthread.php?2...ll=1#post12093