Hallo ich habe Twilio in der Anwendung integriert. In Twilio funktioniert alles gut für mich. Aber sobald der Anruf beendet ist, bekomme ich Error - 11750 TwiML response body too large. Hier, was ich von meinem Ende gemacht habe.Fehler - 11750 TwiML Antwort Körper zu groß
Sobald die Konferenz endete, eine Zahlung in Bezug auf die Anwendung erforderlich.
def call_status
if params["CallStatus"] == "completed"
request_call = RequestCall.find { |c| c.caller_sids.include?(params["CallSid"])}
if request_call.present?
#save call logs
call_log = CallLog.new(called: params[:Called], tostate: params[:CallerCountry], callercountry: params[:CallerCountry], callerzip: params[:CallerZip],
direction: params[:Direction], timestamp: params[:Timestamp], callbacksource: params[:CallbackSource], callerstate: params[:CallerState],
tozip: params[:ToZip], sequencenumber: params[:SequenceNumber], callsid: params[:CallSid], to: params[:To], calledzip: params[:CalledZip],
calledcity: params[:CalledCity], tocountry: params[:ToCountry], apiversion: params[:ApiVersion], callstatus: params[:CallStatus], duration: params[:Duration],
from: params[:From], callduration: params[:CallDuration], accountsid: params[:AccountSid], calledcountry: params[:CalledCountry], callercity: params[:CallerCity],
caller: params[:Caller], fromcountry: params[:FromCountry], tocity: params[:ToCity], fromcity: params[:FromCity], calledstate: params[:CalledState], fromzip: params[:FromZip],
fromstate: [:FromState], user_id: request_call.user_id, expert_id: request_call.expert_id, request_call_id: request_call.id)
call_log.save
#check caller length
if request_call.call_ended == false && request_call.call_id_length == true
# Check estimate time with total duration
if request_call.estimated_time.to_i == call_log.duration.to_i
release_payment = request_call.release_full_payment
elsif request_call.estimated_time.to_i < call_log.duration.to_i
make_payment = request_call.release_full_payment
express_item_id = request_call.express_item_id
extra_time = call_log.duration.to_i - request_call.estimated_time.to_i
pending_amount = request_call.price_to_pay(extra_time)
second_item = request_call.express_item(pending_amount)
if second_item.code == 200
express_payment = request_call.release_express_payment
end
render json: {status: true}
elsif request_call.estimated_time.to_i > call_log.duration.to_i
remaining_duration = request_call.estimated_time.to_i - call_log.duration.to_i
refund_amount = request_call.price_to_pay(remaining_duration)
refund = request_call.refund_partial_amount(refund_amount)
release_fund = request_call.release_full_payment
render json: {status: true}
end
request_call.transition_to!(:completed)
request_call.update(twilio_allocated_number: nil, twilio_access_code: nil, call_ended: true)
elsif request_call.call_ended == true && request_call.call_id_length == true
render json: {status: true}
elsif request_call.call_ended == false && request_call.call_id_length == false
#make payment
request_call.transition_to!(:completed)
request_call.update(twilio_allocated_number: nil, twilio_access_code: nil, call_ended: true, single_user: true)
render json: {status: true}
end
else
render json: {status: false}
end
else
render json: {status: false}
end
Ende
Ich weiß nicht, was ich in diesem falsch gemacht haben. Bitte berate mich.
Hallo Megan Speir, danke für Ihre Wiederholung. Aber das Problem ist von meiner Seite. Die URL, die ich angegeben habe, ist falsch. damit ich dieses Problem habe. –