لا يمكن الاتصال بخادم الاتصالات المكتبية من خلال واجهة برمجة تطبيقات الاتصالات الموحدة
سؤال
أحاول الاتصال بخادم الاتصالات Office باستخدام API الموحد المدارة. لقد جربت المستخدم الخاص بي وتمكين مستخدم جديد لـ OCS. يمكن لكلا الحسابين تسجيل الدخول بنجاح إلى عميل Communicator Office ، لكنهما يفشلان في استخدام API. عند إنشاء بيانات اعتماد الشبكة ، إذا مررت في اسم المستخدم في مجال النموذج ، أحصل على هذا الخطأ:
SupportedAuthenticationProtocols=Ntlm, Kerberos
Realm=SIP Communications Service
FailureReason=InvalidCredentials
ErrorCode=-2146893044
Microsoft.Rtc.Signaling.AuthenticationException: The log on was denied. Check that the proper credentials are being used and the account is active. ---> Microsoft.Rtc.Internal.Sip.AuthException: NegotiateSecurityAssociation failed, error: - 2146893044
إذا تركت المجال في اسم المستخدم ، فأنا هذا الخطأ:
ResponseCode=404 ResponseText=Not Found
DiagnosticInformation=ErrorCode=4005,Source=OCS.mydomain.com,Reason=Destination URI either not enabled for SIP or does not exist
المحلول
تبين أن هذا كان إشرافًا من جانبي. مجالنا الإعلاني ومجال التواصل مختلفان ، لقد افترضت أنهم كانوا متماثلين.
بيانات اعتماد الشبكة هي المجال username ، وينبغي أن يكون عنوان SIP هو SIP: username@companyname.com ، كنت أستخدم sip: username@domain.com.
نصائح أخرى
شيئين يجب ملاحظة:
- يجب ألا يحتوي اسم المستخدم على المجال. يجب أن يكون هناك خاصية مجال منفصلة لشبكة NetworkCredential التي يجب أن تستخدمها.
- تحتاج أيضًا إلى تمرير المستخدم URI أيضًا - على سبيل المثال:
//Initialize and register the endpoint, using the credentials of the user the application will be acting as.
UserEndpointSettings userEndpointSettings = new UserEndpointSettings(_userURI, _userServer);
userEndpointSettings.Credential = _credential;
_userEndpoint = new UserEndpoint(_collabPlatform, userEndpointSettings);
_userEndpoint.BeginEstablish(EndEndpointEstablish, _userEndpoint);
لا تنتمي إلى StackOverflow