Target Users
Users who want to outsource the trivial task of "needing to make a phone call" in life service scenarios to an AI Agent. The applicable scenarios currently only include restaurant reservation, modification, and cancellation.
Notes
It is strictly prohibited to modify the code under byted-outbound-call.
Core User Story: Intelligent Call Agent
- Core Scenario: As a user who does not want to make phone calls myself, I can directly tell ArkClaw in natural language the restaurant to contact and the specific requirements, invoking the process: [II. Outbound Call Task Execution Process].
- Step-by-Step Scenarios:
- I can directly state the requirement in natural language: "Help me contact Restaurant A, phone 13500015678, to reserve a family dinner for 4 people at 7 PM on March 20"
- When a deposit is required for the reservation, I will receive a secondary confirmation prompt, and execution will continue only after confirmation
- I can receive clear results: on success, complete reservation information will be returned; on failure, the specific reason will be provided, along with optional alternatives
- Core Scenario: The user proactively asks about the outbound call task status, invoking the process: [III. Outbound Call Task Status Query Process].
Feature Description
I. Prerequisites (to be completed before use)
- Open a Volcano Engine account, and complete outbound call line integration and qualification filing
- Create 3 dedicated Agents on the Volcano outbound call platform and configure the corresponding voice interaction logic, voice timbre, and script templates. Each scenario corresponds to a fixed script ID:
Scenario Agent Name Script ID New Reservation Reservation Agent llm_wlne_biffj Modify Existing Reservation Modification Agent llm_eeac_bigci Cancel Existing Reservation Cancellation Agent llm_ivqy_bigcj - Configure the corresponding task concurrency for each Agent, supporting parallel execution of multiple tasks
II. Outbound Call Task Execution Process
Phase 1: Task Creation and Validation
- User Input: The user describes the requirement in natural language, with no fixed format required
- Scope Validation: Only restaurant "reservation/modification/cancellation" tasks are accepted; other task types are directly rejected, and the rejection reason is returned
- Requirement Classification: Automatically identify whether the user's requirement is one of "reservation/modification/cancellation", and match the corresponding script ID
- Information Validation and Follow-up Questions: Validate the required information for the corresponding scenario; if any item is missing, automatically ask the user follow-up questions in natural language until the information is complete:
Requirement Type Required Information Corresponding Parameter Name Reservation Restaurant name, restaurant phone number, reservation date (year/month/day), reservation time (hour/minute), number of people, user's last name, user's contact phone number shop_name/shop_phone_number/date/time/people_number/first_name/user_phone_numberModification Restaurant name, restaurant phone number, originally reserved date (year/month/day), originally reserved time (hour/minute), original number of people, new reservation date (year/month/day), new reservation time (hour/minute), new number of people, user's last name, contact phone number left at the time of reservation shop_name/shop_phone_number/date/time/people_number/new_date/new_time/new_people_number/first_name/user_phone_numberCancellation Store name, store phone number, reservation date (year, month, day), reservation time (hour, minute), number of people, user's last name, contact phone number left at the time of reservation shop_name/shop_phone_number/date/time/people_number/first_name/user_phone_number - Deposit secondary confirmation: If before the outbound call it is detected that this store's reservation requires a deposit, automatically send a confirmation prompt to the user, and continue only after the user confirms.
- Exception handling: If any step in this stage encounters an API exception (code is not 200), directly organize the error information into natural language and inform the user, terminate the outbound call process, and do not proceed to the subsequent submission steps.
Stage 2: List of environment variables that must be carried
When calling the script of this skill, all of the following variables are required; otherwise, the message notification will report an error. The following information from the current session must be automatically passed as environment variables to the exec command. The information retrieval methods are as follows:
- OPENCLAW_CHANNEL:
- Meaning: Current message channel.
- Retrieval method: From the message metadata (metadata)
channelfield.
- OPENCLAW_SESSION_ID:
- Meaning: chat_id of the current session.
- Retrieval method: IF:
channeliswebchat, then run the toolsessions_list, from thesessions_listoutput result, obtain the session id (sessionId) of the current conversation, and assign sessionId toOPENCLAW_SESSION_ID. ELSE: assign the string "no_need" toOPENCLAW_SESSION_ID。
- OPENCLAW_USER_ID:
- Meaning: Sender user ID.
- Retrieval method: IF:
channeliswebchat, assign the string "no_need" toOPENCLAW_USER_IDELSE: remove the "user:" prefix from thechat_idfield in the message metadata (metadata), and assign it toOPENCLAW_USER_ID。
Stage 3: Outbound task submission
Execute step by step as follows:
-
Execute script: call
scripts/submit_job.pySubmit the outbound task. Calling method (automatically called by the Agent, no manual execution by the user is required) Recommended method: via the exec tool's built-inenvparameter passing (sensitive information will not appear in command line history) { "tool": "exec", "command": "python3 scripts/submit_job.py --request-body '{ "job_name": "[Reservation/Modification/Cancellation] + Store name + User request", "job_description": "User's original request in natural language (optional)", "script_id": "Script ID for the corresponding scenario: Reservation=llm_wlne_biffj/Modification=llm_eeac_bigci/Cancellation=llm_ivqy_bigcj", "params": { "user_phone_number": "Contact phone number (required in all scenarios)", "date": "Reservation date (reservation scenario only)", "time": "Reservation time (reservation scenario only)", "people_number": "Number of people for the reservation (reservation scenario only)", "shop_name": "Store name (required in all scenarios)", "shop_phone_number": "Store phone number (required in all scenarios)", "first_name": "User's last name (required in all scenarios)", "new_date": "New reservation date (modification scenario only)", "new_time": "New reservation time (modification scenario only)", "new_people_number": "New number of people for the reservation (modification scenario only)" } }' ", "env": { "OPENCLAW_SESSION_ID": "{{OPENCLAW_SESSION_ID obtained in Stage 2}}", "OPENCLAW_CHANNEL": "{{OPENCLAW_CHANNEL obtained in Stage 2}}", "OPENCLAW_USER_ID": "{{OPENCLAW_USER_ID obtained in Stage 2}}" } } -
View the output of the script from the previous step, and process it as follows:
- IF the script output contains ERROR, organize the ERROR information into natural language and inform the user, and terminate the process.
- ELSE IF If there is no ERROR in the script output, in a relatively friendly way, present the parameters submitted for the task and the returned
JobId, organize them into natural language, and at this stage inform the user that the task has been submitted, then terminate the process after the completion notification. Reference return format:
- Example of a successful task submission return:
✅ An outbound call task has been initiated for you for "Haidilao Hot Pot (Zhongguancun Branch)". The process takes a long time, so please wait patiently. You will be notified once the task is completed! 📋 Task ID: {JobId} 📅 Time: March 20, 19:00 👥 Number of people: 4 📝 Reservation name: Mr. Li
III. Process for Querying Outbound Call Task Status
- Execute script: call
scripts/query_job.pyQuery the outbound call task status and details. Invocation method (the Agent calls automatically; the user does not need to execute it manually) { "tool": "exec", "command": "python3 scripts/query_job.py --job_id '{JobId}'" } - Check the output of the script from the previous step. The script has automatically organized the results. Process them as follows:
- IF If the script output contains ErrorCode, organize the error message into natural language and inform the user, then terminate the process.
- ELSE IF the script output already contains organized JobDetail information:
- The script output already contains: JobId, StatusDescription (status description)
- If the task is already completed (StatusDescription contains "已完成预订的呼叫"), it will also contain: CallResultDescription (connection status), Summary (information summary)
- Directly inform the user of the organized information in a friendly way. Reference return format:
- Example return for querying a waiting task:
📋 Task ID: {JobId} ⏳ Current status: The call task has been submitted and is queued, waiting for the system to initiate the call.
- Example return for querying a task in progress:
📋 Task ID: {JobId} 🔄 Current status: The call task is being processed. If the merchant does not answer, the system will automatically retry the call. Please wait patiently.
- Example return for querying a task where the call has ended and is being analyzed:
📋 Task ID: {JobId} 📊 Current status: All scheduled calls (including retries) have been completed, and the call results are being analyzed.
- Example return for querying a completed and connected task:
📋 Task ID: {JobId} ✅ Task status: The booking call has been completed, and the call result analysis has been completed. 📞 Connection status: Connected normally Reservation details:
📅 Dining time: March 28, 2026, 21:00 👥 Number of people: 1 📝 Reservation name: Mr. Gao 📞 Reserved phone: Last digits 8838
- Example return for querying a completed but not connected task:
📋 Task ID: {JobId} ✅ Task status: The booking call has been completed, and the call result analysis has been completed. 📞 Connection status: No answer
- Example return for a task that does not exist:
❌ Query failed: The call task does not exist. Please confirm whether the task ID is correct.
Usage Examples
Example 1: Complete information, execute directly
User input: Help me book Haidilao Hot Pot Zhongguancun Branch for tomorrow at 7 PM. Their phone number is 13800138000, 3 people, my surname is Wang, and my contact phone number is 13512345678 Skill thinking: The user query already contains all necessary information, including the store name, reservation time, number of people, user's surname, and contact phone number, so no follow-up questions are needed. Call submit-job and notify the customer. Skill response: Okay, I'll contact Haidilao Hot Pot Zhongguancun store right away to make the reservation, and I'll let you know the result as soon as it's done~
Example 2: Automatically ask follow-up questions for missing information
User input: Help me cancel tomorrow's Haidilao reservation Skill thinking: The user query contains the store name and time, but other information is needed. Skill response: What is the phone number of the Haidilao store? What are the surname and contact phone number left for the reservation? User completes information: The phone number is 13500015678, my surname is Li, and the contact phone number left is 13512345678 Skill thinking: The user query already contains all required information, so no follow-up questions are needed. Directly call cancel-job and notify the customer. Skill response: Okay, I'll cancel it for you right away~
Example 3: Reject if out of scope
User input: Help me call my boss to ask for leave
Skill response: Sorry, I currently only support outbound call tasks for appointments, rescheduling, and cancellations for life service stores. I cannot handle other types of call requests for now~
Example 4: Query outbound call task status
User input: Help me check the status of the outbound call task with task ID job_123456 Skill thinking: The user needs to query the task status for the specified JobId, call the query_job script Skill response: Okay, I'll check the task status for you right away~ Skill thinking: Execute the query script to obtain the organized status result Skill response:
📋 Task ID: job_123456 ✅ Task status: The reservation call has been completed, and call result analysis has been completed. 📞 Connection status: Connected normally Reservation details:
📅 Dining time: March 28, 2026 21:00 👥 Number of people: 1 📝 Reserver: Mr. Gao 📞 Contact phone number left: ending in 8838
Error handling
| Error scenario | Handling logic | Return example |
|---|---|---|
| Merchant phone number invalid/unassigned | Return failure directly and prompt the user to verify the number | ❌ Call failed. The store phone number 135xxxxxxx you provided is unassigned. Please verify and resubmit |
| Outbound call interface call failed | Extract the msg information returned by the interface, organize it, and return it | ❌ The outbound call service is temporarily unavailable: the interface returned "Insufficient balance". Please recharge and try again |
| Task submission exception | Return the interface error information directly | ❌ Task submission failed: the interface returned "Script ID does not exist". Please check whether the configuration is correct |
| Environment variable validation failed | Check which variables were not passed, retry and pass them in | Retry script |
Notes
- Please ensure that the provided store phone number is real and valid, otherwise the outbound call will fail
- Scenarios involving deposit payments will first go through secondary user confirmation and will not automatically deduct funds.