SOLVED

Issues with calling number translation rules under Trunk Configuration

%3CLINGO-SUB%20id%3D%22lingo-sub-1898%22%20slang%3D%22en-US%22%3EIssues%20with%20calling%20number%20translation%20rules%20under%20Trunk%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1898%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22yj-message-list-item--body-message%20yj-message%22%3E%3CSPAN%20class%3D%22remaining-body%22%3EI%20was%20playing%20around%20with%20SfB%20number%20translation%20rules%20in%20order%20to%20find%20a%20way%20to%20inverse%20match%20a%20number.%20In%20my%20scenario%20I%20wanted%20to%20make%20sure%20that%20if%20the%20calling%20party%20number%20(CLI)%20of%20the%20SfB%20user%20doesn%E2%80%99t%20match%20particular%20prefix%2C%20for%20example%20%2B441234561234x%20where%20x%3D0-9%20the%20CLI%20will%20always%20be%20replaced%20with%20%2B449865498760.%20In%20order%20to%20do%20that%20I%20had%20created%20pattern%20match%20expression%20%5E(%3F!%5C%2B441234561234)%20which%20matches%20everything%20else%20than%20CLIs%20starting%20with%20%2B441234561234.%20Then%20as%20a%20Translation%20rule%20I%20simply%20specified%20my%20replacement%20number%20%2B449865498760.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22yj-message-list-item--body-message%20yj-message%22%3E%3CSPAN%20class%3D%22remaining-body%22%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MS_fig1.jpg%22%20style%3D%22width%3A%20402px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F865iFAE6129371480C89%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22MS_fig1.jpg%22%20alt%3D%22MS_fig1.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3EI%20forgot%20to%20mention%20that%20all%20this%20happens%20on%20Trunk%20Configuration%20level.%20So%20once%20configured%20like%20that%20matching%20was%20working%20just%20fine%20but%20translation%20was%20weird.%20For%20example%20when%20there%20is%20a%20match%20i.e.%20CLI%20was%20for%20example%20%2B4422334455667%2C%20translation%20was%20%2B449865498760%2B4422334455667%20!!!%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22yj-message-list-item--body-message%20yj-message%22%3E%3CSPAN%20class%3D%22remaining-body%22%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MS_fig2.jpg%22%20style%3D%22width%3A%20587px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F866i3AF604D4B07384BB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22MS_fig2.jpg%22%20alt%3D%22MS_fig2.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22yj-message-list-item--body-message%20yj-message%22%3E%3CSPAN%20class%3D%22remaining-body%22%3E%3CBR%20%2F%3EAny%20idea%20why%20it%20is%20like%20that%3F%20Is%20this%20a%20know%20issue%20or%20I'm%20just%20doing%20something%20wrong%3F%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1898%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESkype%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3684%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20calling%20number%20translation%20rules%20under%20Trunk%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3684%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20Jamie%20was%20right%20I%20had%20to%20change%20my%20translation%20rule%20to%20...%20two%20translation%20rules%20%3A)%2C%20first%20of%20which%20matches%20the%20prefix%2Fstring%20and%20pass%20it%20unchanged%20and%20second%20that%20simply%20changes%20the%20CLI%20without%20any%20checks%2C%20relying%20on%20the%20fact%20that%20if%20the%20prefix%20was%20equal%20to%20the%20one%20I%20wanted%20to%20stay%20unchanged%20it%20would%20have%20matched%20to%20the%20first%20rule.%3C%2FP%3E%3CP%3EThansk%20Jamie.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2319%22%20slang%3D%22en-US%22%3ERe%3A%20Issues%20with%20calling%20number%20translation%20rules%20under%20Trunk%20Configuration%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2319%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20need%20to%20change%20the%20translation%20rule%20-%20I'm%20not%20a%20RegEx%20expert%2C%20but%20there's%20guidance%20on%20the%20topic%20in%20the%20library%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fgg398520.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fgg398520.aspx%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I was playing around with SfB number translation rules in order to find a way to inverse match a number. In my scenario I wanted to make sure that if the calling party number (CLI) of the SfB user doesn’t match particular prefix, for example +441234561234x where x=0-9 the CLI will always be replaced with +449865498760. In order to do that I had created pattern match expression ^(?!\+441234561234) which matches everything else than CLIs starting with +441234561234. Then as a Translation rule I simply specified my replacement number +449865498760.


MS_fig1.jpg
I forgot to mention that all this happens on Trunk Configuration level. So once configured like that matching was working just fine but translation was weird. For example when there is a match i.e. CLI was for example +4422334455667, translation was +449865498760+4422334455667 !!!


MS_fig2.jpg


Any idea why it is like that? Is this a know issue or I'm just doing something wrong?

2 Replies

You need to change the translation rule - I'm not a RegEx expert, but there's guidance on the topic in the library here: https://technet.microsoft.com/en-us/library/gg398520.aspx

 

Best Response confirmed by Plamen Gavrailov (Contributor)
Solution

Yes, Jamie was right I had to change my translation rule to ... two translation rules :), first of which matches the prefix/string and pass it unchanged and second that simply changes the CLI without any checks, relying on the fact that if the prefix was equal to the one I wanted to stay unchanged it would have matched to the first rule.

Thansk Jamie.