Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create Call:

...

RESTful API

Code Block
languagebash
themeMidnight
#Restful with json body
POST http://<server_url>/click2dial/calls
 
# Payload
{
    agent      : <ext>,
    callee     : <callee>,
    outbound_id: <outbound_id>,
    call_ref   : <custom_call_ref>
}
  • <server_url> PBX IP/Domain Address
  • <ext> agent extension/number
  • <callee> number to dial
  • <outbound_id> number to use as caller ID
  • <custom_call_ref>  your custom call reference, (in the dialer this is the contact_ref, but call_ref is kept for backwards compatibility)

WebRTC

From v2v3.70.0 (unreleased)

Via SIP.js for this example:

Code Block
languagejs
themeMidnight
// Creates the user agent
var userAgent = new SIP.UA({
    uri              : '<ext>@<server_url>',
    wsServers        : ['ws://<server_url>:8088/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'),
            },
        },
    }, 
    extraHeaders : [ #SIP headers for Click2Dial Settings
        'X-Platforma-Outbound-ID:<outbound_id>',
        'X-Platforma-Call-Ref:<custom_call_ref>'
    ]
};

// Make the call
var session = userAgent.invite('sip:<callee>@<server_url>', options);
  • <server_url> PBX IP/Domain Address
  • <ext> Agent extension/number
  • <ext_password> Agents Password for the Extension
  • <callee> number to dial
  • <outbound_id> number to use as caller ID
  • <custom_call_ref>  your custom call reference, (in the dialer this is the contact_ref, but call_ref is kept for backwards compatibility)

...

<ext>

The agent extension number or the first number connected to the call

  • 3-4 digit extension
  • or same as <callee> (from v2.2.1)

Agent Regex

<callee>

The number to dial:

One of the following:

  • 0820001234
    • Length: 10 digits
    • Must start with 0
  • 27820001234
    • Length: 11 digits
    • Must start with 27
  • 0027820001234
    • Length: 13-16 digits
    • Must start with 00

Callee Regex

<outbound_id>

Number to use as caller ID:

One of the following:

  • 'random' for Random CLID (from v2.3.0, Needs Teleforge configuration)
  • 0820001234
    • Length: 10 digits
    • Must start with 0
  • 27820001234
    • Length: 11 digits
    • Must start with 27

Outbound Caller ID Regex

<custom_call_ref> 

Your custom call reference specified for this call

Alphanumeric and .-_~:

Max length 230 characters, thereafter they are truncated

Call Reference Regex