Asterisk ari: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 4: | Line 4: | ||
== Stasis == | == Stasis == | ||
Stasis is a dialplan application in Asterisk. It is the mechanism that Asterisk uses to hand control of a channel over from the dialplan - which is the traditional way in which channels are controlled - to ARI and the client. Generally, ARI application manipulate channels in the Stasis dialplan application, as well as other resources in Asterisk. Channels not in a Stasis application generally cannot be manipulated by ARI - the purpose of ARI, after all, is to build your own application, not manipulate an exisiting one. | Stasis is a dialplan application in Asterisk. It is the mechanism that Asterisk uses to hand control of a channel over from the dialplan - which is the traditional way in which channels are controlled - to ARI and the client. Generally, ARI application manipulate channels in the Stasis dialplan application, as well as other resources in Asterisk. Channels not in a Stasis application generally cannot be manipulated by ARI - the purpose of ARI, after all, is to build your own application, not manipulate an exisiting one. | ||
== Event subscribing == | |||
Resources in Asterisk do not, by default, send events about themselves to a connected ARI application. In order to get events about resources, one of three things must occur. | |||
* The resource must be a channel that entered into a Stasis dialplan application. A subscription is implicitly created in this case. The subscription is implicitly destroyed when the channel leaves the Stasis dialplan application. | |||
* While a channel is in a Stasis dialplan application, the channel may interact with other resources - such as a bridge. While channels interact with the resource, a subscription is made to that resource. When no more channels in a Stasis dialplan application are interacting with the resource, the implicit subscription is destroyed. | |||
* At any time, an ARI application may make a subscription to a resource in Asterisk through application operations. While that resources exists, the ARI application owns the subscription. | |||
== See also == | == See also == |
Revision as of 09:25, 28 November 2018
Overview
ARI(Asterisk REST Interface) 내용 정리.
Stasis
Stasis is a dialplan application in Asterisk. It is the mechanism that Asterisk uses to hand control of a channel over from the dialplan - which is the traditional way in which channels are controlled - to ARI and the client. Generally, ARI application manipulate channels in the Stasis dialplan application, as well as other resources in Asterisk. Channels not in a Stasis application generally cannot be manipulated by ARI - the purpose of ARI, after all, is to build your own application, not manipulate an exisiting one.
Event subscribing
Resources in Asterisk do not, by default, send events about themselves to a connected ARI application. In order to get events about resources, one of three things must occur.
- The resource must be a channel that entered into a Stasis dialplan application. A subscription is implicitly created in this case. The subscription is implicitly destroyed when the channel leaves the Stasis dialplan application.
- While a channel is in a Stasis dialplan application, the channel may interact with other resources - such as a bridge. While channels interact with the resource, a subscription is made to that resource. When no more channels in a Stasis dialplan application are interacting with the resource, the implicit subscription is destroyed.
- At any time, an ARI application may make a subscription to a resource in Asterisk through application operations. While that resources exists, the ARI application owns the subscription.