forked from globelabs/globe-connect-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsamples.py
74 lines (52 loc) · 1.53 KB
/
samples.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
from globe.connect import voice
#v = voice.Voice()
#ask = v.ask('asdf')
#ask.setChoices('asdf')
#print ask.getObject()
#call = v.call('to')
#print call.getObject()
#choices = v.choices('value')
#print choices.getObject()
#conference = v.conference('id')
#print conference.getObject()
#joinPrompt = v.joinPrompt('value')
#print joinPrompt.getObject()
#leavePrompt = v.leavePrompt('value')
#print leavePrompt.getObject()
#machineDetection = v.machineDetection()
#print machineDetection.getObject()
#message = v.message('say', 'to')
#print message.getObject()
#on = v.on('event', 'say')
#print on.getObject()
#record = v.record('name', 'url')
#print record.getObject()
#redirect = v.redirect('to')
#print redirect.getObject()
#result = v.result({'result' : {'foo' : 'bar'}})
#print result.getObject()
#say = v.say('value')
#say.setEvent(['hey', 'heyVal', 'foo', 'bar'])
#print say.getObject()
#session = v.session({'session' : {'foo' : 'bar'}})
#print session.getObject()
#startRecoring = v.startRecording('asdfg.com')
#print startRecoring.getObject()
#transfer = v.transfer('to')
#transfer.setName('name')
#transfer.setChoices('[5 Digit]')
#transfer.setHeaders('headers')
#print transfer.getObject()
#wait = v.wait('100')
#print wait.getObject()
#v.addAsk(ask.getObject())
#v.addChoices(choices.getObject())
#v.addWait(wait.getObject())
#print v.getObject()
voice = voice.Voice()
call = voice.call('sip:[email protected]')
call.setFrom('9065272450')
say = voice.say('Hello Chawse')
voice.addCall(call)
voice.addSay(say)
print voice.getObject()