What is the meaning of "line of service" in the following passage?
In Smirnov's letters, we also find information on the dynamics of Anglo-Russian relations in Iran. The letter of 22 November 1915 shows that while staying at Qazvin, Smirnov often contacted the British in the line of service. How all is changing in this world. Never was I acquainted with any Englishman, and I had only strictly official relations with them, and now every moment English women [say] Captain Smirnov, Captain Smirnov, seeing me on the street from afar, English children nod, and the misters shake hands with a pleasant smile.
The passage is from the essay "A Russian Officer's Letters on Russian and British Activities in Iran during World War I" by Nugzar K. Ter-Oganov, in the book "Russians in Iran" edited by Rudi Matthee and Elena Andreeva. Smirnov was an officer in the Russian forces occupying Iran during World War I, and the English were another force in Iran. In that war they cooperated with one another against the German and Ottoman forces. Smirnov was sometimes at the front and sometimes in cities.