Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
data = {
    'admin_uid': gateway_user,
    'admin_password': gateway_pass
}
data_str = '&'.join(['%s=%s' % (k,v) for k,v in data.iteritems()])
 
req = mechanize.Request("https://%s/admin/main.html" % gateway_ip, data_str)
cj = cookielib.LWPCookieJar()
cj.add_cookie_header(req)
res = mechanize.urlopen(req)
lines = res.read()
 
if re.search("Welcome,\s+%s" % gateway_user, lines) is None:
    print "Login Failed!"
    print lines
    return 1

Methods

*_list

  • Input:

    name

    value type

    required

    object_name

    the 'name' parameter of the object

    yes, if no object_id specified

    object_type

    the type of object as defined by the backend

    no

    object_id

    integer representing the auto-increment field from the database

    yes, if no object_name specified

  • Output: JSON element as defined for each method

...

Configuration

SIP Endpoints

Advanced SIP Settings

T1/E1 Settings

Call Routing Groups

Call Routing Rules

System Administrators

IP Configuration

Access Control

Reporting

Statistics

Remote Logging

Diagnostics

Connection Status

System Information

Diagnostic Tests

Advanced Debugging

Technical Support

Maintenance

Backups and Templates

Certificates and Keys

Software Updates

System Clock

System Reset