SOLVED

Direct Routing - PABX Extension Number

%3CLINGO-SUB%20id%3D%22lingo-sub-2368257%22%20slang%3D%22en-US%22%3EDirect%20Routing%20-%20PABX%20Extension%20Number%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2368257%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20question%20related%20to%20%22classic%22%20extension%20numbers%20which%20commonly%20can%20occur%20when%20customers%20use%20direct%20routing%20to%2Ffrom%20users%20on%20a%20PBAX.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20my%20Teams'%20users%2C%20I%20have%20set%20via%26nbsp%3BSet-CsUser%20the%20extension%20number%20in%20the%20following%20examples%3C%2FP%3E%3CP%3ETeams%20User%20A%3A%26nbsp%3B-OnPremLineURI%20%22tel%3A4101%22%3C%2FP%3E%3CP%3E-or-%3C%2FP%3E%3CP%3ETeams%20User%20B%3A%26nbsp%3B-OnPremLineURI%20%22tel%3A%2B18121234567%3Bext%3A4101%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsers%20on%20the%20PABX%20are%20all%20in%20the%20range%20of%20a%204%20digit%20number%20plan.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue%201%3A%20Calling%20Teams%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EA%20user%20on%20the%20PABX%20dials%204101%2C%20which%20is%20correctly%20routed%20to%20the%20SBC%20and%20to%20Teams.%20I%20get%20a%20499%20not%20found%20when%20the%20number%20format%20is%20entered%20as%20%22Teams%20User%20B%22.%20It%20does%20ring%20when%20I%20use%20%22Teams%20User%20A%22.%20From%20the%20documentation%2C%20I%20thought%20the%20writing%20form%20of%26nbsp%3BTeams%20User%20B%20would%20archive%20the%20same%20goal%3F%20Am%20I%20missing%20something%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue%202%3A%20Calling%20PABX%20Users%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ERegardless%20of%20what%20I%20do%2C%20the%20FROM%20and%20TO%20numbers%20in%20the%20INVITE%20to%20the%20PABX%20from%20Teams%20DR%20are%20transformed%20and%20e164%20formatting%20is%20partially%20added.%20For%20example%2C%20Teams'%20User%20A%20(4101)%20calls%20PABX%20user%20(4102).%20The%20FROM%20is%20changed%20to%20%2B444101%20(I%20assume%20as%20the%20service%20location%20is%20set%20to%20the%20UK%20while%20I%20applied%20the%20license%20to%20the%20user%3F%20Cannot%20find%20another%20place%20where%20UK%20is%20related%20to%20the%20user)%20and%20the%20TO%20is%20changed%20to%20%2B4102.%20Can%20I%20configure%20Direct%20Routing%20to%20leave%20all%20numbers%20untouched%2C%20in%20the%20from%20and%20in%20the%20to%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20all%20in%20advance!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2368257%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECalling%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2373419%22%20slang%3D%22en-US%22%3ERe%3A%20Direct%20Routing%20-%20PABX%20Extension%20Number%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2373419%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3Ethe%20behavior%20in%20issue%201%20is%20correct.%20Teams%20only%20tries%20to%20match%20the%20phone%20number.%20So%20to%20use%20that%20approach%20you%20have%20to%20normalize%20the%204%20digits%20(YYYY)%20to%20the%20e.164%20(%2B44XXXXXXYYYY)%20on%20your%20SBC%20before%20you%20send%20it%20to%20Teams.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20general%20I%20would%20recommend%20to%20use%20full%20e.164%20in%20Teams.%20This%20would%20mean%20to%20transform%204%20digit%20numbers%20to%20e.164%20from%20PBX%20to%20Teams.%20The%20other%20way%20round%20you%20have%20to%20do%20the%20opposite%20and%20strip%20the%20digits%20before%20you%20send%20it%20to%20the%20PBX.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20issue%202%20is%20related%20to%20the%20dial%20plan%20that%20got%20applied%20by%20default%20depending%20on%20your%20country.%20If%20you%20want%20to%20implement%20extension%20dialing%20to%20your%20pbx%20you%20need%20to%20create%20your%20own%20user%20level%20dial%20plan.%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%3CBR%20%2F%3E%3CBR%20%2F%3EPaul%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2374509%22%20slang%3D%22en-US%22%3ERe%3A%20Direct%20Routing%20-%20PABX%20Extension%20Number%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2374509%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44596%22%20target%3D%22_blank%22%3E%40Paul%20Lange%3C%2FA%3E%26nbsp%3B%2C%20thank%20you%20for%20taking%20your%20time%20to%20respond.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20my%20second%20issue%2C%20I%20think%20I%20will%20be%20out%20of%20luck%20as%20the%20country%20service%20dialplan%20is%20always%20applied%20at%20the%20end%20of%20all%20dial%20plans%3F%20Which%20will%20not%20make%20it%20possible%20to%20send%20a%20call%20out%20without%20been%20transformed%20to%20%22something%22%20with%20a%20%2B.%20I%20will%20take%20up%20the%20work%20in%20the%20SBC%20to%20fix%20this.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENormalizationRules%20%3A%3C%2FP%3E%3CP%3E%7BDescription%3DDE%20International%20Dialing%20Rule%3B%3CBR%20%2F%3EPattern%3D%5E00(%5Cd%2B)%24%3B%3CBR%20%2F%3ETranslation%3D%2B%241%3B%3CBR%20%2F%3EName%3DDE%20Intl%20Dialing%3B%3CBR%20%2F%3EIsInternalExtension%3DFalse%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDescription%3DDE%20Extensions%20rule%3B%3CBR%20%2F%3EPattern%3D%5E((%5C%2B)%3F(%5Cd%2B))(%3B)%3F(ext%7Cextn%7CEXT%7CEXTN%7Cx%7CX)(%3D)%3F(%5Cd%2B)%24%3B%3CBR%20%2F%3ETranslation%3D%241%3Bext%3D%247%3B%3CBR%20%2F%3EName%3DDE%20Extension%20Rule%3B%3CBR%20%2F%3EIsInternalExtension%3DFalse%2C%3CBR%20%2F%3E%3CBR%20%2F%3EDescription%3DDE%20Long%20Distance%20DialingRule%3B%3CBR%20%2F%3EPattern%3D%5E0(%5Cd%2B)%24%3B%3CBR%20%2F%3ETranslation%3D%2B49%241%3B%3CBR%20%2F%3EName%3DDE%20Long%20Distance%3B%3CBR%20%2F%3EIsInternalExtension%3DFalse%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Dear all,

 

I have a question related to "classic" extension numbers which commonly can occur when customers use direct routing to/from users on a PBAX.

 

For my Teams' users, I have set via Set-CsUser the extension number in the following examples

Teams User A: -OnPremLineURI "tel:4101"

-or-

Teams User B: -OnPremLineURI "tel:+18121234567;ext:4101"

 

Users on the PABX are all in the range of a 4 digit number plan.

 

Issue 1: Calling Teams

A user on the PABX dials 4101, which is correctly routed to the SBC and to Teams. I get a 499 not found when the number format is entered as "Teams User B". It does ring when I use "Teams User A". From the documentation, I thought the writing form of Teams User B would archive the same goal? Am I missing something?

 

Issue 2: Calling PABX Users

Regardless of what I do, the FROM and TO numbers in the INVITE to the PABX from Teams DR are transformed and e164 formatting is partially added. For example, Teams' User A (4101) calls PABX user (4102). The FROM is changed to +444101 (I assume as the service location is set to the UK while I applied the license to the user? Cannot find another place where UK is related to the user) and the TO is changed to +4102. Can I configure Direct Routing to leave all numbers untouched, in the from and in the to?

 

Thank you all in advance!

 

6 Replies
best response confirmed by ThereseSolimeno (Microsoft)
Solution
Hi,

the behavior in issue 1 is correct. Teams only tries to match the phone number. So to use that approach you have to normalize the 4 digits (YYYY) to the e.164 (+44XXXXXXYYYY) on your SBC before you send it to Teams.

In general I would recommend to use full e.164 in Teams. This would mean to transform 4 digit numbers to e.164 from PBX to Teams. The other way round you have to do the opposite and strip the digits before you send it to the PBX.

The issue 2 is related to the dial plan that got applied by default depending on your country. If you want to implement extension dialing to your pbx you need to create your own user level dial plan.

Regards,

Paul


@Paul Lange , thank you for taking your time to respond.

 

For my second issue, I think I will be out of luck as the country service dialplan is always applied at the end of all dial plans? Which will not make it possible to send a call out without been transformed to "something" with a +. I will take up the work in the SBC to fix this. 

 

NormalizationRules :

{Description=DE International Dialing Rule;
Pattern=^00(\d+)$;
Translation=+$1;
Name=DE Intl Dialing;
IsInternalExtension=False,

Description=DE Extensions rule;
Pattern=^((\+)?(\d+))(;)?(ext|extn|EXT|EXTN|x|X)(=)?(\d+)$;
Translation=$1;ext=$7;
Name=DE Extension Rule;
IsInternalExtension=False,

Description=DE Long Distance DialingRule;
Pattern=^0(\d+)$;
Translation=+49$1;
Name=DE Long Distance;
IsInternalExtension=False}

@sonicsw 

 

It doesn't need to. Just amend your global dial plan and then add a new normalisation rule.

 

Go to Advanced and type in the If (\d{4})

Then $1 in the "Then do this"

 

Then if you test, you'll see putting in 4444

outputs 4444

 

As you talk about SBC's, you're obviously using Direct Routing so just ensure you have a Voice Route that matches the 3 digit number. Then 4444 will go straight to the SBC without any addition of +44 or +49 etc

 

Hope that helps.

 

@flowler_32 thank you so much, this worked!

Strange, if I enter the same but in the basic form it rejects me as the result is not e164. Would you happen to know also how to manipulate the source FROM callerID in the same manner in case the destination number is (\d{4})?

@sonicsw 

 

yes - you should use Advanced.


For your 2nd question, I would use the SBC to do that manipulation so for example. This call should hit your SBC with the calling number being the full E164 number and your called number being the 4 digit extension. You will probably have a call routing table where if Called Number is a 4 digit extension then it goes to your PBX.

On the SBC, just do a translation that extracts last 4 digits from calling number and send that through so for example if the calling number range was +4411612xxxx then regex would be ^[+]4411612(\d{4})$    and output would be \1

 

This captures last 4 digits in the brackets and uses that as the output so PBX would receive 4 digits as both calling and called number.

 

 

 

@lowler_23, you are a start.

I help myself at the moment in that way: To simplify multi-digit-Extention-length I use the format tel:+44xxxxxxxxx;ext=4101 to grab the extension after the ext= and use the other one for the outbound call ID the call shall have if the call goes to the PSNT network. If that's the only way, I am happy to work that way.

Thank you once more!