From 09316b43f13d44db5064ed55faafb8c7a8ae6d4b Mon Sep 17 00:00:00 2001 From: Deepak Jaiswal Date: Mon, 1 Jul 2024 13:24:38 -0700 Subject: [PATCH 1/3] Added a) 201 response for session create b) 200/204 response for PUT and c) example responses --- .../BYON-CallHandling-Service.yaml | 80 ++++++++++++++----- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/code/API_definitions/BYON-CallHandling-Service.yaml b/code/API_definitions/BYON-CallHandling-Service.yaml index ae7182c..9ce6fdb 100644 --- a/code/API_definitions/BYON-CallHandling-Service.yaml +++ b/code/API_definitions/BYON-CallHandling-Service.yaml @@ -46,6 +46,15 @@ paths: sdp: "v=0\r\no=- 8066321617929821805 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 42988 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:2448:7a05:9b11:66f2:c9e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:1645903805 1 udp 2122262783 2001:e0:410:2448:7a05:9b11:66f2:c9e 42988 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:4eKp\r\na=ice-pwd:D4sF5Pv9vx9ggaqxBlHbAFMx\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Xm3YciqVIWFNSwy19e9MvfZ2YOdAZil7oT/tHjdf\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\n" clientCorrelator: fda6e26d-e7c8-4596-870c-c083c0d39b2c responses: + '201': + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/VvoipSessionInformation' + examples: + SessionCreated: + $ref: '#/components/examples/exVSIResponse' '400': $ref: '#/components/responses/Generic400' '403': @@ -155,7 +164,18 @@ paths: $ref: '#/components/examples/exMT200' responses: '200': - $ref: '#/components/responses/Generic200' + description: Updated the session status (with SDP data) + content: + application/json: + schema: + $ref: '#/components/schemas/ReceiverSessionStatus' + examples: + Hold: + $ref: '#/components/examples/exMTHold' + Resume: + $ref: '#/components/examples/exMTResume' + '204': + description: Updated the session status (no content) '401': $ref: '#/components/responses/Generic401' '403': @@ -191,6 +211,7 @@ components: description: Friendly name of the receiver example: receiver status: + description: Provides the status of the VVOIP session. During the session creation, this attribute SHALL NOT be included in the request. $ref: '#/components/schemas/SessionStatus' offer: $ref: '#/components/schemas/WrtcsOffer' @@ -202,6 +223,7 @@ components: vvoipSessionId: type: string description: The VVOIP session ID created by WebRTC Gateway. The vvoipSessionID shall not be included in POST requests by the client, but must be included in the notifications from the WebRTC GW to client. + example: 0AEE1B58BAEEDA3EABA42B32EBB3DFE07E9CFF402EAF9EED8EFAAF209EE52FD0BECC5B7CDE645F50DE7D SessionInvitationNotification: required: - originatorAddress @@ -351,22 +373,6 @@ components: - status - code - message - ObjectResponse: - type: object - properties: - status: - type: integer - description: HTTP status code returned created - code: - type: string - description: Code given to this created - body: - type: object - description: Response Object - required: - - status - - code - - body Address: type: string description: Sender or Receiver address @@ -480,6 +486,44 @@ components: telephone-event/16000\r\na= ptime:20\r\n" + exMT201_183: + value: + receiverSessionStatus: + answer: + status: "InProgress" + answer: + sdp: "v=0\r\no=- 8066321617929821805 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 42988 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:2448:7a05:9b11:66f2:c9e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:1645903805 1 udp 2122262783 2001:e0:410:2448:7a05:9b11:66f2:c9e 42988 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:4eKp\r\na=ice-pwd:D4sF5Pv9vx9ggaqxBlHbAFMx\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Xm3YciqVIWFNSwy19e9MvfZ2YOdAZil7oT/tHjdf\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\n" + exMT201_200: + value: + receiverSessionStatus: + answer: + status: "Connected" + answer: + sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" + exMTHold: + value: + ReceiverSessionStatus: + status: Hold + answer: + sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" + exMTResume: + value: + ReceiverSessionStatus: + status: Resume + answer: + sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" + exMTInProgress: + value: + ReceiverSessionStatus: + status: InProgress + exMTRinging: + value: + ReceiverSessionStatus: + status: Ringing + exMTConnected: + value: + ReceiverSessionStatus: + status: Connected securitySchemes: BearerAuth: type: http @@ -560,4 +604,4 @@ components: content: application/json: schema: - $ref: '#/components/schemas/ReceiverSessionStatus' + $ref: '#/components/schemas/ReceiverSessionStatus' \ No newline at end of file From fa91a5cb5bb6e06d0bad2c6091a6957f198432b1 Mon Sep 17 00:00:00 2001 From: Deepak Jaiswal <145594069+deepakjaiswal1@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:08:06 -0700 Subject: [PATCH 2/3] Added a) 201 response for session create b) 200/204 response for PUT and c) updated examples --- .../BYON-CallHandling-Service.yaml | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/code/API_definitions/BYON-CallHandling-Service.yaml b/code/API_definitions/BYON-CallHandling-Service.yaml index 9ce6fdb..23797af 100644 --- a/code/API_definitions/BYON-CallHandling-Service.yaml +++ b/code/API_definitions/BYON-CallHandling-Service.yaml @@ -162,6 +162,10 @@ paths: $ref: '#/components/examples/exMT180' MT200: $ref: '#/components/examples/exMT200' + Hold: + $ref: '#/components/examples/exMTHold' + Resume: + $ref: '#/components/examples/exMTResume' responses: '200': description: Updated the session status (with SDP data) @@ -486,20 +490,6 @@ components: telephone-event/16000\r\na= ptime:20\r\n" - exMT201_183: - value: - receiverSessionStatus: - answer: - status: "InProgress" - answer: - sdp: "v=0\r\no=- 8066321617929821805 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 42988 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:2448:7a05:9b11:66f2:c9e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:1645903805 1 udp 2122262783 2001:e0:410:2448:7a05:9b11:66f2:c9e 42988 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:4eKp\r\na=ice-pwd:D4sF5Pv9vx9ggaqxBlHbAFMx\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Xm3YciqVIWFNSwy19e9MvfZ2YOdAZil7oT/tHjdf\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\n" - exMT201_200: - value: - receiverSessionStatus: - answer: - status: "Connected" - answer: - sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" exMTHold: value: ReceiverSessionStatus: @@ -511,19 +501,7 @@ components: ReceiverSessionStatus: status: Resume answer: - sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" - exMTInProgress: - value: - ReceiverSessionStatus: - status: InProgress - exMTRinging: - value: - ReceiverSessionStatus: - status: Ringing - exMTConnected: - value: - ReceiverSessionStatus: - status: Connected + sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" securitySchemes: BearerAuth: type: http From f8d608f4cb2774d9d90312fce0e7977d1b6b4a8c Mon Sep 17 00:00:00 2001 From: Deepak Jaiswal <145594069+deepakjaiswal1@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:05:02 -0700 Subject: [PATCH 3/3] Removed MegaLinter errors --- code/API_definitions/BYON-CallHandling-Service.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/code/API_definitions/BYON-CallHandling-Service.yaml b/code/API_definitions/BYON-CallHandling-Service.yaml index 23797af..1916440 100644 --- a/code/API_definitions/BYON-CallHandling-Service.yaml +++ b/code/API_definitions/BYON-CallHandling-Service.yaml @@ -179,7 +179,7 @@ paths: Resume: $ref: '#/components/examples/exMTResume' '204': - description: Updated the session status (no content) + description: Updated the session status (no content) '401': $ref: '#/components/responses/Generic401' '403': @@ -215,7 +215,6 @@ components: description: Friendly name of the receiver example: receiver status: - description: Provides the status of the VVOIP session. During the session creation, this attribute SHALL NOT be included in the request. $ref: '#/components/schemas/SessionStatus' offer: $ref: '#/components/schemas/WrtcsOffer' @@ -317,6 +316,7 @@ components: $ref: '#/components/schemas/Address' SessionStatus: type: string + description: Provides the status of the VVOIP session. During the session creation, this attribute SHALL NOT be included in the request. enum: - Initial - InProgress @@ -501,7 +501,7 @@ components: ReceiverSessionStatus: status: Resume answer: - sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" + sdp: "v=0\r\no=- 4576312012535546667 4 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\nm=audio 47510 RTP/SAVPF 102 113\r\nc=IN IP6 2001:e0:410:243a:a344:cee7:7b39:bb1e\r\nb=AS:64\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3108871805 1 udp 2122262783 2001:e0:410:243a:a344:cee7:7b39:bb1e 47510 typ host generation 0 network-id 3 network-cost 900\r\na=ice-ufrag:47Nx\r\na=ice-pwd:ln3CttOSkObcQ7A0tYO1LXqy\r\na=ice-options:trickle renomination\r\na=mid:audio\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:ruAnBNYnTJqDVZAIJV59VpQ5DxGI6tMX9h9kkHSz\r\na=rtpmap:102 AMR-WB/16000\r\na=fmtp:102 octet-align=0; mode-set=0,1,2; mode-change-capability=2\r\na=rtpmap:113 telephone-event/16000\r\na=ptime:20\r\n" securitySchemes: BearerAuth: type: http @@ -577,9 +577,3 @@ components: status: 503 code: UNAVAILABLE message: Service unavailable - Generic200: - description: Updated - content: - application/json: - schema: - $ref: '#/components/schemas/ReceiverSessionStatus' \ No newline at end of file