Send Events (WebHook)¶
The Web service application will be called by While1 Voice when an agent answers to a call, on a URL that will be set in Edit Project - sendEvent field. The webservice's response has to be in the form of an empty content with header 200.
Events are sent for the following types of actions:- Answer Events (queue_answer, queue_answer_end, dial_answer, call_forward_answer)
- Missed Calls (missed_calls)
- Outgoing Calls (outgoing_end)
1. Answer Events¶
URL Example:
http://example.com/api/while1voice_ev?event=queue_answer&direction=IN&project_id=1&agent=test-user&remote_number=&telephone=0700000000&dnid=0300000000&dnid_identifier=&contact_id=&queue=callcenter-queue&uniqueid=1234567890.12Sent parameters (GET method):
- event => it can be: queue_answer, queue_answer_end, dial_answer or call_forward_answer
- direction => IN
- project_id => external identifier of the project
- agent => the user who answered the call
- remote number => numarul de mobil extern care a raspuns apelului (fallback_number sau remote_agent)
- telephone => caller's number
- dnid => the dialed number
- dnid_identifier => PBX :: Inbound routes :: Edit route - External identifier
- contact_id => the caller ID retrieved from the Caller Data Retrieval Webservice
- queue => queue name
- uniqueid => Unique call ID
2. Missed calls¶
URL Example:
http://example.com/api/while1voice_ev?event=missed_calls&project_id=123&queue=test-queue&queue_hold_time=1&telephone=0700000000&dnid=0210000000&dnid_identifier=&contact_id=123456&fail_reason=queue_hangup&explain_reason=&uniqueid=1234567890.12Sent parameters (GET method):
- event => it can be: missed_calls
- project_id => external identifier of the project
- queue => queue name
- queue_hold_time => waiting time in queue, in seconds
- telephone => caller's number
- dnid => the dialed number
- dnid_identifier => PBX :: Inbound routes :: Edit route - External identifier
- contact_id => the caller ID retrieved from the Caller Data Retrieval Webservice
- fail_reason => the reason for the missed call (e.g.: queue_hangup, forward_hangup, no_schedule, queue_busy)
- explain_reason => the explanation for fail_reason (queue status or call status)
- uniqueid => Unique call ID
3. Outgoing calls¶
URL Example:
http://example.com/api/while1voice_ev?event=outgoing_end&direction=OUT&project_id=123&agent=test-user&telephone=0700000000&dnid=0210000000&dnid_identifier=&contact_id=123456&dialstatus=BUSY&duration=&uniqueidSent parameters (GET method):
- event => it can be: outgoing_end
- direction => OUT
- project_id => external identifier of the project
- agent => the user who dialed
- telephone => calee's number
- dnid => the number from which the user called
- dnid_identifier => PBX :: Inbound routes :: Edit route - External identifier
- contact_id => the caller ID retrieved from the Callee Data Retrieval Webservice
- dialstatus => dial status
- duration => call duration
- uniqueid => Unique call ID
Available in other languages: RO
Go to top