Solved user script issue - OnPremLineURI will be deprecated.

Status
Not open for further replies.

fabs

Customer
Joined
Aug 18, 2021
Messages
53
Reaction score
10
Hello,

I have a problem when running the user script.
I get an error back with this query:
Set-CsUser -Identity *.*******@******.com -OnPremLineURI "tel:+49*************;ext=21" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true
$users_ids = @(*.*******@******.com@******.com")

d6b83816-dc2c-438e-accc-14cd0c108c99
96905a9a-a059-4f53-a7b7-037138a229ae
5d63174a-82cf-4f5f-bb57-7f644668924c
WARNUNG: OnPremLineURI will be deprecated. Please use LineURI to update user's phone number.
PS C:\Windows\system32>

The phone number in the script is identical to the user's office number.
The execution of the dialing plan script works without problems.
Calling policies and dialing plans are also set.
Calling policy at the user is also set - dialing pad is visible in Teams.
The licenses should also be correct: (sorry it's german)
3.PNG

1.PNG

Direct routing also seems to work.
2.PNG


Do you have any other ideas?

Regards
fabs
 
Last edited:
Hello again,

Oh I just see in Azure Active Directory the Office number is +4970... without spaces between +49 and the number, in Teams under manage users it is still with spaces, I had changed this today. Could it be that it is not updated in Teams yet and that's why the error comes when running the script?

edit: Or does teams automatically convert the numbers with spaces?
 
Last edited:
Hello Again,

this command worked for me found https://www.3cx.com/community/threads/calls-rejected.86449/
Set-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber "+111;ext=111" -PhoneNumberType DirectRouting

Now my dialpad has the correct number with Ext and incoming calls are working.
But I still have the problem that I can not call out.
Probably it is because in Teams the outbound phone number must be in E164 format, but in 3CX for each user I cannot specify the outbound phone number in E164 format. If I specify the number in E164 format, I cannot make outbound calls in 3CX. I have to specify the number without +49.
Must be the outbound phone number in 3CX exactly the office number in Teams?


Best Regards
fabs
 
Last edited:
Hello Again,

this command worked for me found https://www.3cx.com/community/threads/calls-rejected.86449/
Set-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber "+111;ext=111" -PhoneNumberType DirectRouting

Now my dialpad has the correct number with Ext and incoming calls are working.
But I still have the problem that I can not call out.
Probably it is because in Teams the outbound phone number must be in E164 format, but in 3CX for each user I cannot specify the outbound phone number in E164 format. If I specify the number in E164 format, I cannot make outbound calls in 3CX. I have to specify the number without +49.
Must be the outbound phone number in 3CX exactly the office number in Teams?


Best Regards
fabs
Hi fabs,

From the Teams Client, can you call another 3CX Extension number that is NOT synced with Teams? Doe that work?
 
Hi fabs,

From the Teams Client, can you call another 3CX Extension number that is NOT synced with Teams? Doe that work?
Hello NickD,

yes when i call "23" that works.

Regards
fabs
 
Hello all,
strangely enough, calling out with teams now works as well. I have not made any changes in 3CX or Teams.
The outgoing number in 3CX is still not in E164 format.

Regards
fabs
 
In that case, I think we can close the issue as 'Solved'.

I'm not sure why it just started working without any changes, but the fact that it works is good enough for me.
 
Status
Not open for further replies.