How to Listen for Events
Warning: Beta software
This API is in beta stage and may be subject to change. Therefore, we do not recommend using this in production.
Interested in this feature? Please reach out to mobility-services-developer@cisco.com
Overview
The event API allows you to subscribe to a variety of different events generated by Cisco's systems.
The examples will start a subscription to voice and voicemail events, which includes call initiated, call ended and
new voicemail received.
Prerequisites
- An OAuth 2.0 client
- A client access token
Required Scope
Event type |
Required scope |
CONSENT_REVOKE_EVENT |
|
HANDSET_UPDATE_EVENT |
events.handset_update.subscribe |
LOCATION_UPDATE_EVENT |
events.location.subscribe |
ROAMING_EVENT |
events.roaming.subscribe |
SMS_EVENT |
events.sms.subscribe |
SMS_DELIVERY_EVENT |
events.sms_delivery_report.subscribe |
VOICE_EVENT |
events.voice.subscribe |
VOICEMAIL_EVENT |
events.voicemail.subscribe |
Consent Revoke
This event will fire when the OAuth2.0 consent is revoked for a subscription.
It allows the application to cleanup user state. This may either be via our
revoke flow or from customer support.
Handset Update
This event will fire when a SIM card is used in a new device.
It will contain the previous and current IMEI.
Location Update
This event will fire when the handset is registering at a new location.
Roaming
This event will fire on the first location update in a new country.
It will contain the country code and name for the previous and current country.
SMS
This event will fire every time an SMS is sent or received by the handset.
This contains the from and to address in addition to the actual content of the SMS.
SMS Delivery Report
This event will fire when a SMS delivery report is generated.
This contains the from and to address, and the status for the SMS sent.
Voice
This will fire for when a call is initiated, ringing, answered, sent to voicemail or hung up.
It will contain from and to number, call ID and which type of call event it is.
Voicemail
This will fire when a voicemail is left for a subscription.
It contains from and to number and the ID of the voicemail. The actual content of the voicemail may be retrieved by
a separate API using this ID.
Code Dependencies
Code, Listen for Events
If targeting production, you would need to add authentication to the sample code.
Example Results, Listen for Events
Manual Acknowledge
In the below example we enable manual acknowledgement, and set a custom ack timeout. This provides more control and flexibility when handling events.
Code, Manual Acknowledge
Example Results, Manual Acknowledge
Read More