@@ -104,7 +104,8 @@ def iter(self, from_=None, ended_after=None,
104
104
kwargs ["EndTime" ] = parse_date (ended )
105
105
return super (Calls , self ).iter (** kwargs )
106
106
107
- def create (self , to , from_ , url , status_method = None , ** kwargs ):
107
+ def create (self , to , from_ , url , status_method = None , status_events = None ,
108
+ ** kwargs ):
108
109
"""
109
110
Make a phone call to a number.
110
111
@@ -123,6 +124,11 @@ def create(self, to, from_, url, status_method=None, **kwargs):
123
124
call ends to notify your app.
124
125
:param str status_method: The HTTP method Twilio should use when
125
126
requesting the above URL.
127
+ :param list status_events: A list of call progress events Twilio
128
+ should send status callback requests on. One or more of:
129
+ 'initiated', 'ringing', 'answered', 'completed'. Defaults to
130
+ ['completed'] if not provided. 'completed' events are sent
131
+ free of charge; see twilio.com for current pricing on others.
126
132
:param str if_machine: Tell Twilio to try and determine if a machine
127
133
(like voicemail) or a human has answered the call.
128
134
See more in our `answering machine documentation
@@ -144,6 +150,7 @@ def create(self, to, from_, url, status_method=None, **kwargs):
144
150
kwargs ["to" ] = to
145
151
kwargs ["url" ] = url
146
152
kwargs ["status_callback_method" ] = status_method
153
+ kwargs ["status_callback_event" ] = status_events
147
154
return self .create_instance (kwargs )
148
155
149
156
def update (self , sid , ** kwargs ):
0 commit comments