I have problem with Profile roaming in RTC. so let me describe my program to understand it better.
I write Soft-Phone base on sip Protocol, for using Sip I decide using RTC Library for Communication. This Soft-Phone do these features perfectly like hold, redirect, answer, hangup and etc. I use C# and Interop.RTCCORELib dll
for RTC. after too many time using this phone with any type of PBX server like (asterisk, asterisk windows and Elestisk) I face mysterious problem in my Soft-Phone.
Problem:
when operator login and using phone I create IRTCProfile2 Propety
to register this Profile on server. after operator don his/her work with phone, oprator close phone. In this moment I run method to disable profile on server. I checked profile, and profile state changed to "Unregistered". But the sip user still login on server. I check msdn and find this article.
In this article describe how to disable profile on server. and I do this same. here's My Code:
public void unregisterProfile()
{
if (_rtcProvisioning.Profiles.Count > 0 &&
((IRTCProfile)_rtcProvisioning.Profiles[1]).State == RTC_REGISTRATION_STATE.RTCRS_REGISTERED)
{
_rtcProvisioning.DisableProfile(_rtcProfile);
_rtcPresence.DisablePresence();
_rtcClient.PrepareForShutdown();
Thread.Sleep(2000);
_rtcClient.Shutdown();
}
}
Also in this article say call IRTCClientPresence2.DisablePresence
method.
So any solution? any tips? did I miss something?