You should set it up with the ports you have IVM set to use. Usually, by default port 5060 is used for voip communication, but for example, I have set mine up to use 5063, so it's best to double check.
Also the codec may be the cause of the calls dropping in and out, different codecs use different ammounts of bandwidth. Some of the default ones use about 64kbps per call (thats a lot!).
Some codecs are more compressed and can send pretty much the same quality of voice but only using small amounts of bandwidth like 8 kbps.
Please note IVM supports: G726 (I believe), GSM, A-law, and U-law... and does not support G723 or G729