/
Events

Events

Simple (general) examples illustrate basic call events:

For an outgoing call from extension 101, the following events can be tracked:

  • 101 Dial-out

  • 101 Answer (if the called party answers)

  • 101 Hangup

For an incoming call (to IVR 099), the following events are generated:

  • Upon successful connection:

    • 099 Dial-in

    • <number of accepting extension> answer (optional for analysis)

    • ... any other events are optional for analysis

    • 099 hangup (bridged:yes - mandatory for analyzing call success)

  • Upon unsuccessful connection:

    • 099 Dial-in

    • ... any other events are optional for analysis

    • 099 hangup (bridged:no - mandatory for analyzing call success)

Complex examples include call forwarding, transfers, etc., during a call's progression. Such calls should be logically grouped upon receiving events, for example, in a standard call for one caller:

  • 099 Dial-in

  • <number of accepting extension> answer (optional for analysis)

  • ... any other events are optional for analysis

  • 099 hangup (bridged:yes - mandatory for analyzing call success)

There might be multiple different internal extension dials, transfers to an external number, etc. If it's necessary to logically correlate any outgoing calls (e.g., transfer to an external number) with the original incoming call, upon receiving a 099 Dial-in, place the call_id in memory (e.g., memcached or redis), and upon receiving 099 hangup with bridged, you can delete the call_id from memory. This way, within one call, all outgoing calls can be correlated with the incoming one by call_id.

For an outgoing call, it's slightly more complex:

  • 101 Dial-out

  • 101 Answer (if the called party answers)

  • 101 Hangup

If during an outgoing call the PBX decides to transfer the call somewhere, there will be another set of events:

Dial-out, Answer (if the called party answers), and Hangup, but with the flag transferred = yes.

Thus, if the call id is not immediately removed from memory during an outgoing call (but is removed with an expiry, for example, 1 minute after hangup), all transfers can be correlated with the original outgoing call.

 

Related content