[asterisk-app-dev] Expected Early Bridge Behavior
Mark Michelson
mmichelson at digium.com
Tue Mar 8 15:11:29 CST 2016
Hello List,
One thing that ARI lacks at the moment is a way to enable early media
from an outbound channel be sent to an inbound channel.
The way we intend to fix this is to provide an alternate means of
dialing outbound channels. Currently, when you dial an outbound channel
from ARI, Asterisk creates the channel and then calls it. As the ARI
application writer, you are handed that channel once it has been
answered. With some changes in Asterisk, we intend to allow the
application writer to break outbound dialing into two stages. First, the
application can request for Asterisk to create a channel. Asterisk will
give the application the channel immediately. Next, the application can
request Asterisk to call the channel. This allows for the application to
create the channel, place it into a bridge, and then call the channel.
The result is that if there is early media present, then anyone in that
bridge will hear the early media. Victory!
Now, the "fun" part is defining the expected behavior when multiple
outbound parties are dialed. Let's say that an ARI application creates
outbound channels for Alice, Bob, and Charlie. It places these three
channels into a bridge with other participants and then calls them.
Question 1: What is the expected behavior regarding early media in this
state?
My proposal is that we behave similarly to app_dial. In other words, we
block any incoming media from the outbound channels. If there are
already multiple participants, they can talk amongst themselves. If you
have a single participant, then you as the application writer can play a
ringing indication to them or music on hold while you wait for an answer.
Now let's continue and say that Alice answers her phone.
Question 2: Should there be any implicit behavior from Asterisk in this
scenario? For instance, should Asterisk hang up Bob and Charlie's
channel and remove them from the bridge?
On this one, I'm a bit torn. My immediate reaction upon hearing this
question is "No. ARI is meant to be controlled 100% by the application
writer. There should be no implicit behavior." However, when thinking
about the user experience, I start to reconsider. If Alice answers, then
the bridge will shift to a typical mixing bridge, allowing Alice to talk
with any of the previous participants in the bridge. However, they will
also hear ringing, early media, or even congestion from Bob and
Charlie's channels, making it a nasty experience for the bridge
participants.
You might get around this by having the mixing bridge block media from
channels that have not been answered. But now, what happens when Bob and
Charlie's phones both go to voicemail? They're technically "answered" at
this point, so now the participants are hearing weird mixed voicemail
from Bob and Charlie's devices and they're not in a position to be able
to leave any sort of coherent messages.
What I just described may be exactly what you want. However, it may be
that what you actually want is to just use what ARI already provides.
Originate calls to Alice, Bob, and Charlie, and as they answer, place
them in the bridge.
So folks, if you can provide some feedback for these two questions, that
would be super-handy.
Thanks,
Mark Michelson
More information about the asterisk-app-dev
mailing list