MGW NAT: Fix treatment of digit lists / int in ISUP prefix replace

This commit is contained in:
Harald Welte 2011-02-10 18:29:28 +01:00
parent df81bdd32c
commit 5889e65e08
1 changed files with 2 additions and 1 deletions

View File

@ -253,9 +253,10 @@ mangle_isup_number(from_msc, _, _, PartyNum) ->
PartyNum.
% replace the prefix of PartyNum with NewPfx _if_ the current prefix matches MatchPfx
isup_party_replace_prefix(PartyNum, MatchPfx, NewPfxInt) ->
isup_party_replace_prefix(PartyNum, MatchPfxInt, NewPfxInt) ->
DigitsIn = PartyNum#party_number.phone_number,
NewPfx = osmo_util:int2digit_list(NewPfxInt),
MatchPfx = osmo_util:int2digit_list(MatchPfxInt),
MatchPfxLen = length(MatchPfx),
Pfx = lists:sublist(DigitsIn, 1, MatchPfxLen),
if Pfx == MatchPfx ->