Skip to content

Commit

Permalink
Modify kapi_call module to use kapi_definition module (2600hz#6389)
Browse files Browse the repository at this point in the history
  • Loading branch information
harenson authored and jamesaimonetti committed Mar 30, 2020
1 parent 5f1d0ba commit 68ff564
Show file tree
Hide file tree
Showing 15 changed files with 1,680 additions and 588 deletions.
6 changes: 4 additions & 2 deletions applications/acdc/src/kapi_acdc_agent.erl
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ stats_resp_v(JObj) ->
-define(AGENT_KEY, "acdc.agent.action."). % append queue ID

-define(AGENT_HEADERS, [<<"Account-ID">>, <<"Agent-ID">>]).
-define(OPTIONAL_AGENT_HEADERS, [<<"Time-Limit">>, <<"Queue-ID">>
,<<"Presence-ID">>, <<"Presence-State">>
-define(OPTIONAL_AGENT_HEADERS, [<<"Presence-ID">>
,<<"Presence-State">>
,<<"Queue-ID">>
,<<"Time-Limit">>
]).
-define(AGENT_VALUES, [{<<"Event-Category">>, <<"agent">>}
,{<<"Presence-State">>, kapi_presence:presence_states()}
Expand Down
301 changes: 293 additions & 8 deletions applications/crossbar/priv/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -6895,9 +6895,9 @@
},
"Presence-State": {
"enum": [
"offline",
"online",
"trying",
"online",
"offline",
"early",
"confirmed",
"terminated"
Expand Down Expand Up @@ -6943,9 +6943,9 @@
},
"Presence-State": {
"enum": [
"offline",
"online",
"trying",
"online",
"offline",
"early",
"confirmed",
"terminated"
Expand Down Expand Up @@ -6991,9 +6991,9 @@
},
"Presence-State": {
"enum": [
"offline",
"online",
"trying",
"online",
"offline",
"early",
"confirmed",
"terminated"
Expand Down Expand Up @@ -7067,9 +7067,9 @@
},
"Presence-State": {
"enum": [
"offline",
"online",
"trying",
"online",
"offline",
"early",
"confirmed",
"terminated"
Expand Down Expand Up @@ -10618,6 +10618,291 @@
],
"type": "object"
},
"kapi.call": {
"description": "AMQP API for call",
"properties": {
"Application-Data": {
"type": "string"
},
"Application-Event": {
"type": "string"
},
"Application-Name": {
"type": "string"
},
"Application-Response": {
"type": "string"
},
"Billing-Seconds": {
"type": "string"
},
"Bridge-B-Unique-ID": {
"type": "string"
},
"Bridge-Hangup-Cause": {
"type": "string"
},
"Call-Debug": {
"type": "string"
},
"Call-Direction": {
"type": "string"
},
"Call-ID": {
"type": "string"
},
"Callee-ID-Name": {
"type": "string"
},
"Callee-ID-Number": {
"type": "string"
},
"Caller-Destination-Number": {
"type": "string"
},
"Caller-ID-Name": {
"type": "string"
},
"Caller-ID-Number": {
"type": "string"
},
"Channel-Answer-State": {
"type": "string"
},
"Channel-Call-State": {
"type": "string"
},
"Channel-Created-Time": {
"type": "integer"
},
"Channel-Debug": {
"type": "string"
},
"Channel-Is-Loopback": {
"type": "string"
},
"Channel-Loopback-Bowout": {
"type": "string"
},
"Channel-Loopback-Bowout-Execute": {
"type": "string"
},
"Channel-Loopback-Leg": {
"type": "string"
},
"Channel-Loopback-Other-Leg-ID": {
"type": "string"
},
"Channel-Moving": {
"type": "string"
},
"Channel-Name": {
"type": "string"
},
"Channel-State": {
"type": "string"
},
"Conference-Config": {
"type": "string"
},
"Conference-Name": {
"type": "string"
},
"Connecting-Leg-A-UUID": {
"type": "string"
},
"Connecting-Leg-B-UUID": {
"type": "string"
},
"Control-Queue": {
"type": "string"
},
"Custom-Application-Vars": {
"type": "object"
},
"Custom-Channel-Vars": {
"type": "object"
},
"Custom-SIP-Headers": {
"type": "object"
},
"DTMF-Digit": {
"type": "string"
},
"DTMF-Duration": {
"type": "string"
},
"Detected-Tone": {
"type": "string"
},
"Digits-Dialed": {
"type": "string"
},
"Disposition": {
"type": "string"
},
"Duration-Seconds": {
"type": "string"
},
"Endpoint-Disposition": {
"type": "string"
},
"Event-Category": {
"enum": [
"call_event"
],
"type": "string"
},
"Event-Name": {
"type": "string"
},
"Fax-Info": {
"type": "string"
},
"From": {
"type": "string"
},
"From-Tag": {
"type": "string"
},
"From-Uri": {
"type": "string"
},
"Hangup-Cause": {
"type": "string"
},
"Hangup-Code": {
"type": "string"
},
"Interaction-ID": {
"type": "string"
},
"Intercepted-By": {
"type": "string"
},
"Length": {
"type": "string"
},
"Local-SDP": {
"type": "string"
},
"Media-Recordings": {
"type": "string"
},
"Media-Server": {
"type": "string"
},
"Origination-Call-ID": {
"type": "string"
},
"Other-Leg-Call-ID": {
"type": "string"
},
"Other-Leg-Caller-ID-Name": {
"type": "string"
},
"Other-Leg-Caller-ID-Number": {
"type": "string"
},
"Other-Leg-Destination-Number": {
"type": "string"
},
"Other-Leg-Direction": {
"type": "string"
},
"Parking-Slot": {
"type": "string"
},
"Presence-ID": {
"type": "string"
},
"Raw-Application-Data": {
"type": "string"
},
"Raw-Application-Name": {
"type": "string"
},
"Recording": {
"type": "string"
},
"Remote-SDP": {
"type": "string"
},
"Replaced-By": {
"type": "string"
},
"Request": {
"type": "string"
},
"Resigning-Peer-UUID": {
"type": "string"
},
"Resigning-UUID": {
"type": "string"
},
"Ringing-Seconds": {
"type": "string"
},
"Root-Call-Interaction-ID": {
"type": "string"
},
"Silence-Terminated": {
"type": "string"
},
"Switch-Hostname": {
"type": "string"
},
"Switch-Nodename": {
"type": "string"
},
"Switch-URI": {
"type": "string"
},
"Switch-URL": {
"type": "string"
},
"Target-Call-ID": {
"type": "string"
},
"Terminator": {
"type": "string"
},
"Timestamp": {
"type": "string"
},
"To": {
"type": "string"
},
"To-Tag": {
"type": "string"
},
"To-Uri": {
"type": "string"
},
"Transfer-Disposition": {
"type": "string"
},
"Transfer-History": {
"type": "string"
},
"Transfer-Source": {
"type": "string"
},
"Transfer-To": {
"type": "string"
},
"Transfer-Type": {
"type": "string"
},
"User-Agent": {
"type": "string"
}
},
"required": [
"Call-ID"
],
"type": "object"
},
"kapi.call.channel_status_req": {
"description": "AMQP API for call.channel_status_req",
"properties": {
Expand Down
Loading

0 comments on commit 68ff564

Please sign in to comment.