Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/adhearsion/outbound_call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ def dial(to, options = {})
Adhearsion.active_calls << current_actor

write_and_await_response(@dial_command, wait_timeout, true).tap do |dial_command|
@start_time = dial_command.timestamp.to_time
if dial_command.respond_to?(:timestamp)
@start_time = dial_command.timestamp.to_time
else
logger.warn "dial_command #{dial_command.inspect} did not respond to timestamp. @dial_command #{@dial_command.inspect}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to set some @start_time to some value? or is it ok if it's null?

any idea under what condition the dial_command doesn't have a timestamp set?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to set some @start_time to some value? or is it ok if it's null?

I think it should be fine since we don't use Adhearsion::Call#start_time for anything in the voice.

any idea under what condition the dial_command doesn't have a timestamp set?

When commands timed out, we ignore the timeout on purpose
https://github.com/VHT/callback_cloud/blob/comintg/voice/lib/outbound_call_extensions.rb#L7

end

if @dial_command.uri != self.uri
logger.warn "Requested call URI (#{uri}) was not respected. Tracking by new URI #{self.uri}. This might cause a race in event handling, please upgrade your Rayo server."
Adhearsion.active_calls << current_actor
Expand Down
Loading