This was the first occasion when the two leaders spoke in person after December 2015 when PM Modi made a surprise visit to Lahore to attend Mr Sharif's grand-daughter's wedding. Mr Sharif had called PM Modi shortly before he was wheeled in for an open-heart surgery in May 2016.
On Thursday, sources say PM Modi enquired about Mr Sharif's health and that of his family who he had met during his surprise visit to Pakistan.
There has been speculation about a possible meeting between PM Modi and Mr Sharif in Astana to ease the growing tension between the two neighbours. The two leaders would be in the same room on Friday too as they formally join the six-nation consortium that focuses on security and trade.
However, on Monday, India ruled out any meeting between the two leaders.
"No meeting is scheduled either from their side or from our side," Foreign Minister Sushma Swaraj had said, asserting that "talks and terror can not go together".
A proposed meeting between the NSAs in September was cancelled at the last minute over a proposed meeting between Pakistan's then Security Advisor Sartaj Aziz and the Kashmiri separatists.
The NSAs later held a secret meeting in Bangkok in December 2015, but this initiative too was followed by the terror attack on the Pathankot air base in Punjab the next month. Top officials of the two countries still met in the following months; but could not cap the downward spiral in relations. Surgical strikes at terrorist launch pads came later, in September 2016, in retaliation to the attack on the army base in Jammu and Kashmir's Uri.
Ms Swaraj rejected suggestions that the government had a "flip-flop" policy in handling Pakistan. India is very clear that "it wants to hold dialogue, resolve all issues bilaterally without mediation from any third country, organisation or anyone else. But at the same time, terror and talks cannot go together," she said.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.