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

"A final-timeout value is unsupported" error when sending call to mailbox #51

Open
avremy opened this issue Jun 4, 2018 · 2 comments
Open

Comments

@avremy
Copy link

avremy commented Jun 4, 2018

when trying to send call to voicemail , I get the following error

[2018-06-04 15:11:41.793] ERROR Adhearsion::Call: e916a44f-11f9-4e2c-8b3d-dabb0e6a634c@: <Punchblock::ProtocolError> #<Punchblock::ProtocolError: name="option error" text="A final-timeout value is unsupported." call_id=nil component_id=nil>
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/responses.rb:29:in `value'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call.rb:22:in `method_missing'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:207:in `write_and_await_response'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:219:in `execute_component_and_await_completion'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:83:in `execute_recording'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:46:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:133:in `record'
	/usr/local/rvm/gems/ruby-2.4.1/gems/voicemail-1.1.1/lib/voicemail/call_controllers/voicemail_controller.rb:28:in `record_message'
	/usr/local/rvm/gems/ruby-2.4.1/gems/voicemail-1.1.1/lib/voicemail/call_controllers/voicemail_controller.rb:11:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:146:in `invoke'
	/x2one/x2one-vm/app/call_controllers/simon_game.rb:9:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:119:in `execute!'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:94:in `block in exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:93:in `catch'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:93:in `exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:110:in `exec_with_callback'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:104:in `block (2 levels) in bg_exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/foundation/exception_handler.rb:5:in `catching_standard_errors'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:103:in `block in bg_exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:13:in `block in initialize'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:100:in `block in create'
	/usr/local/rvm/gems/ruby-2.4.1/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
[2018-06-04 15:11:41.794] INFO  Adhearsion::Router::Route: Call e916a44f-11f9-4e2c-8b3d-dabb0e6a634c routing completed. Hanging up now.
[2018-06-04 15:11:41.794] INFO  Adhearsion::Call: e916a44f-11f9-4e2c-8b3d-dabb0e6a634c@: Hanging up
[2018-06-04 15:11:41.802] INFO  Adhearsion::Call: e916a44f-11f9-4e2c-8b3d-dabb0e6a634c@: Call 1002 <SIP/1002> -> 1234 ended due to hangup_command (code 16)
[2018-06-04 15:11:41.804] ERROR Adhearsion::Call: e916a44f-11f9-4e2c-8b3d-dabb0e6a634c@: <Punchblock::ProtocolError> #<Punchblock::ProtocolError: name="option error" text="A final-timeout value is unsupported." call_id=nil component_id=nil>
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/responses.rb:29:in `value'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call.rb:22:in `method_missing'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:207:in `write_and_await_response'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:219:in `execute_component_and_await_completion'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:83:in `execute_recording'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:46:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller/record.rb:133:in `record'
	/usr/local/rvm/gems/ruby-2.4.1/gems/voicemail-1.1.1/lib/voicemail/call_controllers/voicemail_controller.rb:28:in `record_message'
	/usr/local/rvm/gems/ruby-2.4.1/gems/voicemail-1.1.1/lib/voicemail/call_controllers/voicemail_controller.rb:11:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:146:in `invoke'
	/x2one/x2one-vm/app/call_controllers/simon_game.rb:9:in `run'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:119:in `execute!'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:94:in `block in exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:93:in `catch'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:93:in `exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:110:in `exec_with_callback'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:104:in `block (2 levels) in bg_exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/foundation/exception_handler.rb:5:in `catching_standard_errors'
	/usr/local/rvm/gems/ruby-2.4.1/gems/adhearsion-2.6.4/lib/adhearsion/call_controller.rb:103:in `block in bg_exec'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/thread_handle.rb:13:in `block in initialize'
	/usr/local/rvm/gems/ruby-2.4.1/gems/celluloid-0.15.2/lib/celluloid/internal_pool.rb:100:in `block in create'
	/usr/local/rvm/gems/ruby-2.4.1/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

this is a clean adhearsion install using :
adhearsion -v 2.6.4
ruby -v 2.4.1
asterisk -v 13.17.2

all I put in the call controller was

  def run
     invoke(Voicemail::VoicemailController, mailbox: 123)
  end
@sfgeorge
Copy link
Member

sfgeorge commented Jun 5, 2018

Hi @avremy, I'm sorry your hitting this issue. I think we accidentally broke voicemail support for Asterisk when we introduced FreeSWITCH support back in #10.

The problem is that we are defaulting the final_timeout setting to 2. While this is ideal for FreeSWITCH, Asterisk should have no final_timeout specified at all - and of course will otherwise result in an error.

This is certainly a bug but in the interim, I can offer a cheap workaround: Explicitly set final_timeout to -1, which is the intended default when using Asterisk.

Using the guide on the Adhearsion Docs for configuring plugin values, you should be able to apply the necessary override - either as an environment or within your config/adhearsion.rb:

Setting the override as an environment variable:

AHN_VOICEMAIL_RECORDING_FINAL_TIMEOUT=-1

or within your config/adhearsion.rb:

Adhearsion.config do |config|

...

  config.voicemail.recording.final_timeout -1

...

end

Let me know if that resolves the issue for you for now. And please leave this issue Open so that someone in the community can tackle a proper fix.

@avremy
Copy link
Author

avremy commented Jun 6, 2018

Hi @sfgeorge,
Thanks for the response, I have made the advised changes to no avail, I seem to be getting the exact same response.

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