Skip to content

Commit

Permalink
Modifications after code review. Pulled changes outs of ecallmgr_fs_x…
Browse files Browse the repository at this point in the history
…ml.erl and placed the new originate headers into to the SPECIAL_CHANNEL_VARS in ecallmgr.hrl Made modifications to remove the freeswitch leaky abstractions into kazo
  • Loading branch information
tickbw authored and k-anderson committed Sep 11, 2013
1 parent 1db81cd commit b5440d6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 20 deletions.
2 changes: 2 additions & 0 deletions applications/ecallmgr/src/ecallmgr.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@
,{<<"Enable-T38-Fax">>, <<"fax_enable_t38">>}
,{<<"Enable-T38-Fax-Request">>, <<"fax_enable_t38_request">>}
,{<<"Enable-T38-Passthrough">>, <<"t38_passthru">>}
,{<<"Fax-Identity-Number">>, <<"fax_ident">>}
,{<<"Fax-Identity-Name">>, <<"fax_header">>}
,{<<"sip_rh_X-Redirect-Server">>, <<"sip_rh_X-Redirect-Server">>}
,{<<"park_after_bridge">>, <<"park_after_bridge">>}
,{<<"continue_on_fail">>, <<"continue_on_fail">>}
Expand Down
14 changes: 1 addition & 13 deletions applications/ecallmgr/src/ecallmgr_fs_xml.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

%%%-------------------------------------------------------------------
%%% @copyright (C) 2011-2013, 2600Hz INC
%%% @doc
Expand Down Expand Up @@ -332,19 +333,6 @@ get_channel_vars({<<"SIP-Headers">>, SIPJObj}, Vars) ->
lists:foldl(fun({K,V}, Vars0) ->
[ list_to_binary(["sip_h_", K, "=", V]) | Vars0]
end, Vars, SIPHeaders);

get_channel_vars({<<"Fax-Ident">>, FaxIdent}, Vars) ->
[ list_to_binary(["fax_ident='"
,wh_util:to_list(FaxIdent)
,"'"])
| Vars
];
get_channel_vars({<<"Fax-Header">>, FaxHeader}, Vars) ->
[ list_to_binary(["fax_header='"
,wh_util:to_list(FaxHeader)
,"'"])
| Vars
];
get_channel_vars({<<"To-User">>, Username}, Vars) ->
[list_to_binary([?CHANNEL_VAR_PREFIX, "Username"
,"='", wh_util:to_list(Username), "'"])
Expand Down
4 changes: 2 additions & 2 deletions applications/fax/src/fax_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ send_fax(JobId, JObj, Q) ->
,{<<"Outbound-Caller-ID-Number">>, wh_json:get_value(<<"from_number">>, JObj)}
,{<<"Account-ID">>, wh_json:get_value(<<"pvt_account_id">>, JObj)}
,{<<"To-DID">>, wnm_util:to_e164(wh_json:get_value(<<"to_number">>, JObj))}
,{<<"Fax-Ident">>, wh_json:get_value(<<"fax_ident">>, JObj)}
,{<<"Fax-Header">>, wh_json:get_value(<<"fax_header">>, JObj)}
,{<<"Fax-Identitiy-Number">>, wh_json:get_value(<<"fax_identity_number">>, JObj)}
,{<<"Fax-Identity-Name">>, wh_json:get_value(<<"fax_identity_name">>, JObj)}
,{<<"Resource-Type">>, <<"originate">>}
,{<<"Msg-ID">>, JobId}
,{<<"Ignore-Early-Media">>, IgnoreEarlyMedia}
Expand Down
4 changes: 2 additions & 2 deletions applications/stepswitch/src/stepswitch_outbound.erl
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ originate_to_endpoints(Endpoints, JObj) ->
,{<<"Outbound-Caller-ID-Name">>, CIDName}
,{<<"Outbound-Callee-ID-Number">>, CalleeIdNumber}
,{<<"Outbound-Callee-ID-Name">>, CalleeIdName}
,{<<"Fax-Ident">>, wh_json:get_value(<<"Fax-Ident">>, JObj)}
,{<<"Fax-Header">>, wh_json:get_value(<<"Fax-Header">>, JObj)}
,{<<"Fax-Identity-Number">>, wh_json:get_value(<<"Fax-Identity-Number">>, JObj, CIDNum)}
,{<<"Fax-Identity-Name">>, wh_json:get_value(<<"Fax-Identity-Name">>, JObj, CIDName)}
,{<<"Caller-ID-Number">>, CIDNum}
,{<<"Caller-ID-Name">>, CIDName}
,{<<"Ringback">>, wh_json:get_value(<<"Ringback">>, JObj)}
Expand Down
2 changes: 1 addition & 1 deletion core/whistle-1.0.0/src/api/wapi_offnet_resource.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
,<<"Control-Queue">>, <<"Call-ID">>, <<"Application-Data">>
,<<"Account-ID">>, <<"Outbound-Call-ID">>
,<<"Call-ID">>, <<"Mode">>, <<"Group-ID">> % Eavesdrop
,<<"Force-Outbound">>, <<"Fax-Ident">>, <<"Fax-Header">>
,<<"Force-Outbound">>, <<"Fax-Identity-Number">>, <<"Fax-Identity-Name">>
,<<"Enable-T38-Fax">>, <<"Enable-T38-Fax-Request">>
,<<"Enable-T38-Passthrough">>, <<"Force-Fax">>, <<"Enable-T38-Gateway">>
]).
Expand Down
4 changes: 2 additions & 2 deletions core/whistle-1.0.0/src/api/wapi_resource.erl
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
,<<"Eavesdrop-Call-ID">>
,<<"Eavesdrop-Mode">>
,<<"Eavesdrop-Group-ID">>
,<<"Fax-Ident">>
,<<"Fax-Header">>
,<<"Fax-Identity-Number">>
,<<"Fax-Identity-Name">>
| fun() ->
wapi_dialplan:optional_bridge_req_headers()
end()
Expand Down

0 comments on commit b5440d6

Please sign in to comment.