Hi there, I've had the same problem but with my S3, as have a few others.
First the good news for you - this problem has actually been discussed in detail, but with regard to S3's. The forum you need to read is:
'> Samsung Galaxy S III I9300, I9305 > Galaxy S III Q&A, Help & Troubleshooting > No sound during calls (samsung galaxy s3 problem)'
(Sorry I'm not sure how to add shortcuts)....
Now some bad news - if the syptoms are that all sound works fine EXCEPT neither end can hear anything during a STANDARD phone call (i.e Skype/Viber etc work fine); and perhaps a dropoff of signal after about 30secs into the call - then this is not a software problem, you've got a hardware problem. There is a chip on the motherboard which is not connecting properly. Changing ROMs won't help I'm afraid.
However some more good news for you - there are a couple of fixes for this. I'm not sure if the S4 is the same layout as the S3, but in the S3 you can fix it by putting downward pressure on the chip by placing a small piece of credit card on top of it (there's a metal bracket above it which you then press down) - it's a pretty simple process, just make sure that when prying the metal plate off you unplug the connector first.
The other fix is to reflow the chip (apparently you heat it up with a heatgun to melt the solder underneath, causing it to refix itself to the motherboard), but this is a bit more risky (and I haven't tried it yet, my S3 seems to still be working with the credit card fix)
If you read through the forum, you'll see some good information, but I'd start reading from post 132 onwards (there's a lot of unnecesessary chatter prior to that).