Yes, both are correct.
Had/has/have been is usually used for something that was done in the past and still applies (multiple events).
Was/were usually applies to something done in the past that no longer applies (single event).
In this context, there is not much difference between the two, although "was listening" sounds more natural.