~singpolyma/sgx-jmp

829dbce72899743621ea4d6007b9eb4e5905c674 — Stephen Paul Weber 26 days ago ac5dcca
Bandwidth calls from "Anonymous" are broken
1 files changed, 10 insertions(+), 1 deletions(-)

M web.rb
M web.rb => web.rb +10 -1
@@ 235,6 235,15 @@ class Web < Roda
		end
	end

	def inbound_from
		if params["from"] && params["from"] =~ /\A\+?\d+\Z/
			params["from"]
		else
			log.info "Inbound call with unusual from: #{params['from']}"
			TEL_CANDIDATES.fetch(candidate, "19")
		end
	end

	def hangup
		request.json { {}.to_json }



@@ 397,7 406,7 @@ class Web < Roda
							reach.filter(if_yes: ->(_) { hangup }) do
								create_call(
									customer,
									params["from"],
									inbound_from,
									params["callId"],
									params["applicationId"]
								).then { |call|