Skip to content

Conversation

jamsea
Copy link
Contributor

@jamsea jamsea commented Oct 8, 2025

Summary

Fixes the "Call ID and Call Domain are required in the body" error in the PSTN dial-in demo.

Changes

  • server.py: Added callId and callDomain at the top level of the body payload sent to the bot
  • bot.py: Use runner_args to get the room url and token

Problem

The bot was expecting callId and callDomain at the top level of the body, but the server was only sending them nested inside dialin_settings, causing the bot to fail with an error.

Solution

Include both the nested dialin_settings (for backward compatibility) and the top-level callId and callDomain fields that the bot requires.

@jamsea jamsea requested a review from markbackman October 8, 2025 07:57
"call_transfer": request.call_transfer,
"sip_headers": request.sipHeaders, # passing the SIP headers to the bot
"callId": request.callId,
"callDomain": request.callDomain,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might have broken the bot, because we need to send the other params to the bot as well... To and From. Is the bot not expecting dialin_settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vr000m you're right, it's not expecting dialin_settings. I wasn't sure if I needed to change the definition of the Python types in this file or change the bot file. I opted for this file but I can change the bot file instead.

body_data = runner_args.body
room_url = body_data.get("room_url")
token = body_data.get("token")
room_url = runner_args.room_url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any issue running this demo as is (uv.lock is using 0.0.85, but we haven't changed anything in this area in a bit).

I'm intentionally creating a room out of band from Pipecat Cloud and passing to my bot. This allows the room to be created with the correct SIP parameters.

Are you seeing an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markbackman, running as is on Pipecat Cloud doesn't work. It works locally just fine on main. This was the only way I was able to get it to work on Pipecat Cloud.

body_data does not contain token or room_url 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants