Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#ask should raise Adhearsion::Call::Hangup upon hangup #28

Open
sfgeorge opened this issue Jul 31, 2015 · 1 comment
Open

#ask should raise Adhearsion::Call::Hangup upon hangup #28

sfgeorge opened this issue Jul 31, 2015 · 1 comment

Comments

@sfgeorge
Copy link
Member

Issue

Using adhearsion-asr 1.5.0, I noticed that hanging up during an #ask prompt does not trigger the expected Adhearsion::Call::Hangup. Rather, it returns an AdhearsionASR::Result with the following state:

<AdhearsionASR::Result status=:hangup, confidence=nil, utterance=nil, interpretation=nil, nlsml=nil>

This is true, despite other welcome fixes like dfc03b9, which raise Hangup for expired call conditions.

Suggestion

If a telephony engine supports returning partial interpretation in the midst of hang-up, I could see status=:hangup being potentially useful. I am not aware of such a case (if someone is, then please do mention!). In lieu of info on usefulness for status=:hangup, I recommend that adhearsion-asr raise Adhearsion::Call::Hangup instead.

Workaround

For the time being, those who wish to have the traditional Hangup exception behavior can do the following:

result = ask
raise Adhearsion::Call::Hangup if result.status.eql? :hangup
@benlangfeld
Copy link
Member

Thanks for the suggestion, @sfgeorge. I agree entirely. I'd definitely accept this against adhearsion/adhearsion. I'd have to review more carefully the backward compatibility arguments in this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants