Skip to content

Commit

Permalink
KAZOO-2818: make the codecs a system_config category
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson committed Aug 1, 2014
1 parent e0bd210 commit ffb4e40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions applications/callflow/src/cf_endpoint.erl
Expand Up @@ -27,6 +27,7 @@
-define(DEFAULT_MOBILE_SUFFIX, <<"">>).
-define(DEFAULT_MOBILE_REALM, <<"mobile.k.zswitch.net">>).
-define(DEFAULT_MOBILE_PATH, <<"">>).
-define(DEFAULT_MOBILE_CODECS, [<<"PCMU">>]).

%%--------------------------------------------------------------------
%% @public
Expand Down Expand Up @@ -820,6 +821,7 @@ create_mobile_endpoint(Endpoint, Properties, Call) ->
lager:info("unable to build mobile endpoint: ~s", [_R]),
Error;
Route ->
Codecs = whapps_config:get_binary(?CF_MOBILE_CONFIG_CAT, <<"codecs">>, ?DEFAULT_MOBILE_CODECS),
Prop = [{<<"Invite-Format">>, <<"route">>}
,{<<"Ignore-Early-Media">>, <<"true">>}
,{<<"Route">>, Route}
Expand All @@ -828,6 +830,7 @@ create_mobile_endpoint(Endpoint, Properties, Call) ->
,{<<"Endpoint-Delay">>, get_delay(Properties)}
,{<<"Presence-ID">>, cf_attributes:presence_id(Endpoint, Call)}
,{<<"SIP-Headers">>, generate_sip_headers(Endpoint, Call)}
,{<<"Codecs">>, Codecs}
,{<<"Custom-Channel-Vars">>, generate_ccvs(Endpoint, Call, wh_json:new())}
],
wh_json:from_list(props:filter_undefined(Prop))
Expand Down

0 comments on commit ffb4e40

Please sign in to comment.