-
Notifications
You must be signed in to change notification settings - Fork 40
Call Automation Media Streaming Sample #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Call Automation Media Streaming Sample #48
Conversation
| { | ||
| String logMessage; | ||
| logMessage = messageType + " " + message; | ||
| System.out.println(logMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing alignment issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
|
|
||
| Logger.logMessage(Logger.MessageType.INFORMATION, "AnswerCallWithResponse -- > " + getResponse(response)); | ||
| Logger.logMessage(Logger.MessageType.INFORMATION, "Call Connection ID -- > " + answerCallResult.getCallConnectionProperties().getCallConnectionId()); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: spacing alignment issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
| @PostMapping(value = "/OnIncomingCall", consumes = "application/json", produces = "application/json") | ||
| public ResponseEntity<?> OnIncomingCall(@RequestBody(required = false) String data){ | ||
| List<EventGridEvent> eventGridEvents = EventGridEvent.fromString(data); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
| List<EventGridEvent> eventGridEvents = EventGridEvent.fromString(data); | ||
|
|
||
| if(eventGridEvents.stream().count() > 0) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please indent the code.. keep the brackets at the right spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
| EventGridEvent eventGridEvent = eventGridEvents.get(0); | ||
| BinaryData eventData = eventGridEvent.getData(); | ||
|
|
||
| if (eventGridEvent.getEventType().equals(SystemEventNames.EVENT_GRID_SUBSCRIPTION_VALIDATION)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can change it to SystemEventNames.EVENT_GRID_SUBSCRIPTION_VALIDATION.equals(eventGridEvent.getEventType()) to avoid null pointers.
Also check if eventGridEvent could be null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| SubscriptionValidationEventData subscriptionValidationEvent = eventData.toObject(SubscriptionValidationEventData.class); | ||
| SubscriptionValidationResponse responseData = new SubscriptionValidationResponse(); | ||
| responseData.setValidationResponse(subscriptionValidationEvent.getValidationCode()); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line spacing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
| return new ResponseEntity<>(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR); | ||
| } | ||
| } | ||
| else if(eventGridEvent.getEventType().equals("Microsoft.Communication.IncomingCall")){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
| } | ||
| } | ||
| catch(Exception e){ | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is off here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
Ninika
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please incorporate the requested comments
…TION.equals(eventGridEvent.getEventType()) && eventGridEvent!=null
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Other Information