GithubHelp home page GithubHelp logo

faelix / sipcentric Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nimvelo/python-client

0.0 0.0 0.0 11 KB

Modern Python client library for the Simwood Partner (Nimvelo/Sipcentric) API

Home Page: https://pypi.python.org/pypi/sipcentric/

License: MIT License

Python 100.00%

sipcentric's Introduction

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 api.sms.post(_from="0123", to="03301201200", body="Hello World!")

Install

Best method

sudo pip install sipcentric

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

Manual method

git clone [email protected]:faelix/sipcentric.git && cd sipcentric
sudo python setup.py install

Getting started

Examples

Get account details

from sipcentric import Sipcentric

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

print api.account.get()

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)

stream.connect()

Reference

  • sipcentric.Sipcentric(username, password, base='https://pbx.sipcentric.com/api/v1', customer='me')
    • account
      • get()
    • callBundles
      • get()
    • recordings
      • get()
    • phoneBook
      • get()
    • timeIntervals
      • get()
    • endpoints
      • get()
    • phoneNumbers
      • get()
    • sms
      • get()
      • post(to, _from, body)
    • creditStatus
      • get()
    • calls
      • get()
    • sounds
      • get()
    • outgoingCallerIds
      • get()
    • Stream
      • register(type, callback)
      • connect()
      • disconnect()

History

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.

sipcentric's People

Contributors

djm0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.