question

Ralf Reifenberg avatar image
Ralf Reifenberg asked Ralf Reifenberg commented

SIP Registration - JWT Auth error: "SPR-112 Client Edition is not compatible with current Brand"

After successfull JWT authorization for Client ID 5kbWr8Q48FFbdt4wl2f6q4 (Avaya Cloud Office - Sandbox - RingCentral Softphone Demo CSharp), the first Rest API call "SipProvision" fails w/ error message "SPR-112 Client Edition is not compatible with current Brand". The app setting is configured as "public" and NOT limited to brand "Avaya Cloud Office". As authorization method is JWT, I have no idea how to configure brandid 6010 inside C# program code. ringcentralsoftphone-jwt.jpg

Please note: Auth via "Password" is no longer supported. Furthermore we're going to build a server-side app (Windows Service in C#), that's why rc.Authorize is called w/ JWT.


avayacloudoffice-app-clientid.jpg

Client ID for this app in Avaya Cloud Office sandbox is: 5kbWr8Q48FFbdt4wl2f6q4


avayacloudoffice-app-security.jpg

The app is configured as public w/o any limitation/restriction on specific brand.



auth
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered Ralf Reifenberg commented

Can you try to create a JWT token bound to this app (NOT all app under my organization)? And use that JWT token instead. Also, you can narrow down the investigation area by changing the app from public to private.

For brand configuration, you don't have to set anything from the SDK, it's just the app settings.

8 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Ralf Reifenberg avatar image Ralf Reifenberg commented ·

Hi Phong Vu,

I've tried all combinations in sandbox environment of ACO account "Avaya Germany Sandbox" (main number +14244275013 ):

App JWT JWT Auth - Error Msg

-----------------------------------------------------------------------------

private private OAU-153 - invalid client

private public OAU-153 - invalid client

public private SPR-112 - client edition not compatible w/ current brand

public public SPR-112 - client edition not compatible w/ current brand

Avaya private SPR-112 - client edition not compatible w/ current brand

Avaya public SPR-112 - client edition not compatible w/ current brand

Note: "Avaya" = public app limited to brand Avaya Cloud Office and all other Service & Brand partners.

I've checked w/ SIP test client "PhonerLite" (similar to ZoiPer), that my extension works. And I've found an old app in "Avaya Germany Sandbox" created in June 2021, which is configured to allow "User+Pwd" authentication. Unfortunately I do NOT have a JWT dated June 2021 (because I joined "ACO Sandbox Germany" recently) ... RingCentral Softphone Demo also returns SPR-112 error when using "User+Pwd" in combination w/ newly created JWT token of type "all applications".

Hmm ... no idea what to try next ...


0 Likes 0 ·
Ralf Reifenberg avatar image Ralf Reifenberg commented ·

Ok, maybe the issue is here:

  • in sandbox environment of "ACO Sandbox Germany"
  • the first API call "Device SIP Register" "https://platform.devtest.ringcentral.com/restapi/v1.0/client-info/sip-provision" does NEITHER work for "TLS" nor "TCP protocol for extension 101 in case of JWT
  • the "Device SIP Register" only works for extn 101 and an App w/ OAuth2 and WSS protocol
  • but that doesn't help at all, both OAuth2 and WSS are wrong for the Windows service we have to implement based on JWT

1687426283477.png


If I try an App w/ JWT and select "TLS" protocol. then I receive "SPR-117 Server does not support protocol"

1687426708073.png


How to get out of this chicken-egg problem for extn 101 on "ACO Sandbox Germany"?

  • "User/Pwd" auth is no longer possible - OK
  • 3-leg OAuth2 is wrong for Windows service w/o UI
  • JWT doesn't work for TLS and ext 101 in "ACO Sandbox Germany" .. I still haven't understood why ...
0 Likes 0 ·
1687426283477.png (132.6 KiB)
1687426708073.png (160.0 KiB)
Phong Vu avatar image Phong Vu ♦♦ Ralf Reifenberg commented ·

Before I look into the problem, I want you to double check if the problem is with the JWT or not. I enable password flow for your app. So can you try authenticate your app with 101 username and password and register the SIP device.

Let me know the result.

0 Likes 0 ·
Ralf Reifenberg avatar image Ralf Reifenberg commented ·

Hi Phong Vu,

appreciate your efforts! Unfortunatelty the behaviour hasn't changed, same result in Visual Studio project RingCentral Softphone Demo and on RingCentral web sites using "Try Out". I'm not able to execute "Device SIP Register" for any other protocol than WSS. For this test, I tool the "ACO Sandbox Germany" RingCentral App "API Ringout", which was already created in June 2021 and which has User/Pwd auth configured:


1687499045127.png

It works for WSS, but our Windows server application/service requires JWT, so this doesn't help.


1687499115266.png

I'm getting SPR-112 for TCP protocol, same for UDP and TLS.


0 Likes 0 ·
1687499045127.png (161.7 KiB)
1687499115266.png (156.2 KiB)
Phong Vu avatar image Phong Vu ♦♦ Ralf Reifenberg commented ·

Let me setup my environment and investigate this. I have not used this before so it may take some time.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Ralf Reifenberg commented ·

I got a confirmation from the platform team that TCP transport is only supported for RC apps. Thus, 3rd party can only use WSS transport method.

We will add a note to the API reference later to make it clear.

0 Likes 0 ·
Ralf Reifenberg avatar image Ralf Reifenberg commented ·

Hi Phong,

as RingCentral.Softphone.Net is original RC code

  • which did work in the past
  • which is designed for (and worked for) "creation of SIP device using SIP over TCP + RTP" (see program.cs lines 30 - 48)
  • which worked for "user/pwd", until this auth method became deprecated and blocked (and maybe in same timeframe, PCKE became introduced)

could you please double-check, whether TCP transport is really only supported for RC apps?

ringcentralnet-sample-sip-tcp.jpg


This morning, I've had support from Karsten Domaratius and he was able to reproduce SPR-112. Karsten is just investigating, whether SPR-112 will appear for a RingCentral app/user too.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Ralf Reifenberg commented ·

@Tyler Liu Can you have a look at this? Thanks

0 Likes 0 ·
Tyler Liu avatar image
Tyler Liu answered

if you are talking about "SIP over TCP + RTP", as we confirmed with project manager, it is not a feature that should be open to public. Only some RingCentral apps could use this feature. Third party apps should use SIP over WSS instead. For now it is by design. In the past it used to work but now it doesn't work any more. And since by design it is for internal usage only, we may not provide any fix in the near future.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Karsten Domaratius avatar image
Karsten Domaratius answered Phong Vu commented

Hello @Phong Vu and @Tyler Liu: I looked at the project a bit further. I have got the RingCentral.net Softphone project to work. I have used Get Device Sip Info api call to get the SIP information from an "existing phone" and use these details in the c# project instead of using Create SIP Registration. This would allow a external app to registered as a SIP endpoint programmaticly using SIP TCP.

This Get Device SIP Info API call is used widely for 3rd party devices that are not on the offical hardware phone list of RingCentral. Could you confirm if the API call Get Device Sip Info is fully supported for Ralf?

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

Interesting. Thanks for sharing this Karsten! Let's have a deep look at this and come up with a solution if possible. @Ralf Reifenberg please stay tuned.

0 Likes 0 ·
Ralf Reifenberg avatar image
Ralf Reifenberg answered Ralf Reifenberg commented

Hi @Phong Vu and @Tyler Liu ,

yesterday, Karsten was so kind to help me to get "SIP over TCP and RTP" up and running on my ACO instance and for my user extension & SIP device by implementing "List extensions, Get Extension ID, Get Device SIP Info" - it works!

Sorry for the confusion, it was my oversight, because the limitation of API call "Device SIP Registration" on WebPhone, Mobile, Softphone" is described and visible on top of the page.

1688197902487.png

So may I assume, that "List extensions, Get Extension ID, Get Device SIP Info" can be used and is supported like all other APIs functions on "developers.ringcentral.com/api-reference"?

Appreciate your support (and final answer:)

Brgds & Thx, Ralf


1688197902487.png (38.9 KiB)
4 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image Tyler Liu ♦ commented ·

"Get Device SIP Info" is available in RingCentral's public documentation/API reference, so yes you can use it and it is supported.



1 Like 1 ·
Dwight Goins avatar image Dwight Goins commented ·

Hi @Ralf Reifenberg and @Karsten Domaratius,

I am interested in getting this sample to work. Can either of you please help out? Thanks.

0 Likes 0 ·
Tyler Liu avatar image Tyler Liu ♦ Dwight Goins commented ·

I have updated the https://github.com/ringcentral/RingCentral.Softphone.Net project.

It should just work now. Please following the instructions on the readme page.

0 Likes 0 ·
Ralf Reifenberg avatar image Ralf Reifenberg Dwight Goins commented ·

Hi Dwight,

sorry for the delayed response. First I was on vacation, then I was very busy ... and at the end, I simply missed it - sorry. Please reach out to me and CC to reifenberg@avaya.com in case you don't get the latest RingCentral.Softphone.Net up and running, which has been just updated by Tyler

Ralf

0 Likes 0 ·
Tyler Liu avatar image
Tyler Liu answered

Update to every one: I have updated the https://github.com/ringcentral/RingCentral.Softphone.Net project.

It should just work now. Follow the instructions on the readme page please.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys