Hi,
If the contact hangups and scripts tries to execute any media/any step which relies on contact will throw an exception, if the same is not handled the application get aborted and the system will execute the default treatment which will play the "System Problems" message or whatever has been defined as the Default script. You will see exceptions in MIVR logs. To avoid this you need to catch the ContactInactive Exception by using On Exception Goto step and clear the same.
If you are using some steps that doesn't relies on contact, continues to execute even after
the contact hangups (eg: database steps, XML steps) till it reaches the end step.
Do send me the script(s) with detail information about your requirement, I can take a look at it.
Regards
Venkat