The US president has exchanged barbs with Russian leader Dmitry Medvedev, who warned of 'how dangerous' Russia can be.