Skip to content

Commit 9091068

Browse files
committed
Adds a dial pause option for the twilio live call routing
1 parent 2581f21 commit 9091068

File tree

1 file changed

+3
-2
lines changed
  • app/models/pager_tree/integrations/live_call_routing/twilio

1 file changed

+3
-2
lines changed

app/models/pager_tree/integrations/live_call_routing/twilio/v3.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ class LiveCallRouting::Twilio::V3 < Integration
66
{key: :api_secret, type: :string, default: nil},
77
{key: :force_input, type: :boolean, default: false},
88
{key: :record, type: :boolean, default: false},
9-
{key: :record_email, type: :string, default: ""}
9+
{key: :record_email, type: :string, default: ""},
10+
{key: :dial_pause, type: :integer}
1011
]
1112
store_accessor :options, *OPTIONS.map { |x| x[:key] }.map(&:to_s), prefix: "option"
1213

@@ -397,7 +398,7 @@ def _on_acknowledge
397398

398399
if number.present?
399400
_twiml.play(url: option_connect_now_media_url)
400-
_twiml.pause(length: 1)
401+
_twiml.pause(length: option_dial_pause.to_i.clamp(1, 15))
401402
_twiml.dial(number: number, caller_id: _call.to, answer_on_bridge: true)
402403
_call.update(twiml: _twiml.to_xml)
403404
# log if we successfully transfered or failed

0 commit comments

Comments
 (0)