Added support for dynamic ringback

For perfomance, it also allows passing an opaque binary from this module
to preflow "opaque" attribute.
Only against invalid module... Yes there should be a better way.
Le 13 sept. 2014 01:47, "bitbashing" <notifications@github.com> a écrit :

> In applications/callflow/src/cf_route_req.erl:
>
> > @@ -49,18 +49,33 @@ maybe_exec_preflow(JObj, Props, Call, Flow, NoMatch) ->
> >              lager:warning("coudl not open ~s in ~s : ~p", [AccountId, AccountDb, _E]),
> >              maybe_reply_to_req(JObj, Props, Call, Flow, NoMatch);
> >          {'ok', Doc} ->
> > +        	{NewFlow,Opaque} = case wh_json:get_ne_value([<<"preflow">>, <<"ringback">>], Doc) of
> > +				'undefined' ->
> > +					lager:debug("no preflow ringback set ~p",[Doc]),
> > +					{Flow,'undefined'};
> > +				Module ->
> > +					try
>
> This is a very broad try...catch, is this intended to protect against
> something specific such as if Module is invalid? In the project we
> generally "code for the happy case". If you can provide what is being
> protected against, we can discuss some alternatives.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/2600hz/kazoo/pull/508/files#r17507990>.
>