cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Callouts with answering machine detection, fail with a runMenu

beaver
Contributor

Hi,

I'm having some difficulty with my callouts request with an AMD. I have setup my custom callouts with this ice:

%{
   name: "connectPstn",
   number: "phone number",
   maxDuration: 240,
   amd: %{
      enabled: true,
      async: false
    },
   locale: "Gabrielle"
 },

I also have a simple instruction to set a cookie.

I correctly receive the ACE callback with the amd in the payload. I can easily hangup if the amd status is a machine.

But when a human answer, if the svaml that I return contains a simple say instruction it works perfectly fine.
But if I return a runMenu action, the menu is never trigger and the call hangup.

Here the svaml:

%{
 instructions: [
   %{
      name: "say",
      text: "Bonjour, passé une agréable journée",
      locale: "Gabrielle"
    }
  ],
  action: %{
    name: "runMenu",
    locale: "Gabrielle",
    menus: [
      %{
        id: "main",
        mainPrompt: "Bonjour, passé une agréable journée, faites le 1 ou le 2",
        repeats: 3,
        options: [
          %{dtmf: 1, action: "return(callee_one)"},
          %{dtmf: 2, action: "return(callee_two)"}
        ]
       }
      ]
 }
}




1 ACCEPTED SOLUTION

Accepted Solutions

Looks like I had another typo, now working.

View solution in original post

3 REPLIES 3

Alex_Sberna
Employee
Employee

Hi,

 

The issue is that the runMenu action isn't configured properly. You're missing the `mainMenu` property that tells what menu to run first.

 

%{
 instructions: [
   %{
      name: "say",
      text: "Bonjour, passé une agréable journée",
      locale: "Gabrielle"
    }
  ],
  action: %{
    name: "runMenu",
    locale: "Gabrielle",
    mainMenu: "main",
    menus: [
      %{
        id: "main",
        mainPrompt: "Bonjour, passé une agréable journée, faites le 1 ou le 2",
        repeats: 3,
        options: [
          %{dtmf: 1, action: "return(callee_one)"},
          %{dtmf: 2, action: "return(callee_two)"}
        ]
       }
      ]
 }
}

 

Thanks,

Alex Sberna, Documentation Engineer

Pretty sure it is not require and default to "main".

I did try with it to be sure, and still fail

Looks like I had another typo, now working.