Skip to content

Commit fbf4f8d

Browse files
authored
Merge pull request #747 from hchen2020/master
Fix Twilio CallbackPath path
2 parents cc034e0 + b17db8a commit fbf4f8d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Plugins/BotSharp.Plugin.Twilio/Controllers/TwilioVoiceController.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public async Task<TwiMLResult> InitiateConversation(ConversationalVoiceRequest r
4848
var instruction = new ConversationalVoiceResponse
4949
{
5050
SpeechPaths = ["twilio/welcome.mp3"],
51-
CallbackPath = $"twilio/voice/{request.ConversationId}/receive/0?{GenerateStatesParameter(request.States)}",
51+
CallbackPath = $"twilio/voice/{request.ConversationId}/receive/0",
5252
ActionOnEmptyResult = true,
5353
Timeout = 2
5454
};
@@ -60,6 +60,8 @@ await HookEmitter.Emit<ITwilioSessionHook>(_services, async hook =>
6060
OnlyOnce = true
6161
});
6262

63+
instruction.CallbackPath = $"{instruction.CallbackPath}?{GenerateStatesParameter(request.States)}";
64+
6365
var twilio = _services.GetRequiredService<TwilioService>();
6466
if (string.IsNullOrWhiteSpace(request.Intent))
6567
{

0 commit comments

Comments
 (0)