[asterisk-app-dev] ARI event on originate

Sylvain Boily sboily at proformatique.com
Wed Jan 6 09:18:46 CST 2016



Le 2016-01-06 10:07, Joshua Colp a écrit :
> Sylvain Boily wrote:
>> [...]
>>>
>>
>> Yes, because for me an update and a creation of channel is very
>> different ;). It's more simple to have this mecanism everywhere and
>> clearly it can help.
>
> I don't understand what you mean by update and a creation. From the
> scope of Asterisk when the POST returns with a channel then it is
> created. I can see how it would be useful if you are basing everything
> off events to react instead.

For me an update is a ChannelChangeState. Like my channel event has been
update because there is a change. But if i want follow the update of my
channel and have a consistent state, it will be fun to have a
ChannelCreated. (sorry my english is limited...)

Listening event ChannelCreated --> add to my struct --> subscribe to
this channel to following state with ChannelChangeState.

But yes i added an event on the POST and it works. My point is only to
give my use case, and maybe it would be more simple to have an event on
originate to follow the channel.

>
>>
>> I found another problem for me on originate, the cancelation, there is
>> no event if you cancel the originate with the phone (like hangup the
>> call)
>>
>> Asterisk originate via ARI ----- A ring (no event)
>> A cancel before answer (no event too)
>
> Are you specifying a Stasis application when originating? If not then
> you won't be subscribed to the channel. If you are and you aren't
> seeing events then that would be a bug.
>

Hum, i need to check, i understand, maybe it's my mistake.

Sylvain



More information about the asterisk-app-dev mailing list