Android - Google Assistant not providing the number for CREATE_CALL BII

198 Views Asked by At

I am trying to integrate CREATE_CALL BII I can trigger my app using the voice command “Call <CONTACT_NAME> on <APP_NAME>” but I am facing a problem that the BII is only sending me the CONTACT_NAME but not the PHONE_NUMBER even though that contact is in android native Addressbook.

Following is my action:

<action intentName="actions.intent.CREATE_CALL">
    <fulfillment urlTemplate="https://fit-actions.firebaseapp.com/call{?callFormat,name,telephone}">
        <parameter-mapping urlParameter="callFormat" intentParameter="call.callFormat"/>
        <parameter-mapping urlParameter="name" intentParameter="call.participant.name" />
        <parameter-mapping urlParameter="telephone" intentParameter="call.participant.telephone" />
    </fulfillment>
</action>

Action is working perfectly with

App Actions Test Tool

I am following https://developers.google.com/assistant/app/reference/built-in-intents/communications/create-call, even though I copied the same code from that link to my sample to make it work but I am getting the same result, the only name is there in my deep link but no phone number is there.

What I want to achieve the way Google Duo is doing shown in the following gif Making call using Duo

1

There are 1 best solutions below

8
On

App Actions doesn't know how to look up additional information about the contact in the query. The phone number is only provided if it was spoken in the request.

If you need a phone number for the contact, you will have to write code to query your address book using the name provided in the user's query. You might find that the user's query is not specific enough to locate one specific contact, and in that case, you will have to provide a UI to disambiguate the request (e.g. if there are two people named "Lee", the user will need to be able to choose which one they meant).