Use this instruction to change the default phone number format.
- Get Application Instance Token with the pem.APS.getApplicationInstanceToken OA Public API method.
- Get the Phone Number Provider resource with curl: curl -i -k "https://<MN IP>:6308/aps/2/resources/?implementing(http://www.parallels.com/LyncHPv2/phoneNumberProvider)" -X GET -H "APS-Token: $ApplicationInstanceToken".
- Update phone number formats of the Phone Number Provider resource:
- Normalization Phone Number Formats - regex list to validate and to transform any types of phone numbers to E164 format.
- Display Phone Number Formats - regex list to transform a phone number to the displayed format.
- System Phone Number Formats - regex list to transform a phone number to POA format (phone number must be separated by the # symbol to the local number, country code and area code).
Example:
curl -i -k "https://<MN_IP>:6308/aps/2/resources/$PhoneNumberProvider.ID" -X PUT -H "Content-Type: application/json" -H "Accept: application/json, text/javascript" -d@"C:\request.json" -H "APS-Token: $ApplicationInstanceToken"
where the request.json file contains the following data:
{
"normalizationPhoneNumberFormats":[
{
"name":"Australian national",
"regex":"^0([1-9]\\d{8})$",
"pattern":"61$1"
},
{
"name":"E.164",
"regex":"^[+]?(\\d{3,15})$",
"pattern":"$1"
}
],
"displayPhoneNumberFormats":[
{
"name":"Australian 10-digits",
"regex":"^61(\\d)(\\d{4})(\\d{4})$",
"pattern":"0$1 $2 $3"
}
],
"systemPhoneNumberFormats":[
{
"name":"Australian",
"regex":"^61(\\d)(\\d{8})$",
"pattern":"61#$1#$2"
}
]
}
Note: After updating, the existing formats will be removed. If you wish to keep the existing formats, list them in the query.
- <MN IP> is the IP address of the Management Node
- ApplicationInstanceToken - is the token you received at step 1.
- PhoneNumberProvider.ID - is the ID of the phone number provider you received at step 2.