EVENT basics

EVENT description

Event name

Publish event name. And description of EVENT.

Topic

Event’s topic. If the client subscribe this topic, then can receive this event.

<topic>

Description of the detail of topic.

Event

Description of event. Described in detail.

{
  ...
}

Example

Simple example of the event. It would be little bit different with real response.

{
  ...
}

EVENT

core.agi

Notify core agi event.

core.agi.create

Notify event for core agi create.

Topic

/core/agis/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.agi.create": {
    ...
  }
}
  • See detail at Asterisk’s agi info.

Example

topic: /core/agis/pjagent-02

{
  "core.agi.create": {
    "unique_id": "1516635793.1",
    "channel": "PJSIP/pjagent-02-00000001",
    "linked_id": "1516635793.1",
    "channel_state_desc": "Ring",
    "language": "en",
    "channel_state": 4,
    "caller_id_name": "pjagent-02",
    "caller_id_num": "pjagent-02",
    "priority": "2",
    "connected_line_num": "<unknown>",
    "connected_line_name": "<unknown>",
    "account_code": "",
    "context": "sample-agi-async",
    "env": {
      "agi_request": "async",
      "agi_uniqueid": "1516635793.1",
      "agi_enhanced": "0.0",
      "agi_callingpres": "0",
      "agi_version": "GIT-master-516ab38M",
      "agi_callington": "0",
      "agi_channel": "PJSIP/pjagent-02-00000001",
      "agi_language": "en",
      "agi_extension": "s",
      "agi_type": "PJSIP",
      "agi_callerid": "pjagent-02",
      "agi_callingani2": "0",
      "agi_priority": "2",
      "agi_calleridname": "pjagent-02",
      "agi_dnid": "4006",
      "agi_callingtns": "0",
      "agi_rdnis": "unknown",
      "agi_arg_1": "test argument 1",
      "agi_context": "sample-agi-async",
      "agi_accountcode": "",
      "agi_threadid": "1984414752",
      "agi_arg_2": "test argument 2"
      },
    "exten": "s",
    "cmd": {},
    "tm_update": "2018-01-22T15:43:13.166737961Z"
  }
}

core.agi.update

Notify event for core agi update.

Topic

/core/agis/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.agi.update": {
    ...
  }
}
  • See detail at Asterisk’s channel info.

Example

topic: /core/agi/pjagent-01

{
  "core.agi.update": {
    "unique_id": "1516637665.7",
    "channel_state": 6,
    "caller_id_name": "pjagent-02",
    "tm_update": "2018-01-22T16:14:51.595209834Z",
    "cmd": {
      "77cdcf4c-feed-11e7-bd12-5b24ee4818c3": {
        "result": "200 result=0\n",
        "tm_update": "2018-01-22T16:14:51.595209834Z"
      }
    },
    "linked_id": "1516637665.7",
    "language": "en",
    "channel": "PJSIP/pjagent-02-00000006",
    "channel_state_desc": "Up",
    "caller_id_num": "pjagent-02",
    "connected_line_num": "<unknown>",
    "exten": "s",
    "connected_line_name": "<unknown>",
    "account_code": "",
    "context": "sample-agi-async",
    "priority": "2",
    "env": {
      "agi_request": "async",
      "agi_context": "sample-agi-async",
      "agi_channel": "PJSIP/pjagent-02-00000006",
      "agi_language": "en",
      "agi_type": "PJSIP",
      "agi_uniqueid": "1516637665.7",
      "agi_version": "GIT-master-516ab38M",
      "agi_callerid": "pjagent-02",
      "agi_callingani2": "0",
      "agi_callingtns": "0",
      "agi_calleridname": "pjagent-02",
      "agi_arg_1": "test argument 1",
      "agi_callingpres": "0",
      "agi_callington": "0",
      "agi_dnid": "4006",
      "agi_rdnis": "unknown",
      "agi_extension": "s",
      "agi_accountcode": "",
      "agi_priority": "2",
      "agi_enhanced": "0.0",
      "agi_threadid": "1954337824",
      "agi_arg_2": "test argument 2"
    }
  }
}

core.agi.delete

Notify event for core agi delete.

Topic

/core/agis/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.agi.delete": {
    ...
  }
}
  • See detail at Asterisk’s channel info.

Example

topic: /core/agi/pjagent-01

{
  "core.agi.delete": {
    "unique_id": "1516637665.7",
    "channel_state": 6,
    "caller_id_name": "pjagent-02",
    "tm_update": "2018-01-22T16:24:23.1900430Z",
    "cmd": {
      "77cdcf4c-feed-11e7-bd12-5b24ee4818c3": {
        "result": "200 result=0\n",
        "tm_update": "2018-01-22T16:14:51.595209834Z"
      }
    },
    "linked_id": "1516637665.7",
    "language": "en",
    "channel": "PJSIP/pjagent-02-00000006",
    "channel_state_desc": "Up",
    "caller_id_num": "pjagent-02",
    "connected_line_num": "<unknown>",
    "exten": "s",
    "connected_line_name": "<unknown>",
    "account_code": "",
    "context": "sample-agi-async",
    "priority": "2",
    "env": {
      "agi_request": "async",
      "agi_context": "sample-agi-async",
      "agi_channel": "PJSIP/pjagent-02-00000006",
      "agi_language": "en",
      "agi_type": "PJSIP",
      "agi_uniqueid": "1516637665.7",
      "agi_version": "GIT-master-516ab38M",
      "agi_callerid": "pjagent-02",
      "agi_callingani2": "0",
      "agi_callingtns": "0",
      "agi_calleridname": "pjagent-02",
      "agi_arg_1": "test argument 1",
      "agi_callingpres": "0",
      "agi_callington": "0",
      "agi_dnid": "4006",
      "agi_rdnis": "unknown",
      "agi_extension": "s",
      "agi_accountcode": "",
      "agi_priority": "2",
      "agi_enhanced": "0.0",
      "agi_threadid": "1954337824",
      "agi_arg_2": "test argument 2"
    }
  }
}

core.channel

Notify core channel event.

core.channel.create

Notify event for core channel create.

Topic

/core/channels/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.channel.create": {
    ...
  }
}
  • See detail at Asterisk’s channel info.

Example

topic: /core/channels/pjagent-01

{
  "core.channel.create": {
    "unique_id": "1513946313.6",
    "duration": null,
    "linked_id": "1513946313.6",
    "context": "demo",
    "connected_line_num": "<unknown>",
    "account_code": "",
    "channel_state_desc": "Ring",
    "connected_line_name": "<unknown>",
    "caller_id_name": "pjagent-01",
    "channel": "PJSIP/pjagent-01-00000006",
    "channel_state": 4,
    "caller_id_num": "pjagent-01",
    "language": "en",
    "exten": "4002",
    "variables": {},
    "hangup_cause": null,
    "priority": "1",
    "application": null,
    "application_data": null,
    "tm_update": "2017-12-22T12:38:33.971448254Z",
    "bridge_id": null,
    "hangup_cause_desc": null
  }
}

core.channel.update

Notify event for core channel update.

Topic

/core/channels/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.channel.update": {
    ...
  }
}
  • See detail at Asterisk’s channel info.

Example

topic: /core/channels/pjagent-01

{
  "core.channel.update": {
    "unique_id": "1513946313.6",
    "duration": null,
    "linked_id": "1513946313.6",
    "context": "queue_sales",
    "connected_line_num": "<unknown>",
    "account_code": "",
    "channel_state_desc": "Ring",
    "connected_line_name": "<unknown>",
    "caller_id_name": "pjagent-01",
    "channel": "PJSIP/pjagent-01-00000006",
    "channel_state": 4,
    "caller_id_num": "pjagent-01",
    "language": "en",
    "exten": "s",
    "variables": {
      "ABANDONED": "TRUE"
    },
    "hangup_cause": null,
    "priority": "2",
    "application": "Queue",
    "application_data": "",
    "tm_update": "2017-12-22T12:38:37.542000617Z",
    "bridge_id": null,
    "hangup_cause_desc": null
  }
}

core.channel.delete

Notify event for core channel delete.

Topic

/core/channels/<target>
  • target: URI encoded caller_id_name.

Event

{
  "core.channel.delete": {
    ...
  }
}
  • See detail at Asterisk’s channel info.

Example

topic: /core/channels/pjagent-01

{
  "core.channel.delete": {
    "unique_id": "1513946313.6",
    "duration": null,
    "linked_id": "1513946313.6",
    "context": "queue_sales",
    "connected_line_num": "<unknown>",
    "account_code": "",
    "channel_state_desc": "Ring",
    "connected_line_name": "<unknown>",
    "caller_id_name": "pjagent-01",
    "channel": "PJSIP/pjagent-01-00000006",
    "channel_state": 4,
    "caller_id_num": "pjagent-01",
    "language": "en",
    "exten": "s",
    "variables": {
      "ABANDONED": "TRUE",
      "QUEUEPOSITION": "1"
    },
    "hangup_cause": 127,
    "priority": "2",
    "application": "Queue",
    "application_data": "",
    "tm_update": "2017-12-22T12:38:37.623937167Z",
    "bridge_id": null,
    "hangup_cause_desc": "Interworking, unspecified"
  }
}

park.parkedcall

Notify park parkedcall event.

core.channel.create

Notify event for core channel create.

Topic

/park/parkinglots/<target>
  • target: URI encoded parking lot.

Event

{
  "park.parkedcall.create": {
    ...
  }
}
  • See detail at parkedcall info.

Example

topic: /park/parkinglots/default

{
  "park.parkedcall.create": {
    "parkee_unique_id": "1514424631.119",
    "parking_lot": "default",
    "parkee_caller_id_num": "pjagent-01",
    "parkee_exten": "s",
    "parkee_linked_id": "1514424631.119",
    "parkee_connected_line_num": "<unknown>",
    "parkee_channel": "PJSIP/pjagent-01-00000048",
    "parkee_account_code": "",
    "parkee_caller_id_name": "pjagent-01",
    "parkee_channel_state_desc": "Up",
    "tm_update": "2017-12-28T01:30:31.382834514Z",
    "parkee_channel_state": "6",
    "parking_timeout": 45,
    "parkee_connected_line_name": "<unknown>",
    "parkee_context": "sample_park",
    "parker_dial_string": "PJSIP/pjagent-01",
    "parking_duration": 0,
    "parkee_priority": "2",
    "parking_space": "701"
  }
}

park.parkedcall.update

Notify event for park parkedcall update.

Topic

/park/parkinglots/<target>
  • target: URI encoded parking lot.

Event

{
  "park.parkedcall.update": {
    ...
  }
}
  • See detail at parkedcall info.

Example

...

park.parkedcall.delete

Notify event for park parkedcall delete.

Topic

/park/parkinglots/<target>
  • target: URI encoded parking lot.

Event

{
  "park.parkedcall.delete": {
    ...
  }
}
  • See detail at parkedcall info.

Example

topic: /park/parkinglots/default

{
  "park.parkedcall.delete": {
    "parkee_unique_id": "1514425145.127",
    "parking_lot": "default",
    "parkee_caller_id_num": "pjagent-01",
    "parkee_exten": "s",
    "parkee_linked_id": "1514425145.127",
    "parkee_connected_line_num": "<unknown>",
    "parkee_channel": "PJSIP/pjagent-01-0000004c",
    "parkee_account_code": "",
    "parkee_caller_id_name": "pjagent-01",
    "parkee_channel_state_desc": "Up",
    "tm_update": "2017-12-28T01:39:05.298799696Z",
    "parkee_channel_state": "6",
    "parking_timeout": 45,
    "parkee_connected_line_name": "<unknown>",
    "parkee_context": "sample_park",
    "parker_dial_string": "PJSIP/pjagent-01",
    "parking_duration": 0,
    "parkee_priority": "2",
    "parking_space": "701"
  }
}

queue.entry

Queue enty event.

queue.entry.delete

Event for queue entry delete.

Topic

/queue/statuses/<target>
  • target: URI encoded queue name.

Event

{
  "queue.entry.delete": {
    "unique_id": "<string>",

    "queue_name": "<string>",
    "channel": "<string>",

    "caller_id_name": "<string>",
    "caller_id_num": "<string>",
    "connected_line_name": "<string>",
    "connected_line_num": "<string>",

    "position": <number>,
    "wait": <number>,

    "tm_update": "<timestamp>"
  }
}
  • See detail at Asterisk’s queue info.

Example

topic: /queue/statuses/sales%5F1

{
  "queue.entry.delete": {
    "unique_id": "1513886574.11",
    "connected_line_num": "<unknown>",
    "queue_name": "sales_1",
    "wait": null,
    "position": 1,
    "channel": "PJSIP/pjagent-01-0000000b",
    "caller_id_num": "pjagent-01",
    "caller_id_name": "pjagent-01",
    "connected_line_name": "<unknown>",
    "tm_update": "2017-12-21T20:02:55.766020378Z"
  }
}

queue.entry.update

Event for queue entry insert/update.

Topic

/queue/statuses/<target>
  • target: URI encoded queue name.

Event

{
  "queue.entry.update": {
    "unique_id": "<string>",

    "queue_name": "<string>",
    "channel": "<string>",

    "caller_id_name": "<string>",
    "caller_id_num": "<string>",
    "connected_line_name": "<string>",
    "connected_line_num": "<string>",

    "position": <number>,
    "wait": <number>,

    "tm_update": "<timestamp>"
  }
}
  • See detail at Asterisk’s queue info.

Example

topic: /queue/statuses/sales%5F1

{
  "queue.entry.update": {
    "unique_id": "1513887042.12",
    "caller_id_name": "pjagent-01",
    "connected_line_num": "<unknown>",
    "position": 1,
    "tm_update": "2017-12-21T20:10:43.841799160Z",
    "queue_name": "sales_1",
    "channel": "PJSIP/pjagent-01-0000000c",
    "caller_id_num": "pjagent-01",
    "connected_line_name": "<unknown>",
    "wait": null
  }
}

queue.member

Queue member event.

queue.member.delete

Event for queue member delete.

Topic

/queue/statuses/<target>
  • target: URI encoded queue name.

Event

{
  "queue.entry.delete": {
     "id": "<string>",
     "name": "<string>",
     "queue_name": "<string>",
     "status": <integer>,

     "membership": "<string>",
     "state_interface": "<string>",
     "location": "<string>",

     "paused": <integer>,
     "paused_reason": "<string>",
     "penalty": <integer>,

     "calls_taken": <integer>,
     "in_call": <integer>,

     "last_call": <integer>,
     "last_pause": <integer>,

     "ring_inuse": <integer>,

     "tm_update": "<timestamp>"
  }
}
  • See detail at Asterisk’s queue info.

Example

topic: /queue/statuses/sales%5F1

{
  "queue.member.delete": {
    "location": "sip/agent-01",
    "penalty": 0,
    "ring_inuse": 1,
    "id": "sip/agent-01@sales_1",
    "state_interface": "sip/agent-01",
    "queue_name": "sales_1",
    "name": "sip/agent-01",
    "membership": "dynamic",
    "calls_taken": 0,
    "last_call": 0,
    "last_pause": 0,
    "in_call": 0,
    "status": 4,
    "paused": 0,
    "paused_reason": "",
    "tm_update": "2017-12-21T21:35:04.605327430Z"
  }
}

queue.member.update

Event for queue member insert/update.

Topic

/queue/statuses/<target>
  • target: URI encoded queue name.

Event

{
  "queue.member.update": {
     "id": "<string>",

     "name": "<string>",
     "queue_name": "<string>",
     "status": <integer>,

     "membership": "<string>",
     "state_interface": "<string>",
     "location": "<string>",

     "paused": <integer>,
     "paused_reason": "<string>",
     "penalty": <integer>,

     "calls_taken": <integer>,
     "in_call": <integer>,

     "last_call": <integer>,
     "last_pause": <integer>,

     "ring_inuse": <integer>,

     "tm_update": "<timestamp>"
  }
}
  • See detail at Asterisk’s queue info.

Example

topic: /queue/statuses/sales%5F1

{
  "queue.member.update": {
    "location": "sip/agent-01",
    "penalty": 0,
    "ring_inuse": 1,
    "id": "sip/agent-01@sales_1",
    "state_interface": "sip/agent-01",
    "queue_name": "sales_1",
    "name": "sip/agent-01",
    "membership": "dynamic",
    "calls_taken": 0,
    "last_call": 0,
    "last_pause": 0,
    "in_call": 0,
    "status": 4,
    "paused": 0,
    "paused_reason": "",
    "tm_update": "2017-12-21T21:35:04.605327430Z"
  }
}

queue.queue

queue.queue.update

Topic

/queue/statuses/<target>
  • target: URI encoded queue name.

Event

{
  "queue.queue.update": {
    "name": "<string>",

    "strategy": "<string>",
    "max": <integer>,
    "weight": <integer>,

    "calls": <integer>,
    "completed": <integer>,
    "abandoned": <integer>,

    "hold_time": <integer>,
    "talk_time": <integer>,

    "service_level": <integer>,
    "service_level_perf": <integer>,

    "tm_update": "<timestamp>"
  }
}
  • See detail at Asterisk’s queue info.

Example

topic: /queue/statuses/sales%5F1

{
  "queue.queue.update": {
    "weight": 0,
    "name": "sales_1",
    "service_level": 5,
    "abandoned": 6,
    "service_level_perf": 0.0,
    "max": 0,
    "hold_time": 0,
    "strategy": "ringall",
    "calls": 0,
    "tm_update": "2017-12-21T18:35:17.131303352Z",
    "talk_time": 0,
    "completed": 0
  }
}