Webhooks

Created by Timofey Tereshkov, Modified on Tue, 12 Mar at 8:56 AM by Timofey Tereshkov

    In some cases, the integration requires receiving real-time notifications. An example is displaying a call card in CRM systems. To solve such problems, the SipSim.fr system can notify your servers with special requests (webhooks)  when a call starts, the operator answers and the call ends.
    In order to set up receiving notifications you need a couple of simple steps:

Step 1: go to the integrations section, available integrations and click on “Connect”.





Step 2: Fill in the addresses of your servers for notification. You can also select the method to be used when making the request.




The following parameters will be sent to the specified addresses:

  • event - event name;

  • time - time in iso8601 format;

  • pbx_id - Unique call ID;

  • duration - call duration;

  • caller - caller number;

  • receiver - reveiver number;

  • status - call status;

  • audio_path - link to recording of conversation. Present if recording is enabled. The recording is stored in accordance with the user settings.

List of events

  • incoming_call_start - start of an incoming call;
  • incoming_call_start_chain_member_call - start of a calling a number in the dialing;
  • chain;coming_call_end_chain_member_call - end of calling a number in the dialing chain;
  • incoming_call_answer - an answer to a call;
  • incoming_call_end - end of call;
  • outgoing_call_start - start of an outgoing call; 
  • outgoing_call_answer - answer to the call;
  •  outgoing_call_end - end of the call.

List of call statuses

  • cancel - canceled call;
  • answer - answered call;
    noanswer - not answered call;
  • busy - receiver was busy;
  • unavailable - receiver was unavailable;
  • other - error.

For call end events, only statuses "answer" и "noanswer" are valid. To track the status of a specific manager, you need to use statuses for "incoming_call_end_chain_member_call" events .


Incoming calls

Note! 

The "receiver" parameter will change depending on the number to which the call is currently being received. So, when calling a department number within which calls are distributed among managers, the "receiver" parameter will be the department number for  incoming_call_start and incoming_call_end events, but at the same time - the number of a specific manager for these events: incoming_call_start_chain_member_call, incoming_call_answer, incoming_call_end_chain_member_call.


Start of the call:

{ 
"event" => "incoming_call_start", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001" 
}

Starting a call to a number in the dialing chain:

{
 "event" => "incoming_call_start_chain_member_call", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001" 
}

End of a call to a number in the dialing chain:

{
 "event" => "incoming_call_end_chain_member_call", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001", 
"status" => "NOANSWER" 
}

Answer to the call:

{
"event" => "incoming_call_answer", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001" 
}

End of the call:

{
 "event" => "incoming_call_end", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"duration" => "102.0", 
"caller" => "+33290000000", 
"receiver" => "+33290000001", 
"status" => "NOANSWER", 
"audio_path" => "http://frrecords.sipsim.com" 
}

Outgoing calls


Start of the call:


{
 "event" => "outgoing_call_start" 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001" 
}

Answer to the call:

{ 
"event" => "outgoing_call_answer" 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"caller" => "+33290000000", 
"receiver" => "+33290000001" 
}

End of the call:

{ 
"event" => "outgoing_call_end", 
"time" => "2020-04-06T05:28:15.174Z", 
"pbx_id" => "1557491089.930439", 
"duration" => "102.0", 
"caller" => "+33290000000", "receiver" => "+33290000001", 
"status" => "NOANSWER",
"audio_path" => "http://frrecords.sipsim.com/monitor/04ec5d3b" 
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article