[FIX] Fix call gcphone (no WebRTC)

i love you!

1 Like

How to do it? Can you see the picture

1 Like

Thx my man

nothing work for me

help me guys @Sonnydg

Line 425 to 444

RegisterServerEvent('gcPhone:acceptCall')
AddEventHandler('gcPhone:acceptCall', function(infoCall, rtcAnswer)
	local id = infoCall.id
	if AppelsEnCours[id] ~= nil then
		if PhoneFixeInfo[id] ~= nil then
			onAcceptFixePhone(source, infoCall, rtcAnswer)
			return
		end
		AppelsEnCours[id].receiver_src = infoCall.receiver_src or AppelsEnCours[id].receiver_src
		if AppelsEnCours[id].transmitter_src ~= nil and AppelsEnCours[id].receiver_src~= nil then
			AppelsEnCours[id].is_accepts = true
			AppelsEnCours[id].rtcAnswer = rtcAnswer
			TriggerClientEvent('gcPhone:acceptCall', AppelsEnCours[id].transmitter_src, AppelsEnCours[id], true)
			SetTimeout(1000, function()
			TriggerClientEvent('gcPhone:acceptCall', AppelsEnCours[id].receiver_src, AppelsEnCours[id], false)
			saveAppels(AppelsEnCours[id])
			end)
		end
	end
end)

Line 620 to 636

function onAcceptFixePhone(source, infoCall, rtcAnswer)
	local id = infoCall.id
	
	AppelsEnCours[id].receiver_src = source
	if AppelsEnCours[id].transmitter_src ~= nil and AppelsEnCours[id].receiver_src~= nil then
		AppelsEnCours[id].is_accepts = true
		AppelsEnCours[id].forceSaveAfter = true
		AppelsEnCours[id].rtcAnswer = rtcAnswer
		PhoneFixeInfo[id] = nil
		TriggerClientEvent('gcPhone:notifyFixePhoneChange', -1, PhoneFixeInfo)
		TriggerClientEvent('gcPhone:acceptCall', AppelsEnCours[id].transmitter_src, AppelsEnCours[id], true)
		SetTimeout(1000, function()
		TriggerClientEvent('gcPhone:acceptCall', AppelsEnCours[id].receiver_src, AppelsEnCours[id], false)
		saveAppels(AppelsEnCours[id])
		end)
	end
end

This is confirmed working. Thanks, @Sonnydg!

5 Likes

Thank you :heart:

I’m going to leave the Push Request link to the official GCPhone repository:

Merci <3

1 Like


how do I fix this

No clue. Try Googlefu.

The line there has nothing to do with the snippet’s I’ve posted. :slight_smile:

1 Like

Hello, it works but quality is horrible :confused: do anyone have problem with this on OneSync?

FXServer uses mumble, I do not know if there are ways to adjust the native quality. On my server it is listened to with good quality.

I dont know how to install the last gcphone…

I put all scripts but it doesn’t work

Any fix for no voice?
I recently put in the phone on my server and everything is working osv

I hear the phone signal when being called but when i answer we can’t hear each other

remember that to speak you must press the Push To Talk key

We did
Tried Default PTT key and also what i have my key set to but nothing.
I hear phone ring signal but no voice when i pick up

you should not use WebRTC, follow the steps of the post or download GcPhone from the official repository and compile it, then replace it with the one you have.

WebRTC is set to False so i shouldn’t be using that and i did the steps from that post too