MongoDB Interface for Asterisk PBX

3,657 views

Published on

Published in: Technology
3 Comments
4 Likes
Statistics
Notes
No Downloads
Views
Total views
3,657
On SlideShare
0
From Embeds
0
Number of Embeds
125
Actions
Shares
0
Downloads
0
Comments
3
Likes
4
Embeds 0
No embeds

No notes for slide

MongoDB Interface for Asterisk PBX

  1. 1. techio.com MongoDB Interface for Asterisk PBX Sokratis Galiatsis, Co-Founder TechIO @sokratisg | sokratis@techio.com
  2. 2. techio.com What Asterisk PBX is? • Software implementation of a Private Branch Exchange • Exists since 2004 • Dual Licensed (GPL v2.0 & Proprietary) • Ported to almost all well known platforms • Very popular solution for either ITSPs or SMBs • Core component for many PABX such as Trixbox & FreePBX
  3. 3. techio.com Integration Options • unixODBC • MySQL • Postgres • SNMP • LDAP • SQLite • Asterisk Gateway Interface (AGI) • mongoDB
  4. 4. techio.com mongodb supported drivers: Apache License v2.0 asterisk server + addons: GPL v2.0 MongoDB ! Asterisk BUT WAIT :)  How about storing PBX CDRs into mongoDB?  How about taking near-realtime decisions based on mongoDB datasets? • Faster Rating & Billing • Less Complex Fraud detection
  5. 5. techio.com Meet app_mongodb! • Asterisk native application • mongoDB interaction from the PBX dialplan • Still a prototype with just under 300 lines of code • Tested and working ok so far on Asterisk 1.8.x • Re-used already existing code base (cdr_mongodb) • Greatly influenced by app_mysql What can it do so far?  Replace a CallerID’s Name by matching his number in a mongoDB phonebook
  6. 6. techio.com app_mongodb in Action 200 is calling 201 201 receives a call from “mongodb-rulez!” find({“num”: 200”, “cid”: 1}) “cid”: “mongodb-rulez!”
  7. 7. techio.com Well, ok but is that all?
  8. 8. techio.com • Near-Realtime accounting for billing, remaining call time, fraud-detection etc. • Faster Dynamic Call Routing (usage based trunk routing) • Faster analysis on ITSP customer trends (BI) • Integrating 3rd party with mongoDB as a data source • Asterisk Integration with CRM for medium to large organizations (Call-Centers, etc) Some ideas Additional support for a broader set of mongoDB operations can be implemented easily! ;-)
  9. 9. techio.com Resources • app_mongodb: github.com/TechIOltd/app_mongodb • mongo-c-driver: github.com/mongodb/mongo-c-driver • cdr_mongodb: github.com/FlaPer87/cdr_mongodb • mongoDB C driver tutorial: api.mongodb.org/c/current/tutorial.html • mongoDB licensing: www.mongodb.org/about/licensing • Asterisk PBX sources & documentation: www.asterisk.org
  10. 10. techio.com

×