With the ceasefire due to expire midweek, Pakistan has intensified diplomatic contacts with both Washington and Tehran.