Skip to content

Commit

Permalink
set the dialstring for inbound
Browse files Browse the repository at this point in the history
  • Loading branch information
James Aimonetti committed Oct 29, 2010
1 parent 8527911 commit c652099
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file modified applications/trunkstore/ebin/ts_route.beam
Binary file not shown.
12 changes: 6 additions & 6 deletions applications/trunkstore/src/ts_route.erl
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ find_route(Flags, ApiProp, ServerID) ->
-spec(inbound_route/1 :: (Flags :: tuple()) -> tuple(ok | error, proplist() | string())).
inbound_route(Flags) ->
format_log(info, "TS_ROUTE(~p): Inbound route flags: ~p~n", [self(), Flags]),
User = case Flags#route_flags.inbound_format of
<<"E.164">> -> ts_util:to_e164(Flags#route_flags.to_user);
<<"1NPANXXXXXX">> -> ts_util:to_1npanxxxxxx(Flags#route_flags.to_user);
_NPANXXXXXX -> ts_util:to_npanxxxxxx(Flags#route_flags.to_user)
end,
Dialstring = list_to_binary([User, "${regex(${sofia_contact(", Flags#route_flags.auth_user, "@$${domain})}|^[^\@]+(.*)|%1)}"]),
%User = case Flags#route_flags.inbound_format of
% <<"E.164">> -> ts_util:to_e164(Flags#route_flags.to_user);
% <<"1NPANXXXXXX">> -> ts_util:to_1npanxxxxxx(Flags#route_flags.to_user);
% _NPANXXXXXX -> ts_util:to_npanxxxxxx(Flags#route_flags.to_user)
% end,
Dialstring = list_to_binary(["${sofia_contact(", Flags#route_flags.auth_user, "@$${domain})}"]),
Route = [{<<"Route">>, Dialstring}
,{<<"Weight-Cost">>, 1}
,{<<"Weight-Location">>, 1}
Expand Down

0 comments on commit c652099

Please sign in to comment.