Technical specification

Making Dialer with 3CX using the WebAPI + Webhook Generator for 3CX
1. Integrate incoming calls
Step 0. Install WebAPI + Webhook CRM Bundle to your 3CX server (on-premise only)
Step 1. Configure your CRM system to accept webhook events (HTTPs POST requests) from 3CX ip address.
Step 1a. Specify the URL of your CRM system for the webhook generator.
Step 1. Initiate an outgoing call from the CRM system through a simple GET request
  • first - internal number of the employee on whose behalf the call is being made
  • second - external number of customer to whom the call is being made
  • contact - specified device (optional)
  • timeout - response timeout in milliseconds
GET /webapi/JNJP5UqGDhX/makecall?first=800&second=381629759787&contact=100&timeout=2000 HTTP/1.1
Host: api.3cx.eu
Capture unique ID of you call. Use this chid to track subsequent stages of the call
{
    "chid": "00000000-01dc-27fa-d1eb-64b00000002e"
}
Step 1a. Record the failed outgoing call in the CRM system along with the rejection reason
  • callerid - external number of customer
  • user - user extension
  • termination_reason_details - rejection reason
  • source_presentation - outgoing DID number
POST /webhooks/ HTTP/1.1
Host: crm.company.com
Content-Type: application/json

{
    "event": "outgoing",
    "callerid": "381629759787",
    "user": "105",
    "finishtype": "Missed",
    "transfer": "False",
    "breakside": "Undef",
    "did": "",
    "title": "Unanswered call to 381629759787",
    "id": "250917194513_46-0",
    "chid": "00000000-01dc-27fa-d1eb-64b00000002e",
    "inbound_did": "381629759787",
    "sip_displayname": "",
    "phonebook": "",
    "call_id1": "mf5zBO50gjyzLA3rLgaZkA..;from-tag=3510c33e;to-tag=2c2c4b61",
    "call_id2": "a2c4c06a-21d7-4d43-b58c-db3871740d61;to-tag=59329b7a;from-tag=81865a8a-e9a9-4bf6-a597-9e496bfda25a",
    "termination_reason_details": "declined",
    "source_presentation": "381213220030"
}
Step 2. Trigger opening of the customer’s CRM card upon the pickupOutgoing webhook event
  • callerid - external number of customer
  • user - user extension
  • chid - unique ID of the call chain
  • source_presentation - outgoing DID number
POST /webhooks/ HTTP/1.1
Host: crm.company.com
Content-Type: application/json

{
    "callerid": "381629759787",
    "event": "pickupoutgoing",
    "user": "105",
    "did": "",
    "trtype": "NotDef",
    "id": "250917195359_47-1",
    "chid": "00000000-01dc-27fc-0bdb-88fd0000002f",
    "inbound_did": "",
    "sip_displayname": "",
    "phonebook": "",
    "call_id1": "170f530d-7af4-4081-9af1-6c3d88afc411;to-tag=3d10a53b;from-tag=eca65e6e-efc4-436a-8bcf-041f27b8267c",
    "call_id2": "0-I_xdErJxAvrSrfWr4eNA..;from-tag=ba2c291a;to-tag=as0775c705"
}
Step 3. Record the duration of each successful outgoung call and attach a link to the .mp3 or .wav conversation file
  • callerid - external number of customer
  • user - user extension
  • chid - unique ID of the call chain
  • source_presentation - outgoing DID number
POST /webhooks/ HTTP/1.1
Host: crm.company.com
Content-Type: application/json

{
    "FILES": [
        "https://api.3cx.eu/webapi/recording/250917195359_47-1-1.mp3"
    ],
    "event": "outgoing",
    "callerid": "381629759787",
    "user": "105",
    "finishtype": "Ok",
    "transfer": "False",
    "breakside": "Internal",
    "did": "",
    "title": "Successful call to 381629759787 (0:05)",
    "id": "250917195359_47-1",
    "chid": "00000000-01dc-27fc-0bdb-88fd0000002f",
    "inbound_did": "381629759787",
    "sip_displayname": "",
    "phonebook": "",
    "call_id1": "MQdyDv4dHEvGFw8FZ6u49w..;from-tag=2950160b;to-tag=34643343",
    "call_id2": "170f530d-7af4-4081-9af1-6c3d88afc411;to-tag=3d10a53b;from-tag=eca65e6e-efc4-436a-8bcf-041f27b8267c",
    "termination_reason_details": "polling",
    "source_presentation": "381213220030"
}
Step 3a. Add the recognized call transcription to the CRM system based on the latest webhook
POST /webhooks/ HTTP/1.1
Host: crm.company.com
Content-Type: application/json

{
    "event": "ai",
    "id": "250917195359_47-1",
    "summary": "Customer received a positive outbound call about a weekend swimming pool discount and accepted the offer.",
    "transcription": "Hello this is the call center we have a special offer for you there is a weekend discount for the swimming pool would you like to take advantage. Yes that sounds great thank you very much. Wonderful have a nice day",
    "sentiment_score": "5"
}
The fastest and simplest integration our team has ever done. It took us just 3 days to fully integrate a CRM system with 3CX using the WebAPI + Webhook bundle from Creomate.
— SAP CRM dveloper