Zum Hauptinhalt springen

Connecting the ACD to external web services

Queue status URL

The PBX can send updates to an external server using HTTP or HTTPS. The setting for this is at the bottom of the ACD page, called "Queue status URL". The setting may take one of the following values (only one URL at a time is possible):

  • json/jsons: When using the json scheme, the PBX sends a JSON object to the address provided behind the scheme. For example, "json://acd.domain.com/acd123" would send the content to "http://acd.domain.com/acd123". When using jsons, the system uses https instead of http.
  • soap/soaps: When using the soap scheme, the PBX sends a XML object to the address provided behind the scheme. For example, "soap://acd.domain.com/acd123" would send the content to "http://acd.domain.com/acd123". When using soaps, the system uses https instead of http.

The system always uses POST to send the data. The return value is ignored. If the requests fails with a code higher or equal than 400, the PBX will re-try to send the request up to three times. This will help increasing the probability that the requests actually makes it.

Content of the request

The request updates the state of a caller. The PBX sends requests for various states the ACD call may go through. The last request will indicate that the call was terminated, so that the application server may take the call out of the list.

  • acd: This element contains the ACD primary account name. It can be used to identify which ACD is being called.

  • callid: This element contains the primary Call-ID for the call. This ID will also be used in the CDR reporting (using the webcdr scheme).

  • from, to: These headers contains the value of the from and to fields of the call and can be used to indicate where the call comes from and which number has been dialed. The format is according to the SIP header standard.

  • duration: This header shows the duration in seconds since the call entered the ACD. This value is of particular interest when the call is still in the waiting state.

  • state: This string contains the state of the call. The state is one of the following values:

    • waiting: The caller is waiting in the queue.
    • connected: The call is connected with an agent.
    • terminated: The call has left the ACD account. Typically that means one side has disconnected the call.
  • extension: The extension where the call is currently connected to.

  • reason: Additional information when the call was terminated.

    • normal: This means normal call clearing where either side disconnected the call.
    • rw: The call was redirected by the ACD while waiting
    • rr: The call was redirected by the ACD while an agent was ringing
    • hw: The caller hung up while waiting
    • hr: The caller hung up while ringing
    • user: The user pressed a key to get out of the queue

Examples

The following example shows a XML request that is send by the PBX:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sns="http://soap.com/pbx">
<env:Body>
<sns:ACDWelcome>
<Queue>sip:73@pbx.company.com</Queue>
<CallID>'9479cafa-18966f55-cd0021a8@192.168.1.113#e510828f0c'</CallID>
<From>"Fourty Eight" \<sip:48@pbx.company.com\></From>
<To>\<sip:73@pbx.company.com\></To>
<Duration>0</Duration>
<State></State>
<Extension>48@pbx.company.com</Extension>
</sns:ACDWelcome>
</env:Body>
</env:Envelope>

The next example shows a JSON request that is sent by the PBX:

{ "acd":"73", "callid":"68ae7959-9ed2243e-96fa903f@192.168.203.115", "from":"\"Forty Four\" <sip:44@pbx.company.com>", "to":"\"ACD\" <sip:73@pbx.company.com>", "duration":46, "state":"terminated", "extension":"40", "reason":"normal" }