[asterisk-app-dev] ARI: Asterisk 14 + early bridging + failovers

Joshua Colp jcolp at digium.com
Thu Feb 23 06:48:19 CST 2017


On Thu, Feb 23, 2017, at 08:37 AM, Marin Odrljin wrote:
> I've been working with early bridging available in asterisk 14 and came
> to
> situation where I need to handle failovers when trunk is not available.
> 
>  
> 
> My application is working as following:
> 
> -          IN call comes to system, it is not answered yet
> 
> -          Bridge is created and IN channel is added to it
> 
> -          OUT channel is created and added to bridge
> 
> -          Dial is made on OUT channel
> 
> -          When OUT channel is connected, IN channel will answer as well
> 
>  
> 
> Dial is usualy made via some trunk (SIP, IAX2, DAHI span) to remote
> system.
> If status of trunk is correct (ONLINE, OFFLINE) then everything is fine,
> app
> will just skip it and take other used for failover. But it can happen
> that
> status known to asterisk is not yet updated because it is checked every
> e.g.
> 60 sec (especially on IP trunks, TDM is updated instantly), and trunk
> just
> went offline few seconds ago. In this case app will try to dial over it
> and
> usually get back BUSY or CONGESTION status. Now, I would like just to try
> to
> dial over other trunk, but unfortunately IN channel for some reason
> immediatelly leaves the bridge and hangup by its own. Is that normal
> behaviour because other channel in bridge was not connected? If yes, in
> this
> case I can't make failover logic with early bridging :-(

I don't believe the caller should hang up, unless it is taking a long
time in which case they may hang up themselves. A log would show exactly
what is happening.

-- 
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