The Taliban has opened the door to talks with Pakistan following deadly clashes between the allies-turned-foes.