omg-callinfo

omg-callinfo

Producer handled by producermanager

Type: interval

Functionality: Reads and returns isdn_calls and inbound_calls

Data exchange Format: JSON

Getting Started

Send request object to omg-producermanager via zeroMQ.

Subscription:

{
    rMethod: "pubsub",
    pAction: "subscribe",
    producer: "callinfo"
}

Request/reply:

{
    rMethod: "reqrep",
    pAction: "getStatus",
    producer: "callinfo"
}

Documentation

Watches for changes on /tmp/isdn-call*

Watches for changes on /tmp/inbound_call*

Returns:

{
    isdn: {}
    inbound: {}
    lastCalls: {}
}

Examples

host = aggConfig.protocol + "://" + aggConfig.address + ":"

pushSubscriptionSocket = zmq.socket('push')

pushSubscriptionSocket.connect(host + aggConfig.subscriberPoolPort)

subscriptionSocket = zmq.socket('sub')

subscriptionSocket.connect(host + aggConfig.pubSub)

blub = {
    rMethod: "pubsub",
    pAction: "subscribe",
    producer: "callinfo"
}

pushSubscriptionSocket.send(JSON.stringify(blub))
subscriptionSocket.subscribe("callinfo")

subscriptionSocket.on("message", function(response) {
    response = JSON.parse(response)
    //Do something with it
})

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2014 Johannes Noe
Licensed under the MIT license.