You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.1 KiB

Simwood Partner Python Client

A modern Python client library for Sipcentric (Simwood Partner, formerly Nimvelo) API.

from sipcentric import Sipcentric
api = Sipcentric(username="myusername", password="mypassword")
print"0123", to="03301201200", body="Hello World!")


Best method

sudo pip install sipcentric

You may need to install simplejson if you don't have it already.

Manual method

git clone && cd sipcentric
sudo python install

Getting started


Get account details

from sipcentric import API, Partner, Customer, ACCOUNTTYPE_BUSINESS

api = API(username="myusername", password="mypassword")

# Simwood Partners can interact with Sipcentric and create new Customers
partner = Partner(api)
for customer in partner.customers():
newcust = Customer(api)
               company="Acme Ltd", firstName="Hayes", lastName="Murphy", email="",
               address1="24 Acacia Avenue", city="Newton", postcode="FX5 7HQ", telephone="03069990000")

# if your API credentials are for a Customer account:
customer = Customer(api, "me")

Connect to the streaming api

from sipcentric import Sipcentric

api = Sipcentric(username="myusername", password="mypassword")
stream = api.Stream

def callHandler(call):
  print 'Incoming call from ' + call['callerIdName'] + ' (' + call['callerIdNumber'] + ')'

def smsHandler(sms):
  print sms['excerpt'] + ' from: ' + sms['from']

stream.register(type='incomingcall', callback=callHandler)
stream.register(type='smsreceived', callback=smsHandler)



This project was forked from Nimvelo's original project (for Python 2.7) python-client. The name was changed to sipcentric after discussion with the development team at Simwood.