Foreign militants and Pakistani fighters trade fire