Recipes← all recipesView on GitHub

Add a phone caller to a video room

VideoPSTN dial-in to a video conference

Create a video room through REST, then connect a phone call to that room.

video

The claim

Two pieces. POST /api/fabric/resources/conference_rooms creates the room; the vendored REST spec requires name and enable_room_previews and takes display_name, max_members, layout, record_on_start and a dozen more as options. The SDK wraps it as client.fabric.conference_rooms.create. In SWML, join_room takes name, its one required field per the bundled schema, and the bundled schema describes the verb as joining the named room.

How it works

def create_room(name=ROOM):
    return client.fabric.conference_rooms.create(
        name=name, display_name="Workshop stand-up", enable_room_previews=False,
        max_members=10)
- answer: {}
- play: { url: "say:Joining the workshop stand-up. One moment." }
- join_room:
    name: "workshop-standup"
- hangup: {}

What the platform receives for the room:

POST /api/fabric/resources/conference_rooms
{"name": "workshop-standup", "display_name": "Workshop stand-up",
 "enable_room_previews": false, "max_members": 10}

hangup follows join_room in the document. The Python surface builds the same document with SWMLService and reads the room name from ROOM_NAME, so the REST call and the verb agree by construction.

Limitations

The verifier proves the request and the document. What the phone participant hears, and how the room lays them out, are the platform’s side of a live call.

This recipe covers the phone leg only. For browser participants, see create-a-video-room-and-join-from-the-browser.

What to change first

Change the name in swml/agent.yaml to another room and run the verifier. The REST body and the Python document pass, because the verifier’s preset ROOM_NAME takes precedence over .env. The YAML join_room check fails against the verifier’s fixed room. The verifier holds the REST body and both documents to one value, and a surface that drifts fails on its own.