PM avoids Afghan airspace, takes longer route for Azerbaijan visit