Both Armenia and Azerbaijan are signatories to the International Air Services Transit Agreement.

The first freedom is the right to fly over a foreign country without landing.[6]: 31  It grants the privilege to fly over the territory of a treaty country without landing. Member states of the International Air Services Transit Agreement grant this freedom (as well as the second freedom) to other member states,[7] subject to the transiting aircraft using designated air routes.[8] As of the summer of 2007, 129 countries were parties to this treaty

...

IASTA allows each member country to charge foreign airlines "reasonable" fees for using its airports (which is applicable, presumably, only to the second freedom) and "facilities";[8] according to IATA, such fees should not be higher than those charged to domestic airlines engaged in similar international services.[8] Such fees indeed are commonly charged merely for the privilege of the overflight of a country's national territory, when no airport usage is involved

/r/armenia Thread Link - en.wikipedia.org