Skip to end of metadata
Go to start of metadata

Description

This service has the goal to notify a external system when some events occur into Asterisk based PBX.

Use Cases

Imagine you need open a popup in the User screen when he answer a call.

In the exact time the User answer the call the Notification Service will send a request to your Webhook with all call data.

Other use case is when a customer Abandon the wait in Call Queue and you need to known that to do something, like call him back.

In the exact time the Customer abandon the wait, the Notification Service will send a request to your Webhook with the call data.

See the sample case with Slack integration.

Notification Events

The notification events are:

  • When a User answer a call
  • When a call get in a Queue wait
  • When a Customer Abandon a Call Queue wait

Notification

The Notification will be send through POST(default) or GET method, in a RESTFul Request with JSON Object in the Body.

JSON format:

{
	"eventdate":"2016-10-25T14:04:36-02:00",
	"agent":"8019",
	"from":"4839548000",
	"fromname":"Ramal 8023",
	"holdtime":"4",
	"ringtime":"3",
	"destination":"8019",
	"method":"POST"
}

 

Onde:

FieldDescription
eventdateEvent Date and time
agentOperator/Agent that answer this call
fromCaller for this call.
fromnameWhen we know the name of the Caller, we use it, if not the from filed will be used.
holdtimeThe hold time that the Caller wait for answer.
ringtimeThe ring time in the Agent endpoint before he answered the call.
destinationThe endpoint where the call was answered by the Agent/Operator.
methodIs the notification method registered for this webhook.

 

 

Enabling a Notification

To enable a event notification you need access the Q-Manager Admin Interface and in the option "Integrations" click on button "Integration Add".

Choice the type Integration "Notification" and complete with Service data.

You can choice the fields that API will send to the service using the Section Mapping.

Additional fields also can be send through the Section Fields, like a token or any other the service could need.

In the field value you can use original fields content, for example, use as value of a new field the content of the field fromname. To do that mention the field using {}, {fromname}.

Yu can combine fields or text content in the value, like:

Field Name: text
Field Value:
The Customer {fromname} abandoned the Queue {queue} at {eventdate}

In the Section Headers you can send Headers for your request, like an Authorization header.