I guess you've done the obvious thing of turning the volume up while making a call..
As it's a new phone I'm guessing that the speaker has never worked for you. In which case it's quite possible that you just have a faulty unit.
I suggest backing up any important data then doing a factory reset. Then make a call and see whether you still have the same problem. If you do then it's definitely a hardware fault, in which case you should send it back for a replacement.
If it does work after a factory reset, it's something that you've installed or set was responsible. Probably you can restore your stuff and it won't happen again, but to be safe I'd reinstall apps a few at a time and check that it still works inbetween.