Asterisk ARI early media detection

1.7k views Asked by At

I'm playing with asterisk ARI and I have few problems that I'm unable to solve.

  1. Originating a call from ARI does not register any events until channel is UP. Is it possible to force it to enter Stasis before channel is in UP state?

  2. I'm trying to detect if there is voice in early media (operator messages on GSM gateway calls). Can it be done?

2

There are 2 answers

0
Nir Simionovich On
  1. You can originate the call into a Local channel, then perform your dial from the local channel.

  2. Early media is carried via SIP 183, which means, that Asterisk isn't really aware of it. Well, it is aware at the channel level, saying: "Please open media ports", however, there is not ARI event that says that.

Gotta admit, it does sound like a cool feature for ARI.

0
Sadeesh Radhakrishnan On

It is very much possible with Asterisk 14 version. https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Channels+REST+API#Asterisk14ChannelsRESTAPI-create

This will create a new channel and place into Stasis immediately. You will be able to do any operation over the newly created channel.