Permalink
Browse files

Merge branch 'v1'

  • Loading branch information...
2 parents cc17622 + 70b14e9 commit e0576487a7d8b1ff0cf5b81c845590c24872ecf7 @lordnull lordnull committed Feb 1, 2012
Showing with 28 additions and 6 deletions.
  1. +9 −3 README.markdown
  2. +19 −3 src/cook.erl
View
@@ -46,9 +46,15 @@ Project Status
==============
OpenACD current exists in two states: version 1.0 which features all the
-above, and version 2.0, which adds multi-channel. For the stable version
-1.0, use the 'v1' branch. Master is version 2, and is in heavy
-development.
+above, and version 2.0, which adds multi-channel, and improved plugin
+support. For the stable version 1.0, use the 'v1' branch. Master is
+version 2, and is in heavy development.
+
+There are also two branches to help when developing plugins:
+embeddable_build and embeddable_build_v1. They correspond to master and
+v1 respectively. When developing a plugin using rebar to build, using
+the embeddable_build and embeddable_build_v1 will ensure OpenACD builds
+properly and gives the developer no trouble.
The OpenACD developers are working with [eZuce](http://www.ezuce.com) and
[KGB](http://kgb.com) to integrate OpenACD as the new sipXecs ACD.
View
@@ -544,7 +544,10 @@ check_conditions([{caller_id, Comparison, RegEx} | Conditions], Ticked, Qpid, Ca
_ ->
check_conditions(Conditions, Ticked, Qpid, Call)
end
- end.
+ end;
+check_conditions([_ | Conditions], Ticked, Qpid, Call) ->
+ check_conditions(Conditions, Ticked, Qpid, Call).
+
%% @private
-spec(do_recipe/4 :: (Recipe :: recipe(), Ticked :: non_neg_integer(), Qpid :: pid(), Call :: pid()) -> recipe()).
@@ -674,6 +677,9 @@ do_operation([{Op, Args} | Tail], Qpid, Callpid, Acc) ->
?INFO("Recipte end_call for ~p recived~n",[Callpid]),
%% here should be the function call to hangup the qued call
gen_media:end_call(Callpid),
+ ok;
+ _Op ->
+ ?WARNING("ignoring unknown operation ~p", [_Op]),
ok
end,
Newacc = case Out of
@@ -1010,6 +1016,13 @@ do_operation_test_() ->
?assertEqual([], do_operation([{add_skills, [add_skills]}, {remove_skills, [remove_skills]}], QPid, Mpid)),
Assertmocks()
end}
+ end,
+ fun({_QMPid, QPid, Mpid, Assertmocks}) ->
+ {"unknown op",
+ fun() ->
+ ?assertEqual([], do_operation([{unknown_op, "something"}], QPid, Mpid)),
+ Assertmocks()
+ end}
end]}.
check_conditions_test_() ->
@@ -1607,8 +1620,11 @@ check_conditions_test_() ->
?assert(check_conditions([{caller_id, '!=', "^Number"}], "doesn't matter", Qpid, Mpid)),
Assertmocks()
end}
- end]}}
- ].
+ end]}},
+ {"unknown condition",
+ fun() ->
+ ?assert(check_conditions([{unknown_cond, '=', "something"}], "doesn't matter", foo, bar))
+ end}].
tick_manipulation_test_() ->
{foreach,

0 comments on commit e057648

Please sign in to comment.