Skip to content

Commit

Permalink
local fs recording save
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored and jamesaimonetti committed Oct 24, 2017
1 parent 2df9c86 commit 258482f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions applications/ecallmgr/src/ecallmgr_fs_recordings.erl
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ maybe_store_recording('true', _, JObj, CallId, Node) ->
,<<"/">>
),

JObj = kz_json:from_list(
[{<<"Call-ID">>, CallId}
,{<<"Msg-ID">>, CallId}
,{<<"Media-Name">>, MediaName}
,{<<"Media-Transfer-Destination">>, Url}
,{<<"Insert-At">>, <<"now">>}
,{<<"Media-Transfer-Method">>, media_transfer_method(JObj)}
,{<<"Application-Name">>, <<"store">>}
,{<<"Event-Category">>, <<"call">>}
,{<<"Event-Name">>, <<"command">>}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
]),
ecallmgr_call_command:exec_cmd(Node, CallId, JObj, 'undefined')
Cmd = kz_json:from_list(
[{<<"Call-ID">>, CallId}
,{<<"Msg-ID">>, CallId}
,{<<"Media-Name">>, MediaName}
,{<<"Media-Transfer-Destination">>, Url}
,{<<"Insert-At">>, <<"now">>}
,{<<"Media-Transfer-Method">>, media_transfer_method(JObj)}
,{<<"Application-Name">>, <<"store">>}
,{<<"Event-Category">>, <<"call">>}
,{<<"Event-Name">>, <<"command">>}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
]),
ecallmgr_call_command:exec_cmd(Node, CallId, Cmd, 'undefined')
end.

-spec media_transfer_method(kz_proplist()) -> ne_binary().
-spec media_transfer_method(kz_json:object()) -> ne_binary().
media_transfer_method(JObj) ->
kz_call_event:custom_channel_var(JObj, <<"Media-Transfer-Method">>, <<"put">>).

-spec handling_locally(kz_proplist()) -> boolean().
-spec handling_locally(kz_json:object()) -> boolean().
handling_locally(JObj) ->
handling_locally(JObj, kz_call_event:other_leg_call_id(JObj)).

Expand Down

0 comments on commit 258482f

Please sign in to comment.