Moved common code to function.
Modified test: changed test ip.
Merge branch 'master' of github.com:agiliq/plivo-python