Telephony web event system and method
An embodiment of the system for publishing events of a telephony application to a client includes a call router that generates events from the telephony application and an event router that manages the publication of events generated by the call router and that manages the subscription to events by clients. The system can be used with a telephony application that interfaces with a telephony device and an application server.
1. A method comprising:
receiving, at a telephony system, an application instruction of an application server that is external to the telephony system, the application instruction received using an application programming interface (API) via a network;
in response to the application instruction, performing a telephony action;
publishing an event corresponding to the telephony action to an event router of the telephony system; and
sending the published event from the event router to a subscriber.
2. The method of claim 1 , wherein:
the application instruction is a telephony instruction;
the performing of the telephony action causes the event to occur;
the telephony instruction is an instruction of an account of a plurality of accounts of the telephony system; and
the event is an event of the account.
3. The method of claim 1 , further comprising:
before receiving the application instruction, by the telephony system, establishing a subscription by the subscriber for events associated with a type of the published event.
4. The method of claim 1 , further comprising:
sending the published event to the application server.
5. The method of claim 1 , wherein the application instruction is an instruction to dial a phone number.
6. The method of claim 1 , wherein the telephony action comprises dialing a number.
7. The method of claim 1 , wherein the telephony action comprises starting a Text-To-Speech conversion.
8. The method of claim 1 , wherein the telephony action comprises playing an audio file.
9. A telephony system comprising:
a memory that stores instructions; and
one or more processors configured by the instructions to perform operations comprising:
receiving an application instruction of an application server that is external to the telephony system, the application instruction received using an application programming interface (API) via a network;
in response to the application instruction, performing a telephony action;
publishing an event corresponding to the telephony action to an event router; and
sending the published event from the event router to a subscriber.
10. The telephony system of claim 9 , wherein:
the application instruction is a telephony instruction;
the performing of the telephony action causes the event to occur;
the telephony instruction is an instruction of an account of a plurality of accounts of the telephony system; and
the event is an event of the account.
11. The telephony system of claim 9 , wherein the operations further comprise:
before receiving the application instruction, establishing a subscription by the subscriber for events associated with a type of the published event.
12. The telephony system of claim 9 , wherein the operations further comprise:
sending the published event to the application server.
13. The telephony system of claim 9 , wherein the application instruction is an instruction to dial a phone number.
14. The telephony system of claim 9 , wherein the telephony action comprises dialing a number.
15. The telephony system of claim 9 , wherein the telephony action comprises starting a Text-To-Speech conversion.
16. The telephony system of claim 9 , wherein the telephony action comprises playing an audio file.
17. A non-transitory machine-readable medium that stores instructions that, when executed by one or more processors of a telephony system, cause the telephony system to perform operations comprising:
receiving an application instruction of an application server external that is to the telephony system, the application instruction received using an application programming interface (API) via a network;
in response to the application instruction, performing a telephony action;
publishing an event corresponding to the telephony action to an event router; and
sending the published event from the event router to a subscriber.
18. The machine-readable medium of claim 17 , wherein:
the application instruction is a telephony instruction;
the performing of the telephony action causes the event to occur;
the telephony instruction is an instruction of an account of a plurality of accounts of the telephony system; and
the event is an event of the account.
19. The machine-readable medium of claim 17 , wherein the operations further comprise:
before receiving the application instruction, establishing a subscription by the subscriber for events associated with a type of the published event.
20. The machine-readable medium of claim 17 , wherein the operations further comprise:
sending the published event to the application server.