In this situation, you should ask the caller to hold on for a moment, and thank them when they're agree.
But, since you're handling the person on the phone first, you need to smile to the person in front of you, and politely ask him/her to wait until you finish your call. After you handle the person on the phone than you could proceed as usual with the person in front of you.