Closed ajar98 closed 6 days ago
hello @ajar98
I’ve been evaluating the project, and in relation to this, I believe it would be interesting to implement it through a factory, allowing this factory to be overridden during the call creation.
In the context of SIP with Twilio, it’s common to receive information in the headers of a transferred call. The headers sent with the "X-" prefix are forwarded with the "SipHeader_" prefix and can be extracted from the body. Having access to the body that initializes the call when creating the agent can be very useful for adjusting the call behavior, such as changing the prompts or the voice that will handle the call.
Implementing this feature would provide greater flexibility. Instead of:
call_config = TwilioCallConfig(config.... )
conversation_id = create_conversation_id()
await self.config_manager.save_config(conversation_id, call_config)
We could consider changing it to something like:
self.call_config_factory = TwilioCallConfigFactory()
....
call_config = self.call_config_factory.create_config(config..., extra_params=twilio_body)
conversation_id = call_config.conversation_id
await self.config_manager.save_config(conversation_id, call_config)
Overriding the factory during the initialization of the flow would give the system the necessary versatility to adapt the call behavior based on the parameters received. This simple change allows for greater system flexibility. For example, it could use different languages depending on the caller, or the agent could behave differently based on the transcription or specific needs if the call was transferred from another location.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed due to inactivity. Thank you for your contributions.
We’d like support other “streaming” conversations on the phone - basically anything that can accept streaming audio chunks and send out streaming audio chunks concurrently should supportable on a phone call
AbstractPhoneConversation
needs to have aStreamingConversation
, not be aStreamingConversation
- then it works pretty cleanly - useAudioPipeline
[0] for thisPipelineFactory
andPipelineConfig
to contain typed versions of pipelines that can be used on phone calls and create the first version (e.g.StreamingConversationFactory
andStreamingConversationConfig
)[0] https://github.com/vocodedev/vocode-core/issues/650