We're implementing the App Intents Phone schema domain in our app to enable Siri to initiate calls to our contact entities via our voip.
We've implemented a .phone.startCall intent and registered our entities as .phone.phonePerson. The intent provides both the required destination and audioVisualMode parameters, and the perform() method is implemented to handle the call.
However, the perform() method is never invoked. Instead, Siri either: Says that the phone number is not linked, or Announces that it is calling, but our app intent is never executed.
Anybody implemented this Phone schema domain and it s working successfully ?
Sample Code:
struct StartCallIntent: AudioRecordingIntent, AudioPlaybackIntent {
var destination: CallDestination
var audioVisualMode: CallAVMode
init(contact: ContactEntity, mode: CallAVMode = .audio) {
self.destination = .phonePerson(contact)
self.audioVisualMode = mode
}
func perform() async throws -> some IntentResult {
print("Call Initiating to contact")
return .result()
}
@AppEnum(schema: .phone.audioVisualMode)
enum CallAVMode: String, CaseIterable {
case audio
case video
}
@UnionValue
enum CallDestination: Sendable {
case phonePerson(ContactEntity)
case group([ContactEntity])
}
@AppEntity(schema: .phone.phonePerson)
struct ContactEntity: IndexedEntity {
static var defaultQuery = ContactEntityQuery()
let id: UUID
var person: IntentPerson
}