What could possibly be your reason for doing this? If you just shut down the application that is doing the dialing, the COM port will close and your connection will drop.
At any rate, you can try this:
echo "+++" > COM1:
pause 2
echo "ATH" > COM1:
I doubt seriously that this will work, because the application that controls the COM port should have locked the port so that no other application can access it. And, there are issues with the ECHO command that may cause undesired results, like sending a CRLF at the end of the +++ even though that was not your intention.
pansophic