-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbridge.xml
More file actions
47 lines (40 loc) · 1.97 KB
/
Copy pathbridge.xml
File metadata and controls
47 lines (40 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!--
PhoneZero inline TeXML template — not a hosted bin.
Call-create To (request field, not in this XML):
sip:{PHONEZERO_FROM_NUMBER}@sip.voice.x.ai;transport=tls
The Builder agent answers that To immediately.
At call time the caller substitutes:
{RESTAURANT_E164} — callee PSTN E.164 inside <Dial>
(must be on the Telnyx outbound voice
profile attached to the PhoneZero TeXML
app — any name; enforcement is Telnyx,
not this XML)
Task facts are NOT spoken here. Upload phonezero-task.json to the
xAI collection (scripts/put-booking-file.sh) before this dial. The agent
reads that file. Do not add <Say>.
and passes the whole XML string as the Texml field on
POST /v2/texml/Accounts/{account_sid}/Calls
(request schema is oneOf: Url XOR Texml XOR neither — do not send Url
when Texml is set).
Flow: Pause 3s (welcome "PhoneZero is ready!" + collections_search
on the SIP leg) → <Dial> the callee with an E.164
callerId. The welcome is spoken on the agent's ear during this
pause; the callee must not be bridged yet or a fast pickup
hears it. After Dial, the agent hears ringback and stays mute
until the callee greets.
Do not set answerOnBridge: the SIP To is already answered so the
agent can retrieve the task file; answerOnBridge only applies to
an unanswered inbound leg and has been seen to skip the PSTN Dial
after a SIP first hop.
Recording is call-level on the create request (Record=true,
RecordingChannels=dual). Do not put record on <Dial>.
Do not set MachineDetection / AsyncAmd on this call. They would classify
the To leg (the xAI agent), which is useless. Voicemail is conversational.
-->
<Response>
<Pause length="3"/>
<Dial callerId="{PHONEZERO_FROM_NUMBER}" timeout="60" timeLimit="600" ringTone="us">
<Number>{RESTAURANT_E164}</Number>
</Dial>
</Response>