Company not allowing to Join competitors - Asking to seat in conference after my resignation

Hello sir, I have selected for new company and it's competitor of my current employer. I have resigned and I informed new employer name to my current company due to trust and I don't have wrong intentions. Now company is not accepting my resignation just because I am joining to it's competitor. I have given 30 days notice period. from day of my resignation they are allowing me to seat at my regular place and Keep me seating at conformance room for all office time without doing nothing. All my system and office access to taken off and just seating in conformance from immediate effect of my resignation. It's 5 days over and same thing is happening. There is no clause of 'not to join to competitors.' in my appointment letter. Now my current employer is asking me to sign affidavit for 'not to join competitor ' till time they will not accept my resignation and not relieve me. Otherwise they will take legal action against me. They have also not taken my handover. Just keeping me seat in conforance room. Due to which I am getting tens... Please suggest what should be my next action in this situation. I am thinking to leave company from immediate as I am not able to take this tense. What will happen if I take this decision? Please suggest...