From 458513f7a1ec0c91381039163be140009fe86ff5 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 28 May 2024 13:21:21 -0500 Subject: [PATCH] Log call creation attempts --- lib/customer_fwd.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/customer_fwd.rb b/lib/customer_fwd.rb index a584fd1888e962b393c929af2337a34e088b647e..38493a387c3c70e5f1933cee85f6233e7472f0ec 100644 --- a/lib/customer_fwd.rb +++ b/lib/customer_fwd.rb @@ -113,7 +113,13 @@ class CustomerFwd cc.call_timeout = timeout.to_i yield cc if block_given? } - BANDWIDTH_VOICE.create_call(account, body: request).data.call_id + log_call(account, request) + end + + def log_call(account, request) + result = BANDWIDTH_VOICE.create_call(account, body: request) + log.info "Create Bandwidth Call", { request: request, result: result } + result.data.call_id end def as_json(*)