Skip to main content
The First Step
July 25, 2020
Question

outbound call python

Any reference of code where I can make an outbound call from python code.

I want to try python sdk for that.

Any reference or any sample demo code will be helpful

Thanks in advance

    1 reply

    The First Step
    July 25, 2020

    Can you check this below?

    from ringcentral import SDK
    
    sdk = SDK( "client_id", "client_secret", "server_url" )
    platform = sdk.platform()
    platform.login( "username", "extension", "password" )
    
    resp = platform.post('/restapi/v1.0/account/~/extension/~/ring-out',
        {
          'from' : { 'phoneNumber': "13445554444" },
          'to'   : { 'phoneNumber': "13455553434" },
          'playPrompt' : True
        })
    print "Call placed. Call status: " + resp.json().status.callStatus 

    reference code : https://developers.ringcentral.com/guide/voice/ringout