Relay.Calling.SendDigitsResult
Relay.Calling.SendDigitsResult
This object is returned by sendDigits
method and represents the final result of a send digits action.
Methods-submenu
GetEvent
Returns the last Relay Event arrived for this operation.
Parameters
None
Returns
*signalwire.Event
- Last Relay Event.
GetSuccessful
Return true
if the operation has succeeded, false
otherwise.
Parameters
None
Returns
bool
- Whether the operation has completed successfully.
Examples
Send some digits and then check if it has ended successfully.
/* use an anonymous function as CB */
resultDial.Call.OnSendDigitsFinished = func(a *signalwire.SendDigitsAction) {
signalwire.Log.Info("SendDigits finished with successful result: [%v]\n", a.GetSuccessful())
}
sendDigitsAction, err := resultDial.Call.SendDigitsAsync("1234567890*#")
if err != nil {
signalwire.Log.Error("Error occurred while trying to play audio\n")
}
// do something more here
time.Sleep(2 * time.Second)
if sendDigitsAction.GetCompleted() {
// just print this again
signalwire.Log.Info("SendDigits finished with successful result: [%v]\n", sendDigitsAction.GetSuccessful())
}