hoiio.service.ivr¶
- class hoiio.service.ivr.Ivr¶
Provide IVR services such as Dial, Gather, Transfer, Hangup, etc.
- dial(dest, **kwargs)¶
Make a call out to a phone number
Parameters: - dest – The phone number to call to
- msg – The message to play when the phone is answered
- caller_id – The caller ID when connected to the phone number
- max_duration – The maximum duration for the call, afterwhich it will hangup automatically
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- gather(session, **kwargs)¶
Gather a keypad response from the user on the phone
Parameters: - session – The IVR session
- msg – The message to play as you gather
- max_digits – The maximum number of digits to gather from
- timeout – The call will hangup if no response after timeout (in seconds)
- attempts – The number of times the message will be repeated
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- hangup(session, **kwargs)¶
Hangup a phone call
Parameters: - session – The IVR session
- msg – The message to play before you hangup
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- monitor(session, **kwargs)¶
Record the whole phone conversation from this point onwards
Parameters: - session – The IVR session
- msg – The message to play as you record
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- play(session, msg, **kwargs)¶
Play a message over the phone call
Parameters: - session – The IVR session
- msg – The message to play
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- record(session, **kwargs)¶
Record a voice message
Parameters: - session – The IVR session
- msg – The message to play before you record
- max_duration – The maximum duration (in seconds) for the recorded voice message
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response
- transfer(session, dest, **kwargs)¶
Transfer the call to another phone number or a conference room
Parameters: - session – The IVR session
- dest – The phone number or conference room. If you are transferring to a conference room, prefix with a room: eg. room:R1234.
- msg – The message to play as you record
- caller_id – The caller ID when connected to the dest
- tag – Your own reference tag for this transaction
- notify_url – A notification URL for Hoiio to call to your web server
Returns: Return hoiio.service.Response