Skip to content

2.1.0

Latest
Compare
Choose a tag to compare
@lkloon123 lkloon123 released this 14 Nov 02:22
· 10 commits to master since this release
998e59b

Example Usage:

using Mocean.Voice;
using Mocean.Voice.Mapper;

var mcBuilder = (new McBuilder())
    .add(Mc.say("for english please press 1"))
    .add(Mc.collect("https://test.com/collect"))
    .add(Mc.sleep(2000))
    .add(Mc.bridge("60123456789"))
    .add(Mc.play("http://test.com/play"));

mocean.Voice.Call(new VoiceRequest
{
    mocean_to = "60123456789",
    mocean_command = mcBuilder
});

Hangup Example:

mocean.Voice.Hangup("xxx-xxx-xxx-xxx"); //call-uuid

Recording Example:

var recording = mocean.Voice.Recording("xxx-xxx-xxx-xxx"); //call-uuid

//save to file
using (FileStream fs = new FileStream(recording.Filename, FileMode.OpenOrCreate))
{
    using (BinaryWriter writer = new BinaryWriter(fs))
    {
        writer.Write(recording.RecordingBuffer);
    }
}