When using iOS CallKit, I can set a custom ringtone when setting up the CXProviderDelegate instance.
CXProviderDelegate instance contains an instance of CXProvider. CXProvider constructor takes an instance of CXPrividerConfiguration as a parameter. Code looks something like:
public class CallController : CXProviderDelegate
{
CXCallController cxCallController;
public CallController()
{
cxCallController = new CXCallController();
configuration = new CXProviderConfiguration("App Name Here...")
{
RingtoneSound = "ring.wav", // ring.wav file goes in iOS Resources
};
Provider = new CXProvider(configuration);
Provider.SetDelegate(this, null);
}
}
This is code is called when doing initial startup of the app. My question is, can the RingtoneSound be configured with CallKit on a PER CALL bases?
What I'm looking to do is at the point of knowing that there is an incoming call and WHO is calling, then adjust the ringtone accordingly. It wouldn't be done when setting up instance of CXProviderDelegate. This is for calls made using a SIP library, not actual phone calls. I tried keeping a reference to the configuration class and changing the ringtone per call, but that does not work.
I cannot rely on contacts to specify ringtones. Is there a way to set per call ringtones and if so, how?