[asterisk-app-dev] channel origination race condition discussion

Matt DiMeo mdimeo at digium.com
Wed Dec 4 16:12:08 CST 2013


Regarding the "Originate/Channel Creation as a two step proces" thread:
>> Another option would be to allow the user to specify the unique id of the
>> channel. This seems a bit frightening, but might be worth pursuing.
>>
>>
>>

I kinda like this idea too, if I could ask asterisk to allocate me a 
valid channel id I could then use with an originate.

I've had a similar worry with PlaybackStopped.  In that case I wored 
around the race condition by doing a GET on the playbackID as soon as I 
get one back, and then treating a failed GET as a stopped playback.

This is all another reason I hate having requests and events going 
through different pipes.  If I could send the request down the 
websocket, and asterisk promised to give me the channel id response on 
the websocket before sending me any events about it, there'd be no race 
condition.  But I guess that ship has sailed.



More information about the asterisk-app-dev mailing list