Comments (11)
@alist I faced the same exact issue. In my case, I didn't have one of "stream" or "buffer" npm packages installed (I don't remember which one now). Adding them to the project resolved the issue.
from retell-client-js-sdk.
Hey I am facing the same issue, but I working with next. And I have both "buffer" and "stream" installed.
from retell-client-js-sdk.
Thanks for reporting the issue and we will take a look at the issue and get back to you soon!
from retell-client-js-sdk.
I am facing the same issue with next + [email protected]
from retell-client-js-sdk.
@arthur-vonq Was your issue solved by installing stream or buffer?
from retell-client-js-sdk.
unfortunatelly I tried installing those, but it did not work. take a look:
"node": "v20.11.0"
"next": "12.3.4"
"react": "^18.2.0"
"react-dom": "^18.2.0"
"retell-client-js-sdk": "^1.3.3"
"buffer": "^6.0.3"
"stream": "^0.0.2"
from retell-client-js-sdk.
@rj-rajpal Have you managed to make it work? I have the same situation as you
from retell-client-js-sdk.
retellInstance.stopConversation();
doesn't work.
const getCallInitDetails = () => {
return bot9API
.post(`/api/retell/start-call`, { agent_id: AGENT_ID })
.then((res) => res.data)
.catch((err) => {
console.error(err);
});
};
const handleStartCall = (payload) => {
setHasCallStarted(true);
setCallStatus("Calling...");
getCallInitDetails().then((data) => {
setCallStatus("Ringing...");
retellInstance
.startConversation({
callId: data.call_id,
sampleRate: data.sample_rate,
enableUpdate: true,
})
.then(() => {
setCallStatus("Say hello");
});
});
};
const handleEndCall = () => {
// doesnt work
retellInstance.stopConversation();
setHasCallStarted(false);
setCallStatus("");
};
from retell-client-js-sdk.
@ayush-saha-56 where are you instantiating the Retell client?
I think you cannot instantiate it inside a react component otherwise it meses up with the life cycle.
That was the problem happening with me at least..
from retell-client-js-sdk.
Yes. I was instantiating the Retell client inside a component.
Instantiating it outside solves the end call case. It seems to be a lifecycle mess up that creates this issue.
from retell-client-js-sdk.
Yeah awesome find @arthur-vonq !!!! You saved us.
For everyone else, here is the solution!
'use client';
import { RetellWebClient } from 'retell-client-js-sdk';
const retellWebClient = new RetellWebClient();
export default function RetellCallMVC({
await retellWebClient.startConversation(...);
return <UserInterface/>;
})
with this sort of setup
retellWebClient.stopConversation();
now works and also multiple calls are possible
from retell-client-js-sdk.
Related Issues (10)
- Audio event cuts off early/randomly HOT 4
- Knowledge folder is missing? HOT 1
- How can we have a handle over the output stream
- New version with livekit seems to have performance issues / latency
- Client SDK doesn't work on mobile networks HOT 1
- Audio stutter when trying to playback raw audio data
- [Bug] unable to stop conversation using sdk.stopConversation()
- Receive function call results from client js sdk HOT 3
- The socket connection closes after some time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retell-client-js-sdk.