Asterisk AEAP dialplan variables

Hi everyone,

I setup STT to google speech to text with AEAP (GitHub - asterisk/aeap-speech-to-text: Asterisk external speech to text application) and is working good, BUT I need to pass some params on dialplan, like callid, callerid,etc. I know that in aeap.conf I can setup this custom params, but are statically.

;@callerid = 1234

If I uncomment @callerid I see the param on websocket. On the wireshark I can see params on setup

I tried to send to ws variables from dialplan, it sent the variables to ws but as set params and not on setup, set id is not the same as setup response id.

On dialplan I use Set(SPEECH_ENGINE(callerid)=${callerid}), this should be after SpeechCreate, SpeechStart or Before?

    same => n,SpeechCreate(my-speech-to-text)
    same => n,Set(SPEECH_ENGINE(User-To-User)=${User-To-User})
    same => n,Set(SPEECH_ENGINE(callerid)=${callerid})
    same => n,Set(SPEECH_ENGINE(callid)=${callid})
    same => n,SpeechStart()
    same => n,SpeechBackground()

I tested Set SPEECH_ENGINE after/before Create and Start with the same results.

I don’t know if custom dialplan variables can be set on setup or need to be set after setup, I have 3 custom variables, on wireshark I can see three packets each with one variable.

Can I set multiple variables on the same set?

Any help will be very apreciated. Thanks.