Skip to content

SimpleIVR Sample Adding#5

Open
Rani0608 wants to merge 4 commits intofeature/previewfrom
V-Rani/SimpleIVR
Open

SimpleIVR Sample Adding#5
Rani0608 wants to merge 4 commits intofeature/previewfrom
V-Rani/SimpleIVR

Conversation

@Rani0608
Copy link
Collaborator

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Rani0608 Rani0608 requested review from moirf and v-mausha April 28, 2023 13:47
from azure.communication.identity import CommunicationIdentityClient
from azure.communication.callautomation import CallAutomationClient,CallInvite,\
CallAutomationEventParser,CallConnected,CallMediaRecognizeOptions,CallMediaRecognizeDtmfOptions,\
CallConnectionClient,CallDisconnected,PlaySource,FileSource,ParticipantsUpdated,DtmfTone,\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused imports

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

PlayOption = call_Connection_Media.play_to_all(playSource, operation_context='SimpleIVR')
elif toneDetected == DtmfTone.FOUR :
playSource = FileSource(uri=(BaseUri + configuration_manager.get_app_settings('AgentAudio')))
PlayOption = call_Connection_Media.play_to_all(playSource, operation_context='AgentConnect')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

playOption is not required,
also the PlaySource should be in the right format play_source

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

if event.__class__ == PlayCompleted:

if event.operation_context == 'AgentConnect':
Participant_ToAdd = configuration_manager.get_app_settings('ParticipantToAdd')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name should follow the Snake Case, all letters should be in small, and words are seperated by '_'

Callinvite=CallInvite(self.Participant_Add,sourceCallIdNumber=self.source_identity)

Logger.log_message(Logger.INFORMATION,'Performing add Participant operation')
self.Addparticipant_Response=call_Connection.add_participant(Callinvite)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here also follow the snake case, check everywhere

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes are done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants