Parsing Media Configuration
In UCMA, a media configuration is encapsulated by a MediaConfiguration object, which exposes the configuration settings as a collection of name-value pairs known as the properties of the media configuration.
The following code example shows how the media configuration might be parsed using UCMA.
string ParseMediaConfiguration(ProvisioningData data)
{
if (data == null)
return null;
string msg = null;
if (data.MediaConfiguration != null && data.MediaConfiguration.Properties != null)
{
msg += "\r\nMediaConfiguration:\r\n";
foreach (string key in data.MediaConfiguration.Properties.Keys)
{
msg += "\tProperty[ " + key + " ] = " + data.MediaConfiguration.Properties[key] + "\r\n";
}
}
return msg;
}
The following is an example output generated when the above statement is invoked.
MediaConfiguration:
Property[ propertyentrylist ] =
<property name="bypassEnabled" xmlns="https://schemas.microsoft.com/2006/09/sip/provisiongrouplist-notification">true</property>
<property name="internalBypassMode" xmlns="https://schemas.microsoft.com/2006/09/sip/provisiongrouplist-notification">Any</property>
<property name="externalBypassMode" xmlns="https://schemas.microsoft.com/2006/09/sip/provisiongrouplist-notification">Off</property>