Its hard to help because you didnt describe your setup in detail.
From what I read your PC is connected to the wifi router wirelessly.
The problem here is that your PC is behind two NAT routers and therefore you must portforward them both
Also you didnt mention what DSL/Cable modem you are using, this too may also have routing functions which are causing problems.
to make life easier,
you can change your configuration so that the voip router is behind the wifi router.
This is the easiest configuration to deal with since everything is handled by your wifi router.
You may lose QOS functionality of the voip router, but it isnt that big of a deal, your calls should still be clear and consistent. If you do this I would suggest setting the voip call quality so that it uses less bandwidth.
Another thing I think your not understanding is the static IP part of portforwarding.
The thing that needs a static IP is your computer’s network card. So if you’re connecting wirelessly then your PCs wireless card needs the static IP.
So summing up what I think you should do:
Your network should look like this
DSL/Cable modem LAN → WAN wrt54g LAN–> WAN rt31p2
and your computer(s) will be connected with a static IP to the wrt54g either wirelessly or through its other LAN ports
Then you can make the portforwarding rules in the wrt54g to point to the static IP of your PC
Now, the rt31p2 you will want to give a different static IP then your PCs through the wrt54g’s routing options
You will find this option under Setup → Advanced Routing → Static Routing (you may also want to do your PCs static IP in here)
Then you should place the rt31p2 in a DMZ on the wrt54g (under Apps & Gaming → DMZ)
Also under Apps & Gaming you can adjust QOS options so that the rt31p2 gets High priority
Hope this isnt too complicated. I dont want to go into too much detail because I dont know your whole setup.
Please give me some more information about your setup or ask any questions you want
and hopefully we can get this all setup in an easy to adjust way.