Skip to content

Commit 33c1033

Browse files
author
Tony Bedford
authored
Merge pull request #51 from Nexmo/tony-ncco-call
Make a call specifying the NCCO.
2 parents c8039da + 37532ad commit 33c1033

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

voice/make-outbound-call-ncco.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python3
2+
import nexmo
3+
from pprint import pprint
4+
5+
client = nexmo.Client(
6+
application_id=APPLICATION_ID,
7+
private_key=APPLICATION_PRIVATE_KEY_PATH,
8+
)
9+
10+
response = client.create_call({
11+
'to': [{'type': 'phone', 'number': TO_NUMBER}],
12+
'from': {'type': 'phone', 'number': NEXMO_NUMBER},
13+
'ncco': [{'action': 'talk', 'text': 'This is a text to speech call from Nexmo'}]
14+
})
15+
16+
pprint(response)

0 commit comments

Comments
 (0)