<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+REST+Data+Models">Asterisk 12 REST Data Models</a></h2>
<h4>Page <b>added</b> by <a href="https://wiki.asterisk.org/wiki/display/~dlee">David M. Lee</a>
</h4>
<br/>
<div class="notificationGreySide">
<div>
<ul>
<li><a href='#Asterisk12RESTDataModels-DialplanCEP'>DialplanCEP</a></li>
<li><a href='#Asterisk12RESTDataModels-StasisStart'>StasisStart</a></li>
<li><a href='#Asterisk12RESTDataModels-Channel'>Channel</a></li>
<li><a href='#Asterisk12RESTDataModels-Event'>Event</a></li>
<li><a href='#Asterisk12RESTDataModels-ChannelStateChange'>ChannelStateChange</a></li>
<li><a href='#Asterisk12RESTDataModels-Recording'>Recording</a></li>
<li><a href='#Asterisk12RESTDataModels-Endpoint'>Endpoint</a></li>
<li><a href='#Asterisk12RESTDataModels-ApplicationReplaced'>ApplicationReplaced</a></li>
<li><a href='#Asterisk12RESTDataModels-AsteriskInfo'>AsteriskInfo</a></li>
<li><a href='#Asterisk12RESTDataModels-CallerID'>CallerID</a></li>
<li><a href='#Asterisk12RESTDataModels-StasisEnd'>StasisEnd</a></li>
<li><a href='#Asterisk12RESTDataModels-Originated'>Originated</a></li>
<li><a href='#Asterisk12RESTDataModels-Bridge'>Bridge</a></li>
<li><a href='#Asterisk12RESTDataModels-Dialed'>Dialed</a></li>
</ul></div>
<h1><a name="Asterisk12RESTDataModels-DialplanCEP"></a>DialplanCEP</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "DialplanCEP",
"name" : "",
"properties" : {
"context" : {
"type" : "string",
"required" : true,
"description" : "Context in the dialplan"
},
"exten" : {
"type" : "string",
"required" : true,
"description" : "Extension in the dialplan"
},
"priority" : {
"type" : "long",
"required" : true,
"description" : "Priority in the dialplan"
}
}
}</pre>
</div></div>
<ul>
        <li>context: string- Context in the dialplan</li>
        <li>exten: string- Extension in the dialplan</li>
        <li>priority: long- Priority in the dialplan</li>
</ul>
<h1><a name="Asterisk12RESTDataModels-StasisStart"></a>StasisStart</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "StasisStart",
"name" : "",
"properties" : {
"args" : {
"type" : "List[string]",
"required" : false,
"description" : "Arguments to the application"
},
"channel_info" : {
"type" : "Channel",
"required" : false
}
}
}</pre>
</div></div>
<ul>
        <li>args: <a href="#Asterisk12RESTDataModels-List%5Cstring%5C">List[string]</a>- Arguments to the application</li>
        <li>channel_info: <a href="#Asterisk12RESTDataModels-Channel">Channel</a></li>
</ul>
<h1><a name="Asterisk12RESTDataModels-Channel"></a>Channel</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Channel",
"name" : "",
"properties" : {
"name" : {
"type" : "string",
"required" : true,
"description" : "Name of the channel (i.e. SIP/foo-0000a7e3)"
},
"peeraccount" : {
"type" : "string",
"required" : true
},
"parkinglot" : {
"type" : "string",
"required" : true
},
"state" : {
"type" : "string",
"required" : true
},
"appl" : {
"type" : "string",
"required" : true,
"description" : "Currently executing dialplan application"
},
"data" : {
"type" : "string",
"required" : true,
"description" : "Arguments passed to appl"
},
"uniqueid" : {
"type" : "string",
"required" : true,
"description" : "Unique identifier of the channel"
},
"userfield" : {
"type" : "string",
"required" : true
},
"creationtime" : {
"type" : "Date",
"required" : true,
"description" : "Timestamp when channel was created"
},
"linkedid" : {
"type" : "string",
"required" : true
},
"dialplan" : {
"type" : "DialplanCEP",
"required" : true,
"description" : "Current location in the dialplan"
},
"connected" : {
"type" : "CallerID",
"required" : true
},
"hangupsource" : {
"type" : "string",
"required" : true
},
"caller" : {
"type" : "CallerID",
"required" : true
},
"accountcode" : {
"type" : "string",
"required" : true
}
}
}</pre>
</div></div>
<ul>
        <li>uniqueid: string- Unique identifier of the channel</li>
        <li>name: string- Name of the channel (i.e. SIP/foo-0000a7e3)</li>
        <li>state: string</li>
        <li>accountcode: string</li>
        <li>peeraccount: string</li>
        <li>userfield: string</li>
        <li>linkedid: string</li>
        <li>parkinglot: string</li>
        <li>hangupsource: string</li>
        <li>appl: string- Currently executing dialplan application</li>
        <li>data: string- Arguments passed to appl</li>
        <li>dialplan: <a href="#Asterisk12RESTDataModels-DialplanCEP">DialplanCEP</a>- Current location in the dialplan</li>
        <li>caller: <a href="#Asterisk12RESTDataModels-CallerID">CallerID</a></li>
        <li>connected: <a href="#Asterisk12RESTDataModels-CallerID">CallerID</a></li>
        <li>creationtime: <a href="#Asterisk12RESTDataModels-Date">Date</a>- Timestamp when channel was created</li>
</ul>
<h1><a name="Asterisk12RESTDataModels-Event"></a>Event</h1>
<p>Asynchronous events from Asterisk. The non-required fields of this object are mutually exclusive.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Event",
"name" : "",
"properties" : {
"application" : {
"type" : "string",
"required" : true,
"description" : "Name of the application receiving the event"
},
"application-replaced" : {
"type" : "ApplicationReplaced",
"required" : false
},
"stasis-start" : {
"type" : "StasisStart",
"required" : false
},
"channel-state-change" : {
"type" : "ChannelStateChange",
"required" : false
},
"stasis-end" : {
"type" : "StasisEnd",
"required" : false
}
}
}</pre>
</div></div>
<ul>
        <li>application: string- Name of the application receiving the event</li>
        <li>stasis-start: <a href="#Asterisk12RESTDataModels-StasisStart">StasisStart</a></li>
        <li>stasis-end: <a href="#Asterisk12RESTDataModels-StasisEnd">StasisEnd</a></li>
        <li>channel-state-change: <a href="#Asterisk12RESTDataModels-ChannelStateChange">ChannelStateChange</a></li>
        <li>application-replaced: <a href="#Asterisk12RESTDataModels-ApplicationReplaced">ApplicationReplaced</a></li>
</ul>
<h1><a name="Asterisk12RESTDataModels-ChannelStateChange"></a>ChannelStateChange</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "ChannelStateChange",
"name" : "",
"properties" : {
"channel_info" : {
"type" : "Channel",
"required" : false
}
}
}</pre>
</div></div>
<ul>
        <li>channel_info: <a href="#Asterisk12RESTDataModels-Channel">Channel</a></li>
</ul>
<h1><a name="Asterisk12RESTDataModels-Recording"></a>Recording</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Recording",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-Endpoint"></a>Endpoint</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Endpoint",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-ApplicationReplaced"></a>ApplicationReplaced</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "ApplicationReplaced",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-AsteriskInfo"></a>AsteriskInfo</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "AsteriskInfo",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-CallerID"></a>CallerID</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "CallerID",
"name" : "",
"properties" : {
"name" : {
"type" : "string",
"required" : true
},
"number" : {
"type" : "string",
"required" : true
}
}
}</pre>
</div></div>
<ul>
        <li>name: string</li>
        <li>number: string</li>
</ul>
<h1><a name="Asterisk12RESTDataModels-StasisEnd"></a>StasisEnd</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "StasisEnd",
"name" : "",
"properties" : {
"channel_info" : {
"type" : "Channel",
"required" : false
}
}
}</pre>
</div></div>
<ul>
        <li>channel_info: <a href="#Asterisk12RESTDataModels-Channel">Channel</a></li>
</ul>
<h1><a name="Asterisk12RESTDataModels-Originated"></a>Originated</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Originated",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-Bridge"></a>Bridge</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Bridge",
"name" : "",
"properties" : { }
}</pre>
</div></div>
<h1><a name="Asterisk12RESTDataModels-Dialed"></a>Dialed</h1>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Confluence; brush: javascript; collapse: true; gutter: false">{
"id" : "Dialed",
"name" : "",
"properties" : { }
}</pre>
</div></div>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+REST+Data+Models">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+REST+Data+Models?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>