[asterisk-app-dev] ARI dial application

Joshua Colp jcolp at digium.com
Fri Dec 19 12:39:38 CST 2014


Paul Belanger wrote:
> On Fri, Dec 19, 2014 at 1:09 PM, Leif Madsen<lmadsen at thinkingphones.com>  wrote:
>> On 19 December 2014 at 13:01, Joshua Colp<jcolp at digium.com>  wrote:
>>
>>> Right now you can't directly replace app_dial with an ARI equivalent
>>> because of early media. There is no way to do anything with a channel until
>>> it has answered and no way to exchange early media.
>>>
>> So in the mean time, ignoring the "early media" component, for the
>> signalling (or pseudo-signalling perhaps as it where), could you have the
>> left hand channel (channel A) attached to a bridge and then connected to
>> another channel or application in ARI that would provide ringing? (think the
>> 'r' option in app_dial)
>>
>> If so, you could at least simulate the ringing for now, and then when the
>> other channel answered, move the bridged connection from Channel A to
>> "ringing channel" over to Channel B.
>>
>> Forgive me for being naive here. My knowledge of the actual constructs
>> available in ARI are still primitive :)
>>
> Okay, so lets ignore the limitation today for early media.   And say
> we only care about bi-directional audio when the far end answers.  We
> can then add in features once we get the basic working.
>
> So ARI dial would be as above.
>
> Answer incoming channel
> Start originate
> on answer create bridge
> move caller A and B into bridge.

If you want to get as close to app_dial as you can:

1. Don't answer incoming channel
2. Originate outgoing channel
3. Watch events from outgoing channel
	If ringing then call /ring on caller
	If hung up then DELETE caller
4. Once outgoing channel has answered answer caller
5. Create bridge
6. Place caller and outgoing channel into bridge

If you want a simplistic dial then what you've done will work.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-app-dev mailing list