No, I don't think it's the PIC. I would place money on it being the modem.

With a lot of modems with 'Hayes Style' command set, when you issue a command, the modem will reply (even if it's OK or just a plain CRLF).

It is possible that during this reply the PIC has issued the next command (intercommand Pause too short)... and in so doing the modem has lost part of the next command string receiving a corrupted sequence which in turn has caused it to timeout.

You could verify this by increasing the Pauses to something really long (eg PAUSE 5000 rather than 500) and see if it still hangs. If it doesn't, then that's the reason... your modem probably has poor firmware that can't simultaneously cope with a new command string whilst the reply to the previous one is still being processed.

Don't quote me, but I think there's a command to suppress these responses from the modem... you could always issue that first. That might also stop the problem.