~singpolyma/sgx-jmp

b7d48374d65e736da0a1424984a00a0a3a66ec62 — Stephen Paul Weber 9 months ago 9327cfa
Hotfix: create_call not create_call_request
1 files changed, 6 insertions(+), 9 deletions(-)

M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +6 -9
@@ 481,15 481,12 @@ Command.new(
	customer_repo: CustomerRepo.new(sgx_repo: Bwmsgsv2Repo.new)
) {
	Command.customer.then do |customer|
		BANDWIDTH_VOICE.create_call(
			CONFIG[:creds][:account],
			body: customer.fwd.create_call_request do |cc|
				cc.from = customer.registered?.phone
				cc.application_id = CONFIG[:sip][:app]
				cc.answer_url = "#{CONFIG[:web_root]}/ogm/start?" \
				                "customer_id=#{customer.customer_id}"
			end
		)
		customer.fwd.create_call(CONFIG[:creds][:account]) do |cc|
			cc.from = customer.registered?.phone
			cc.application_id = CONFIG[:sip][:app]
			cc.answer_url = "#{CONFIG[:web_root]}/ogm/start?" \
			                "customer_id=#{customer.customer_id}"
		end
		Command.finish("You will now receive a call.")
	end
}.register(self).then(&CommandList.method(:register))