Call Connection (Inbound Notification)

from v4.0.0 onwards

redis_port and redis_db settings are determined by your issued configuration - see the configuration document for more information

sample redis connection string
<server_url>:<redis_port>/<redis_db>
e.g. our-client.forge-cloud.com:6379/0

Inbound Redis Call Connection Notifications can only be generated for a single integrator, and require an inbound Queue on the PBX to be configured specifically to do so. Contact Teleforge to arrange this.

Inbound:

When an inbound call arrives and is bridged to an agent a notification is generated. This incoming call notification is compatible with the notification used by the Teleforge Dialler for call connections, thus only one unpacking function is required to handle both.

 

Redis Notification

Key

enigma:notifications:inbound

Type

List ("BLPOP" for FIFO)
//Notification Example
brpop enigma:notifications:inbound
 
// Payload from v3.0.0 upwards
{
	type   : "call"
	payload: {
		number      : <caller>,
		dial_number : <dial_number>,
		hold_time   : <hold_time>,
		call_ref    : <internal_call_ref>,
		contact_ref : <custom_call_ref>,
		call_dir	: "inbound",
		ref         : <ext>
	}
}
 
// Payload prior to v3.0.0
{
	type   : "call"
	payload: {
		number      : <caller>,
		dial_number : <dial_number>,
		hold_time   : <hold_time>,
		call_ref    : <internal_call_ref>,
		contact_ref : <custom_call_ref>,
		campaign_ref: "inbound",
		ref         : <ext>
	}
}
  • <caller> number which the call is coming from
  • <dial_number> the number that was dialed by the caller
  • <hold_time> how long the callee was on hold in the queue, seconds (from v2.6.0)
  • <internal_call_ref> Internal click2dial call reference
  • <custom_call_ref> [optional] callee supplied reference
  • <ext> agent extension number

WebRTC Invite

From v3.0.0

Via SIP.js for this example:

// Creates the user agent
var userAgent = new SIP.UA({
    uri              : '<ext>@<server_url>',
    wsServers        : ['wss://<server_url>:8089/ws'],
    authorizationUser: '<ext>',
    password         : '<ext_password>',
    hackIpInContact  : true
});
 
// Call options
var options = {
    media: {
        constraints: {
            audio: true,
            video: false
        },
        render: {
            remote: {
                audio: document.getElementById('example-audio-tag'),
            },
        },
    }
};
 
// Accept Incoming Call: Listen for the invite
userAgent.on('invite', function (session) {
    // http://sipjs.com/api/0.11.0/ua/#invite
    console.log('Call Invite Accepted');
    session.accept(options);
});
  • <ext> agent extension number

Values:

<ext>The agent extension number
<internal_call_ref>

Internal click2dial call reference, this is used to disposition the call


The call_ref field will return a unique identifier for this specific call, it is set internally for inbound calls, but for click2dial outbound calls it is set according to the value passed upon creating the call. This field is used to control call, as well as uniquely identify multiple calls to the same callee. 

<custom_call_ref>

The contact_ref field may not always be populated, that depends if there is an IVR which allows inbound callees to type in a reference number or account number. If this is the case that will be filled in in the contact_ref field, otherwise the field will default to a null string ("").