ASTERISK ARI external media

Hi,

I am using asterisk-external-media to transcript audio files during incoming calls.
But I can’t manage to use it for outgoing calls.
Someone knows if it is possible?

I removed the originate and from my dialplan, I use:
exten => MYNUMBER,1,Stasis(externalMedia2)

So asterisk-external-media is used as a client and when someone calls MYNUMBER, I supposed that it will transcribe the callee…but no…

If someone has an idea for how to do it in nodejs (I can do it with the DIALPLAN with AEAP but I need nodejs to manage the playbacks)

Thank you!

You should actually provide a log showing what happens, and explain what happens.

In my code I have:

let premierement = false;
client.on(‘StasisStart’, (event, locchannel) => {
if (!premierement){
premierement = true;
console.log(‘StasisStart event received’);
locchannel.answer((err) => {
playmyaudio(locchannel, MYAUDIO1)
if (err) {
console.error(‘Error answering the call:’, err);
return;
}
console.log('ANSWERED: '+locchannel.caller.number)
locchannel.externalMedia({
app: “externalMedia2”,
external_host: this.opts.listenServer,
format: this.opts.format
},
function (err, extchannel) {
if (err) {
console.error(‘Error answering the call:’, err);
return;
}
playmyaudio(extchannel, MYAUDIO2)
}
)
})
}
});

When I run this code, I call the SIP phone number registered on asterisk using ZOIPER. Asterisk answer and play MYAUDIO1 and at the same time MYAUDIO2 is transcripted (not to the ISFINAL status but this is not the same problem) but not my voice.

A second problem, is when I try to call this phone number with a real phone, I have

WARNING[15921][C-00000040]: chan_sip.c:17443 check_auth: username mismatch, have , digest has
even if I authorized all the callers.

Thanks

Marked up as code (preformatted text)

1 Like

Hey!

I forgot to bridge the channels, that’s why it was not possible to send the voice to google…
So for now this problem is solved: BRIDGE external media is essentials!
I hope it will help.

For the second question:

WARNING[15921][C-00000040]: chan_sip.c:17443 check_auth: username mismatch, have , digest has
even if I authorized all the callers.
If someone can help me?

Thanks a lot!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.