Permalink
Browse files

Merge remote-tracking branch 'origin/v1.49' into v1.49

  • Loading branch information...
2 parents 94defbb + b4981a7 commit c572969f3cb9494961c9e6af54358599847e2d7a @k-anderson k-anderson committed Feb 14, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 whistle_apps/apps/stepswitch/src/stepswitch_outbound.erl
@@ -108,10 +108,14 @@ bridge_to_endpoints(Endpoints, IsEmergency, CtrlQ, JObj) ->
end,
?LOG("set outbound caller id to ~s '~s'", [CIDNum, CIDName]),
- FromURI = case {CIDNum, wh_json:get_value(<<"Account-Realm">>, JObj)} of
- {undefined, _} -> undefined;
- {_, undefined} -> undefined;
- {FromNumber, FromRealm} -> <<"sip:", FromNumber/binary, "@", FromRealm/binary>>
+ FromURI = case catch whapps_config:get_atom(?APP_NAME, <<"format_from_uri">>, false) of
+ true ->
+ case {CIDNum, wh_json:get_value(<<"Account-Realm">>, JObj)} of
+ {undefined, _} -> undefined;
+ {_, undefined} -> undefined;
+ {FromNumber, FromRealm} -> <<"sip:", FromNumber/binary, "@", FromRealm/binary>>
+ end;
+ _ -> undefined
end,
?LOG("setting from-uri to ~s", [FromURI]),

0 comments on commit c572969

Please sign in to comment.