You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f91cd69
Browse filesBrowse the repository at this point in the historyBrowse files
`httpClient` is requested as a parameter, such that you can use a single instance throughout your application, as is highly recommended.
24
24
Ideally you would have it injected by Dependency Injection.
25
25
26
-
`apiKey` is your unique api key (or product token) which authorizes you on the CM platform. Always keep this key secret!
26
+
`myApiKey` is your unique api key (or product token) which authorizes you on the CM platform. Always keep this key secret!
27
27
28
28
## Sending an instruction
29
29
@@ -32,30 +32,22 @@ Before we can send an instruction, we need to create one.
32
32
```cs
33
33
varinstruction=newNotificationInstruction
34
34
{
35
-
InstructionId="My InstructionId",
36
35
Caller="+1234567890",
37
36
Callee="+9876543210",
38
-
PromptType=PromptType.TTS,
39
-
Prompt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eu laoreet augue. Fusce fermentum auctor pellentesque.",
40
-
Voice=newVoice
41
-
{
42
-
Language="nl-NL",
43
-
Gender=Gender.Female,
44
-
Number=1
45
-
}
37
+
Prompt="This is a test call."
46
38
};
47
39
```
48
40
49
41
This is an example Notification instruction, which will simply call the `Callee` while showing the `Caller`.
50
-
When picked up, it will read the prompt using the specified voice and hang up.
42
+
When picked up, it will read the prompt using the default voice (en-GB, Female, nr. 1) and hang up.
51
43
52
44
The other instructions are the `OtpInstruction` (for sending a One Time Password) and the `RequestDtmfInstruction` (for calling and requesting numerical input from the callee).
53
45
More information on the various fields and their uses can be found in the docs (https://docs.cmtelecom.com/voice-api-apps/v2.0), as well as the list of possible voices.
54
46
55
47
To send the instruction, simply call `SendAsync()` on the client and the call should take place shortly after.
Finally, the result will have a `HttpStatusCode`, `Content` (as string), a boolean indicating `Success` and a call `DeserializeEvent()` to Deserialize the result into a `CallQueuedEvent`
0 commit comments