-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from plivo/VT-8038
VT-8038: SDK changes for stream xml element keepCallAlive
- Loading branch information
Showing
8 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,13 +197,14 @@ public void TestAllXml() | |
|
||
resp.AddStream("Hello, This is stream", new Dictionary<string, string>() | ||
{ | ||
{"bidirectional", "true"} | ||
{"bidirectional", "true"}, | ||
{"keepCallAlive", "true"} | ||
}); | ||
var output = resp.ToString(); | ||
// Console.WriteLine(output); | ||
Assert.Equal( | ||
"<Response>\n <Conference callbackUrl=\"http://foo.com/confevents/\" callbackMethod=\"POST\" digitsMatch=\"#0,99,000\">My room</Conference>\n <Dial confirmSound=\"http://foo.com/sound/\" confirmKey=\"3\">\n <Number sendDigits=\"wwww2410\">18217654321</Number>\n <User sendDigits=\"wwww2410\">sip:[email protected]</User>\n </Dial>\n <Dial timeout=\"20\" action=\"http://foo.com/dial_action/\">\n <Number>18217654321</Number>\n </Dial>\n <Dial>\n <Number>15671234567</Number>\n </Dial>\n <DTMF>12345</DTMF>\n <GetDigits action=\"http://www.foo.com/gather_pin/\" method=\"POST\">\n <Speak>Enter PIN number.</Speak>\n </GetDigits>\n <Speak>Input not recieved.</Speak>\n <GetInput action=\"http://www.foo.com/gather_feedback/\" method=\"POST\">\n <Speak>Tell us more about your experience.</Speak>\n </GetInput>\n <Speak>Statement not recieved.</Speak>\n <Hangup schedule=\"60\" reason=\"rejected\" />\n <Speak loop=\"0\">Call will hangup after a min.</Speak>\n <Message src=\"12023222222\" dst=\"15671234567\" type=\"sms\" callbackUrl=\"http://foo.com/sms_status/\" callbackMethod=\"POST\">Hi, message from Plivo.</Message>\n <Play>https://amazonaws.com/Trumpet.mp3</Play>\n <PreAnswer>\n <Speak>This call will cost $2 a min.</Speak>\n </PreAnswer>\n <Speak>Thanks for dropping by.</Speak>\n <Record action=\"http://foo.com/get_recording/\" startOnDialAnswer=\"true\" redirect=\"false\" />\n <Dial>\n <Number>15551234567</Number>\n </Dial>\n <Speak>Leave message after the beep.</Speak>\n <Record action=\"http://foo.com/get_recording/\" maxLength=\"30\" finishOnKey=\"*\" />\n <Speak>Recording not received.</Speak>\n <Speak>Your call is being transferred.</Speak>\n <Redirect>http://foo.com/redirect/</Redirect>\n <Speak loop=\"3\">Go green, go plivo.</Speak>\n <Speak>I will wait 7 seconds starting now!</Speak>\n <Wait length=\"7\" />\n <Speak>I just waited 7 seconds.</Speak>\n <Wait length=\"120\" beep=\"true\" />\n <Play>https://s3.amazonaws.com/abc.mp3</Play>\n <Wait length=\"10\" />\n <Speak>Hello</Speak>\n <Wait length=\"10\" silence=\"true\" minSilence=\"3000\" />\n <Speak>Hello, welcome to the Jungle.</Speak>\n" + | ||
" <MultiPartyCall role=\"Agent\" maxDuration=\"1000\" statusCallbackEvents=\"participant-speak-events, participant-digit-input-events, add-participant-api-events, participant-state-changes, mpc-state-changes\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"GET\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDTMFInputs=\"false\" startRecordingAudioMethod=\"GET\" stopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall>\n <Stream bidirectional=\"true\">Hello, This is stream</Stream>\n</Response>", | ||
" <MultiPartyCall role=\"Agent\" maxDuration=\"1000\" statusCallbackEvents=\"participant-speak-events, participant-digit-input-events, add-participant-api-events, participant-state-changes, mpc-state-changes\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"GET\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDTMFInputs=\"false\" startRecordingAudioMethod=\"GET\" stopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall>\n <Stream bidirectional=\"true\" keepCallAlive=\"true\">Hello, This is stream</Stream>\n</Response>", | ||
output.Replace(Environment.NewLine, "\n")); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters