transfering call not working
# support
s
I keep getting an error message regarding my conditions section, im sending the value for transfering a telephone call to another number, but i keep getting an error message saying {"message":["assistant.model.messages.0.property condition should not exist"],"error":"Bad Request","statusCode":400} $data=[ "assistant"=>[ "backgroundSound"=>"office", "endCallMessage"=>"thankyouforyourtimetoday,goodbye.", "firstMessage"=>$intro, "voicemailDetectionEnabled"=>true, "endCallFunctionEnabled"=>true, "hipaaEnabled"=>false, "llmRequestDelaySeconds"=>0.1, "maxDurationSeconds"=>300, "serverMessages"=>[ "end-of-call-report", ], "model"=>[ "model"=>"gpt-4o", "provider"=>"openai", "semanticCachingEnabled"=>true, "tools"=>[ [ "type"=>"voicemail" ] ], "messages"=>[ [ "role"=>"system", "content"=>$prompt, "conditions"=>[ [ "param"=>"destination", "operator"=>"eq", "value"=>"+#####"]]]]], "voicemailDetection"=>[ "provider"=>"twilio", "enabled"=>false ], "name"=>"zo", "recordingEnabled"=>true, "transcriber"=>[ "provider"=>"deepgram", "language"=>"en-GB", "model"=>"nova-2" ], "voice"=>[ "provider"=>"11labs", "voiceId"=>$voiceId ] ], "customer"=>[ "number"=>$telephone, "name"=>$name ], "maxDurationSeconds"=>600, "phoneNumber"=>[ "assistantId"=>"#####", "name"=>"####", "twilioAccountSid"=>"#####", "twilioAuthToken"=>"#####", "twilioPhoneNumber"=>$tel], "type"=>"outboundPhoneCall" ];
v
message has been deleted
@soc86 It seems like there might be a misunderstanding in the structure of your request. The error message indicates that the
condition
property should not exist within the
messages
section of your data structure. To resolve this issue, you should remove the
conditions
array from the
messages
object. The
conditions
property is not expected to be part of the
messages
object based on the schema you've provided. Here's how you can adjust your
$data
array:
Copy code
php
$data=[
  "assistant"=>[
    // ... other properties ...
    "model"=>[
      "model"=>"gpt-4o",
      "provider"=>"openai",
      "semanticCachingEnabled"=>true,
      "tools"=>[
        [
          "type"=>"voicemail"
        ]
      ],
      "messages"=>[
        [
          "role"=>"system",
          "content"=>$prompt
          // Removed the conditions array from here
        ]
      ]
    ],
    // ... other properties ...
  ],
  "customer"=>[
    "number"=>$telephone,
    "name"=>$name
  ],
  "maxDurationSeconds"=>600,
  "phoneNumber"=>[
    "assistantId"=>"#####",
    "name"=>"####",
    "twilioAccountSid"=>"#####",
    "twilioAuthToken"=>"#####",
    "twilioPhoneNumber"=>$tel
  ],
  "type"=>"outboundPhoneCall"
];
Make sure to remove the
conditions
array entirely from the
messages
object. If you need to apply conditions for message delivery or call routing, you should refer to the correct section of the API documentation where conditions are applicable. If you need further assistance with the correct structure or if you have any other questions, please let me know!
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
s
it's correct there is no such property under asssitant models.
what are you trying to achieve?