WebRTC Client Tools Sample

A command line console application that provides access to the WebRTC client facilities of the Aculab Cloud Web Services API.

Usage

python webrtc_client_tools.py [--wsserver cloudWebServerAddress] <cloudId> <username> <apiAccessKey> <command>

Arguments

cloudWebServerAddress

The address of the cloud web server. By default the wrappers call web services on https://ws-<cloudId>.aculabcloud.net. In certain circumstances you may need to use a different address which you can set here.

cloudId

Cloud region id (e.g. 1-2-0)

username

Cloud account username

apiAccessKey

Cloud API Access key

command

One of the following...

generate_token <clientId> [<timeToLive> [<enableIncoming> [<callClients>]]]

list_registered_clients

Where...

clientId

The client id of the WebRTC client that will be registered. This is the same as the clientId used when creating the WebRTC client.

timeToLive

The time, in seconds, that the token is valid for. This must be between 600 and 86400 inclusive. If omitted or zero, the default duration is used.

enableIncoming

Set to True or False to enable/disable incoming calls to the client. If omitted, incoming calls will be enabled.

callClients

A comma separated list of client ids of WebRTC clients that can be called. For each id the last character can be a '*' wildcard in which case it matches any client whose id starts with the preceding string. A single '*' matches all clients. If no value is given the token cannot be used for calling other clients.

Examples

  1. Generate a token that is valid for the default duration and allows incoming calls only.

    python webrtc_client_tools.py 1-2-0 bob@acompany.com 6b4UmwoOPxjeI2M76aebfQ generate_token MyClient1234
    
  2. Generate a token that is valid for 2 hours and allows incoming calls only.

    python webrtc_client_tools.py  1-2-0 bob@acompany.com 6b4UmwoOPxjeI2M76aebfQ generate_token AnotherClient 7200
    
  3. Generate a token that is valid for the default duration. Incoming calls are allowed. Outgoing calls to a specific client id is allowed.

    python webrtc_client_tools.py 1-2-0 bob@acompany.com 6b4UmwoOPxjeI2M76aebfQ generate_token AnotherClient 0 true ADestinationClient1
    
  4. Generate a token that is valid for the default duration. Incoming calls are not allowed. Outgoing calls to several client ids are allowed.

    python webrtc_client_tools.py 1-2-0 bob@acompany.com 6b4UmwoOPxjeI2M76aebfQ generate_token AnotherClient 0 false AClient*,BClient*
    
  5. Retrieve a list of clients that are currently registered for calls

    python webrtc_client_tools.py 1-2-0 bob@acompany.com 6b4UmwoOPxjeI2M76aebfQ list_registered_clients