Skip to content

Commit

Permalink
Fix PBX:record arity for Twilio & Africa's Talking
Browse files Browse the repository at this point in the history
The `record.erl` implementation changed in 55bde09
to add a 4th parameter, but it wasn't added in `twilio_pbx.erl`

See #859
  • Loading branch information
matiasgarciaisaia committed Apr 8, 2020
1 parent d9a0609 commit 5b384ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions broker/src/africas_talking/africas_talking_pbx.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-module(africas_talking_pbx).
-compile([{parse_transform, lager_transform}]).
-export([pid/1, answer/1, reject/1, hangup/1, can_play/2, play/2, capture/6, terminate/1, sound_path_for/2, sound_quality/1, dial/6, record/4]).
-export([pid/1, answer/1, reject/1, hangup/1, can_play/2, play/2, capture/6, terminate/1, sound_path_for/2, sound_quality/1, dial/6, record/5]).
-behaviour(pbx).

-export([start_link/1, find/1, new/1, resume/2, user_hangup/1]).
Expand Down Expand Up @@ -52,7 +52,7 @@ capture(Caption, Timeout, FinishOnKey, Min, Max, ?PBX(Pid)) ->
X -> X
end.

record(FileName, StopKeys, Timeout, ?PBX(Pid)) ->
record(_AsteriskFileName, FileName, StopKeys, Timeout, ?PBX(Pid)) ->
case gen_server:call(Pid, {record, FileName, StopKeys, Timeout}, timer:minutes(5)) of
hangup -> throw(hangup);
X -> X
Expand Down
4 changes: 2 additions & 2 deletions broker/src/twilio/twilio_pbx.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-module(twilio_pbx).
-compile([{parse_transform, lager_transform}]).
-export([pid/1, answer/1, reject/1, hangup/1, can_play/2, play/2, capture/6, terminate/1, sound_path_for/2, sound_quality/1, dial/6, record/4]).
-export([pid/1, answer/1, reject/1, hangup/1, can_play/2, play/2, capture/6, terminate/1, sound_path_for/2, sound_quality/1, dial/6, record/5]).
-behaviour(pbx).

-export([start_link/1, find/1, new/1, resume/2, user_hangup/1]).
Expand Down Expand Up @@ -52,7 +52,7 @@ capture(Caption, Timeout, FinishOnKey, Min, Max, ?PBX(Pid)) ->
X -> X
end.

record(FileName, StopKeys, Timeout, ?PBX(Pid)) ->
record(_AsteriskFile, FileName, StopKeys, Timeout, ?PBX(Pid)) ->
case gen_server:call(Pid, {record, FileName, StopKeys, Timeout}, timer:minutes(5)) of
hangup -> throw(hangup);
X -> X
Expand Down

0 comments on commit 5b384ab

Please sign in to comment.